メインコンテンツへスキップ
POST
/
bria
/
text-to-image
Generate Bria images
curl --request POST \
  --url https://api.cometapi.com/bria/text-to-image \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "A paper boat floating on calm water at sunrise."
}
'
{
  "result": [
    {
      "urls": [
        "https://example.com/generated.png"
      ],
      "seed": 278741175,
      "uuid": "27c39b06-1dfe-11f1-ad57-6ac2c454c04d_278741175"
    }
  ]
}

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.

プレーンなテキストプロンプトから商用利用に適した安全な画像を生成します。CometAPI で最初のリクエストを送る場合は、prompt を指定し、num_results1 のままにして、必要な最終レイアウトがすでに決まっている場合を除き、aspect_ratio: "1:1" から始めてください。

このルートを使う場面

  • 1 回の呼び出しで完成した画像が欲しい場合
  • マスク、画像入力、またはタスクのポーリングが不要な場合
  • CometAPI を通じてより運用しやすい、フォトリアルな Bria のパスを使いたい場合

このリクエストから始める

  • プロンプトは短く具体的にする
  • 最初のリクエストでは num_results: 1 を使用する
  • 対象レイアウトがすでに固定されている場合を除き、aspect_ratio: "1:1" から始める
  • 長期保持が必要な場合は、返された URL をすみやかにダウンロードする

CometAPI でのレスポンスの挙動

Bria の公式ドキュメントでは、より広範な生成パイプラインが説明されており、非同期のステータスフローについても扱われています。CometAPI では、このルートは簡略化された JSON リクエストを使用し、request_idstatus_url を返すのではなく、最終的な result 配列を即座に返します。
CometAPI は Bria の公開 API をフィールド単位でそのまま再現するのではなく、Bria の機能をプロキシしています。連携時の正しい基準として、このページの 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[]
必須