OpenAI 兼容图像生成(常见)
示例
model 替换为平台上架的图片模型 ID。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
FocusAPI Images API 附录参考:POST /v1/images/generations 路径、常见字段、返回结果、异步任务和错误处理。
POST /v1/images/generations
curl https://www.focusapi.cn/v1/images/generations \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "dall-e-3",
"prompt": "A minimal blue icon of a cloud",
"n": 1,
"size": "1024x1024"
}'
model 替换为平台上架的图片模型 ID。
| 项目 | 说明 |
|---|---|
| 模型名 | 必须与模型广场一致 |
size / quality | 部分模型仅支持特定尺寸,以模型文档为准 |
| 异步任务 | 部分视频/图像厂商为异步任务,需轮询任务 ID(见模型说明) |
