Skip to main content
POST
cURL
通过纯文本 Prompt 生成可安全用于商业场景的图像。对于在 CometAPI 上的首次请求,请发送 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_idstatus_url
CometAPI 代理的是 Bria 的能力,而不是逐字段镜像 Bria 的公共 API。集成时,请以本页 API 参考和 Playground 中展示的请求与响应结构为准。

授权

Authorization
string
header
必填

Bearer token authentication. Use your CometAPI key.

请求体

application/json
prompt
string
必填

English text prompt for image generation.

示例:

"A paper boat floating on calm water at sunrise."

num_results
integer
默认值:1

Number of images to generate. Use 1 for the simplest integration test.

aspect_ratio
enum<string>
默认值:1:1

Requested output aspect ratio.

可用选项:
1:1,
2:3,
3:2,
3:4,
4:3,
4:5,
5:4,
9:16,
16:9
seed
integer

Optional seed for reproducible results.

negative_prompt
string

Optional exclusions for the generated image.

steps_num
integer
默认值:30

Optional refinement step count.

text_guidance_scale
integer
默认值:5

Optional prompt adherence setting.

medium
enum<string>

Optional visual medium.

可用选项:
photography,
art
prompt_enhancement
boolean
默认值:false

Optional prompt enhancement switch.

enhance_image
boolean
默认值:false

Optional image detail enhancement switch.

prompt_content_moderation
boolean
默认值:false

Optional moderation switch.

ip_signal
boolean
默认值:false

Optional IP warning flag.

sync
boolean
默认值:false

Optional sync hint. CometAPI returns final results immediately without setting this field.

响应

200 - application/json

Image generation result.

result
object[]
必填