输入访问口令进入
口令不对,再试一次
把图片拖到这里,或
单张最大 20MB
还没有图片,传一张试试
基地址 https://imgbed-api.feimiao.workers.dev
除 /api/health 与 /api/s/* 外,所有接口都需要在请求头中携带口令:
Authorization: Bearer <口令>
口令只走请求头,永不出现在 URL 中。分享给他人请使用下面的临时链接。
/api/health健康检查,无需鉴权。返回 {"ok": true}。
/api/upload上传图片。Content-Type: multipart/form-data,字段名为 file。仅接受图片类型,单张最大 20MB。
返回 {"key": "2026/10/15/ab12cd34.png", "url": "/api/i/2026/10/15/ab12cd34.png"}
curl -X POST https://imgbed-api.feimiao.workers.dev/api/upload \
-H "Authorization: Bearer <口令>" \
-F "file=@photo.png"
/api/list图片列表。查询参数 prefix(按 key 前缀过滤)、cursor(翻页)。每页最多 100 条。
返回 {"files": [{"key", "size", "uploaded"}], "cursor", "truncated"}
/api/i/{key}下载原图,需鉴权。响应携带原始 Content-Type。
/api/i/{key}删除图片,需鉴权。返回 {"ok": true}。
/api/share为一张图生成临时访问链接,需鉴权。Content-Type: application/json,body 为 {"key": "2026/10/15/ab12cd34.png"}。
返回 {"url": "https://.../api/s/2026/10/15/ab12cd34.png?exp=...&sig=...", "expires_at": "..."},链接 60 秒内有效,过期或篡改返回 403。
curl -X POST https://imgbed-api.feimiao.workers.dev/api/share \
-H "Authorization: Bearer <口令>" \
-H "Content-Type: application/json" \
-d '{"key": "2026/10/15/ab12cd34.png"}'
/api/s/{key}?exp=&sig=临时链接访问。服务端用 HMAC-SHA256 校验签名,无需口令,任何人拿到链接 60 秒内可访问。
200 成功 · 400 参数错误 · 401 口令错误或缺失 · 403 临时链接无效或已过期 · 404 图片不存在 · 413 文件超过 20MB