簡潔的 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 權限。