> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cubeuaeai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GPT Image 1

> Generate an image from a text prompt using the GPT Image 1 model.



## OpenAPI

````yaml en/api-reference/model-api/openai/openapi/gpt-image-1/openapi.yaml POST /v1/images/generations
openapi: 3.1.0
info:
  title: GPT Image 1
  description: Use GPT Image 1 Generate an image
  version: 1.0.0
servers:
  - url: https://ai.cubeuaeai.com
security:
  - bearerAuth: []
paths:
  /v1/images/generations:
    post:
      summary: Generate an image
      description: Generate an image from a text prompt using the GPT Image 1 model.
      operationId: createGptImage1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - prompt
              properties:
                model:
                  type: string
                  enum:
                    - gpt-image-1
                  description: model ID
                  example: gpt-image-1
                prompt:
                  type: string
                  description: Image description text
                  example: An adorable cat in a spacesuit floating in the Milky Way
                'n':
                  type: integer
                  minimum: 1
                  maximum: 4
                  default: 1
                  description: Number of images to generate
                  example: 1
                size:
                  type: string
                  enum:
                    - 1024x1024
                    - 1536x1024
                    - 1024x1536
                    - auto
                  default: auto
                  description: Output image size
                  example: 1024x1024
                quality:
                  type: string
                  enum:
                    - low
                    - medium
                    - high
                  default: medium
                  description: Image quality
                  example: high
                output_format:
                  type: string
                  enum:
                    - png
                    - webp
                    - jpeg
                  default: png
                  description: Output image format
                  example: png
                background:
                  type: string
                  enum:
                    - transparent
                    - opaque
                  default: opaque
                  description: >-
                    Background setting. `transparent` for a transparent
                    background, `opaque` for an opaque background
                  example: opaque
                moderation:
                  type: string
                  enum:
                    - auto
                    - low
                  default: auto
                  description: Content moderation level
                  example: auto
                output_compression:
                  type: integer
                  minimum: 0
                  maximum: 100
                  description: Compression level for jpeg and webp (0-100%)
                  example: 80
      responses:
        '200':
          description: Image generated successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: Array of generated images
                    items:
                      type: object
                      properties:
                        b64_json:
                          type: string
                          description: Base64-encoded image data
                        revised_prompt:
                          type: string
                          description: Prompt rewritten by the model
        '400':
          description: Request error. Invalid parameters.
        '401':
          description: Unauthorized. The API key is invalid or missing.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````