输入访问口令进入
口令不对,再试一次
把图片拖到这里,或
单张最大 20MB
还没有图片,传一张试试
Cloudflare Workers AI 免费文本模型,每天免费额度 10,000 Neurons(00:00 UTC 重置)。只有登录后才能调用,不会烧别人的额度。对话只存在本页内存里,刷新即清空。
基地址 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 秒内可访问。
/api/ai/models可用文本模型列表,需鉴权。返回 {"models": [{"id", "label", "neurons_in", "neurons_out"}], "default": "..."}。
/api/ai/chat文本生成(Cloudflare Workers AI),需鉴权。Content-Type: application/json,body 为 {"messages": [{"role": "user", "content": "..."}], "model": "可选,白名单内", "max_tokens": "可选,64-1024"};也支持简写 {"prompt": "..."}。
返回 {"response": "...", "model": "..."}。免费额度 10,000 Neurons/天(账号共享,00:00 UTC 重置),超额返回 429。单次输入合计上限 12,000 字符。
curl -X POST https://imgbed-api.feimiao.workers.dev/api/ai/chat \
-H "Authorization: Bearer <口令>" \
-H "Content-Type: application/json" \
-d '{"prompt": "用一句话介绍樱花"}'
/api/ai/describe视觉模型(@cf/meta/llama-3.2-11b-vision-instruct)为一张图生成简体中文描述和标签,需鉴权。Content-Type: application/json,body 为 {"key": "2026/10/15/ab12cd34.png", "force": false}。
返回 {"key", "description", "tags": [...], "model", "updated_at", "cached": false}。结果存入 R2 的 _meta/{key}.json,再次调用直接命中缓存不烧额度,force: true 才重新生成。仅支持 jpg/png/webp 且单图 ≤4MB,超限返回 400/413。图片列表 /api/list 会带回每张图的 ai 字段,删图时 sidecar 一并删除。
curl -X POST https://imgbed-api.feimiao.workers.dev/api/ai/describe \
-H "Authorization: Bearer <口令>" \
-H "Content-Type: application/json" \
-d '{"key": "2026/10/15/ab12cd34.png"}'
200 成功 · 400 参数错误 · 401 口令错误或缺失 · 403 临时链接无效或已过期 · 404 图片不存在 · 413 文件超过 20MB