生成图片
使用 CometAPI Bria POST /bria/text-to-image,通过文本生成 1MP 的照片级写实图像,并支持增强和灵活的宽高比。
通过纯文本 Prompt 生成可安全用于商业用途的图像。对于在 CometAPI 上的首次请求,请发送Documentation Index
Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt
Use this file to discover all available pages before exploring further.
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.