> ## 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.

# Bria 이미지 생성

> CometAPI Bria POST /bria/text-to-image를 사용해 텍스트로부터 향상 기능과 유연한 종횡비를 갖춘 1MP 포토리얼리스틱 이미지를 생성합니다.

간단한 텍스트 프롬프트(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 요청을 사용하며, `request_id`와 `status_url`을 반환하는 대신 최종 `result` 배열을 즉시 반환합니다.

<Note>
  CometAPI는 Bria의 기능을 프록시하며, Bria의 공개 API를 필드 단위로 그대로 반영하지는 않습니다. 통합 시에는 이 페이지의 API 레퍼런스와 Playground에 표시된 요청 및 응답 형상을 기준으로 사용하세요.
</Note>


## OpenAPI

````yaml api/openapi/image/bria/post-generate-image.openapi.json POST /bria/text-to-image
openapi: 3.1.0
info:
  title: Generate Image API
  version: 1.0.0
  description: >-
    Generate Bria text-to-image outputs through CometAPI. This route returns
    final image URLs directly.
servers:
  - url: https://api.cometapi.com
security:
  - bearerAuth: []
paths:
  /bria/text-to-image:
    post:
      summary: Generate Bria images
      description: >-
        Create one or more Bria images from a text prompt. For the most
        predictable first request, keep num_results at 1 and use a square aspect
        ratio.
      operationId: generate_image
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - prompt
              properties:
                prompt:
                  type: string
                  description: English text prompt for image generation.
                  example: A paper boat floating on calm water at sunrise.
                num_results:
                  type: integer
                  description: >-
                    Number of images to generate. Use 1 for the simplest
                    integration test.
                  default: 1
                aspect_ratio:
                  type: string
                  description: Requested output aspect ratio.
                  enum:
                    - '1:1'
                    - '2:3'
                    - '3:2'
                    - '3:4'
                    - '4:3'
                    - '4:5'
                    - '5:4'
                    - '9:16'
                    - '16:9'
                  default: '1:1'
                seed:
                  type: integer
                  description: Optional seed for reproducible results.
                negative_prompt:
                  type: string
                  description: Optional exclusions for the generated image.
                steps_num:
                  type: integer
                  description: Optional refinement step count.
                  default: 30
                text_guidance_scale:
                  type: integer
                  description: Optional prompt adherence setting.
                  default: 5
                medium:
                  type: string
                  description: Optional visual medium.
                  enum:
                    - photography
                    - art
                prompt_enhancement:
                  type: boolean
                  description: Optional prompt enhancement switch.
                  default: false
                enhance_image:
                  type: boolean
                  description: Optional image detail enhancement switch.
                  default: false
                prompt_content_moderation:
                  type: boolean
                  description: Optional moderation switch.
                  default: false
                ip_signal:
                  type: boolean
                  description: Optional IP warning flag.
                  default: false
                sync:
                  type: boolean
                  description: >-
                    Optional sync hint. CometAPI returns final results
                    immediately without setting this field.
                  default: false
              default:
                prompt: A paper boat floating on calm water at sunrise.
                num_results: 1
                aspect_ratio: '1:1'
            examples:
              Validated request:
                summary: Validated request
                value:
                  prompt: A paper boat floating on calm water at sunrise.
                  num_results: 1
                  aspect_ratio: '1:1'
      responses:
        '200':
          description: Image generation result.
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                properties:
                  result:
                    type: array
                    items:
                      type: object
                      required:
                        - urls
                        - seed
                        - uuid
                      properties:
                        urls:
                          type: array
                          items:
                            type: string
                        seed:
                          type: integer
                        uuid:
                          type: string
                example:
                  result:
                    - urls:
                        - https://example.com/generated.png
                      seed: 278741175
                      uuid: 27c39b06-1dfe-11f1-ad57-6ac2c454c04d_278741175
              example:
                result:
                  - urls:
                      - >-
                        https://temp.bria.ai/api/generate_image/A_paper_boat_..._seed_934469972.png
                    seed: 934469972
                    uuid: <uuid>
      x-codeSamples:
        - lang: Shell
          label: Default
          source: |
            curl https://api.cometapi.com/bria/text-to-image \
              -H "Authorization: Bearer $COMETAPI_KEY" \
              -H "Content-Type: application/json" \
              -d '{
                  "prompt": "A paper boat floating on calm water at sunrise.",
                  "num_results": 1,
                  "aspect_ratio": "1:1"
                }'
        - lang: Python
          label: Default
          source: >
            import os

            import requests


            response = requests.post(
                "https://api.cometapi.com/bria/text-to-image",
                headers={"Authorization": "Bearer " + os.environ["COMETAPI_KEY"]},
                json={
                        "prompt": "A paper boat floating on calm water at sunrise.",
                        "num_results": 1,
                        "aspect_ratio": "1:1"
                },
            )


            print(response.json())  # the route responds synchronously with
            result[].urls
        - lang: JavaScript
          label: Default
          source: >
            const response = await
            fetch("https://api.cometapi.com/bria/text-to-image", {
                method: "POST",
                headers: {
                    Authorization: `Bearer ${process.env.COMETAPI_KEY}`,
                    "Content-Type": "application/json",
                },
                body: JSON.stringify({
                        "prompt": "A paper boat floating on calm water at sunrise.",
                        "num_results": 1,
                        "aspect_ratio": "1:1"
                    }),
            });


            console.log(await response.json()); // the route responds
            synchronously with result[].urls
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token authentication. Use your CometAPI key.

````