生成 Bria 图像
使用 CometAPI Bria POST /bria/text-to-image 通过文本生成 1MP 照片级真实感图像,并支持增强与灵活的宽高比。
prompt,将 num_results 保持为 1,并从 aspect_ratio: "1:1" 开始,除非你已经明确知道所需的最终布局。
在以下情况使用此路由
- 你希望通过一次调用获得最终图像
- 你不需要蒙版、图像输入或任务轮询
- 你希望使用一个更易于通过 CometAPI 落地的照片级真实感 Bria 路径
从这个请求开始
- 保持 Prompt 简短且具体
- 首次请求使用
num_results: 1 - 从
aspect_ratio: "1:1"开始,除非目标布局已经固定 - 如果你需要长期保留,请及时下载返回的 URL
CometAPI 上的响应行为
Bria 的官方文档描述了更完整的生成流程,并讨论了异步状态流。在 CometAPI 上,此路由使用简化的 JSON 请求,并会立即返回最终的result 数组,而不是返回 request_id 加 status_url。
授权
Bearer token authentication. Use your CometAPI key.
请求体
English text prompt for image generation.
"A paper boat floating on calm water at sunrise."
Number of images to generate. Use 1 for the simplest integration test.
Requested output aspect ratio.
1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9 Optional seed for reproducible results.
Optional exclusions for the generated image.
Optional refinement step count.
Optional prompt adherence setting.
Optional visual medium.
photography, art Optional prompt enhancement switch.
Optional image detail enhancement switch.
Optional moderation switch.
Optional IP warning flag.
Optional sync hint. CometAPI returns final results immediately without setting this field.
响应
Image generation result.