Skip to main content
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"
    }
  ]
}
Generate commercial-safe images from a plain text prompt. For a first request on CometAPI, send prompt, keep num_results at 1, and start with aspect_ratio: "1:1" unless you already know the final layout you need.

Use this route when

  • You want a finished image in one call
  • You do not need masks, image inputs, or task polling
  • You want a photorealistic Bria path that is easier to operationalize through CometAPI

Start with this request

  • Keep the prompt short and concrete
  • Use num_results: 1 for your first smoke test
  • Start with aspect_ratio: "1:1" unless the target layout is already fixed
  • Download returned URLs promptly if you need long retention

Response behavior on CometAPI

Bria’s official docs describe a broader generation pipeline and discuss async status flows. On CometAPI, this route uses a simplified JSON request and, in current smoke tests, returned a final result array immediately rather than a request_id plus status_url.
CometAPI proxies Bria capability rather than mirroring Bria’s public API field-for-field. Use the request and response shapes shown in this page’s API reference and Playground as the source of truth for integration.

Authorizations

Authorization
string
header
required

Bearer token authentication. Use your CometAPI key.

Body

application/json
prompt
string
required

English text prompt for image generation.

Example:

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

num_results
integer
default:1

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

aspect_ratio
enum<string>
default:1:1

Requested output aspect ratio.

Available options:
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
default:30

Optional refinement step count.

text_guidance_scale
integer
default:5

Optional prompt adherence setting.

medium
enum<string>

Optional visual medium.

Available options:
photography,
art
prompt_enhancement
boolean
default:false

Optional prompt enhancement switch.

enhance_image
boolean
default:false

Optional image detail enhancement switch.

prompt_content_moderation
boolean
default:false

Optional moderation switch.

ip_signal
boolean
default:false

Optional IP warning flag.

sync
boolean
default:false

Optional sync hint. Current CometAPI smoke tests returned final results immediately without setting this field.

Response

200 - application/json

Image generation result.

result
object[]
required