FishSpeech Docs
API Reference图像生成

图像生成

创建、查询和列出图像生成任务。

图像生成

图像接口使用异步任务模型。创建任务后轮询任务详情,成功后读取结果图像 URL。

创建任务

POST /v1/images/tasks
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
  "prompt": "一张产品海报,干净的工作室灯光",
  "model": "kitta-image-v1",
  "size": "16:9",
  "resolution": "1k",
  "referenceImageUrls": ["https://example.com/reference.png"]
}

referenceImageUrls 最多 16 张。具体可用模型以 GET /api/openapi.json 返回的 schema 为准。

查询任务

GET /v1/images/tasks/{taskId}
Authorization: Bearer YOUR_API_KEY

查询列表

GET /v1/images/tasks?limit=20&offset=0&status=succeeded
Authorization: Bearer YOUR_API_KEY

任务状态包括 pendingprocessingsucceededfailed。成功任务会返回 resultImageUrl

On this page