简洁的 RESTful 接口
两个端点,Bearer Token 认证,JSON 输入输出。使用 cURL、JavaScript 或 Python 几分钟即可上手,无需 SDK。
一个模型,统一 $0.05/次。文生图和图生图价格相同,无差异。
text-to-image根据文字描述生成图片。描述你想要的内容,AI 为你创作。
image-to-image用文字指令编辑现有图片。上传照片并描述需要的修改。
1:116:99:16自定义尺寸1K2K310 MBJPEG, PNG, WebP2,000 chars{ "aspect_ratio": "1:1" // 1:1, 16:9, 9:16 "resolution": "2K" // 1K, 2K "width": 1024 // custom width "height": 1024 // custom height "sub_scene": "watermark_removal" }
将 AI 图片编辑集成到你的产品所需的一切,简洁的 API 和透明的定价。
两个端点,Bearer Token 认证,JSON 输入输出。使用 cURL、JavaScript 或 Python 几分钟即可上手,无需 SDK。
透明的按量计费。无月度最低消费,无隐藏费用,无意外扣款。从原型到生产无缝扩展。
提交编辑任务后轮询获取结果。平均响应时间不到 10 秒。内置自动重试,为生产环境而设计。
API 密钥认证、速率限制、CORS 防护和请求校验。你的数据安全处理,绝不存储。
智能抠图、风格迁移、AI 换装、照片修复、物体移除、人像美颜、上色等——全部通过一个 API 端点实现。
提交编辑任务,然后轮询结果。就这么简单。
使用 FireRed Image Edit 模型创建 AI 图片编辑任务。
| Parameter | Type | Required | Description |
|---|---|---|---|
| mediaType | string | optional | 媒体类型(默认 image) |
| model | string | optional | 模型名称(默认 firered-image-edit) |
| prompt | string | required | 编辑指令(如 remove the background、change hair color) |
| scene | string | required | 场景类型:image-to-image 或 text-to-image |
| options | object | optional | 附加选项:resolution、aspect_ratio 等 |
mediaTypestring媒体类型(默认 image)
modelstring模型名称(默认 firered-image-edit)
promptstringrequired编辑指令(如 remove the background、change hair color)
scenestringrequired场景类型:image-to-image 或 text-to-image
optionsobject附加选项:resolution、aspect_ratio 等
成功响应
{ "code": 0, "data": { "taskId": "..." } }复制粘贴即用的代码示例。替换 API 密钥即可运行。
| 1 | curl -X POST https://firered-image.com/api/v1/generate \ |
| 2 | -H "Authorization: Bearer sk-xxxxx" \ |
| 3 | -H "Content-Type: application/json" \ |
| 4 | -d '{ |
| 5 | "mediaType": "image", |
| 6 | "model": "firered-image-edit", |
| 7 | "prompt": "remove the background and replace with a sunset beach", |
| 8 | "scene": "image-to-image", |
| 9 | "options": { "aspect_ratio": "1:1", "resolution": "2K" } |
| 10 | }' |
| 11 | |
| 12 | # Poll result |
| 13 | curl https://firered-image.com/api/v1/task/{taskId}?refresh=1 \ |
| 14 | -H "Authorization: Bearer sk-xxxxx" |
创建 API 密钥,立即开始构建。需要批量定价或有疑问?随时联系我们。
告诉我们你的使用场景,我们会尽快为你开通 API 权限。