开发者 API参考

ImageToURL开发者说明。公开API密钥上传尚未上线;目前请使用网站上传器生成正式链接。

快速入门

ImageToURL API基于REST架构。我们的API具有可预测的面向资源的URL,返回JSON编码的响应,并使用标准HTTP响应代码、身份验证和方法。

基础URL 生产环境
https://imagetourl.cloud/api

身份验证

ImageToURL API使用API密钥进行请求身份验证。您可以在控制面板中查看和管理API密钥。API密钥拥有很多权限,请确保妥善保管!

Public API-key uploads are not live yet. The current upload route is used by the ImageToURL website uploader and requires a same-site browser request from imagetourl.cloud.

上传图片

POST /api/upload

通过网站上传即可获得CDN缓存URL。访客上传会过期;已登录用户可在上传前选择永久链接。

参数

名称 类型 描述
file binary 图片文件(PNG、JPG、WebP),最大50MB。
expires_in string 可选的存活时间(秒)。
adblock string 目标文件夹名称。
响应示例 200 OK
{ "success": true, "data": { "id": "img_ab12cd34", "url": "https://imagetourl.cloud/ab12cd34.png", "filename": "my_image.png", "size": 102488, "mimetype": "image/png", "created_at": "2026-07-06T10:00:00.000Z" } }