本站图床基于 Telegraph-Image 项目搭建,地址是 https://img.gwozai.email/。上传接口很简单:一次 multipart/form-data 的 POST 就能拿到图片访问路径。

接口信息

项目

值

URL

https://img.gwozai.email/upload

方法

POST

格式

multipart/form-data

文件字段名

file

是否需要认证

否(当前实例 uploadRequiresAuth 为 false)

curl 示例

curl -F "file=@/path/to/image.png" https://img.gwozai.email/upload

返回格式

接口返回一个 JSON 数组,src 是文件的访问路径:

[{ "src": "/file/abc123def456.png" }]

完整访问地址拼接为:

https://img.gwozai.email/file/abc123def456.png

Python 示例

import requests

url = "https://img.gwozai.email/upload"
files = {"file": open("/path/to/image.png", "rb")}
resp = requests.post(url, files=files)
data = resp.json()
print(f"图片地址: https://img.gwozai.email{data[0]['src']}")

JavaScript (Node.js) 示例

const fs = require('fs');
const FormData = require('form-data');
const axios = require('axios');

const form = new FormData();
form.append('file', fs.createReadStream('/path/to/image.png'));

const res = await axios.post('https://img.gwozai.email/upload', form, {
  headers: form.getHeaders()
});
console.log(`图片地址: https://img.gwozai.email${res.data[0].src}`);

补充说明

  • 当前实例不需要登录认证即可上传。如果以后配置了 UPLOAD_BASIC_USER 和 UPLOAD_BASIC_PASS,上传时需要加 Basic Auth:curl -u user:pass -F "file=@..." ...

  • 存储后端是 Telegram,单文件上限约 20MB,频道速率限制约 每分钟 20 条消息,大量批量上传需要控制节奏。

  • Cursor 里还配置了 Telegraph-Image MCP,对话中可以直接调用 upload_image 上传本地文件,批量用 upload_images,不必手写命令。