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

# gpt-image-2.5 · Text-to-image

> Generates images from a text prompt. Returns base64-encoded image data.



## OpenAPI

````yaml api-reference/model-api/openai/gpt-image-2-5/openapi.yaml POST /v1/images/generations
openapi: 3.1.0
info:
  title: GPT Image 2.5
  description: >-
    OpenAI GPT Image 2.5 image generation and editing via the Upmore
    OpenAI-compatible API
  version: 1.0.0
servers:
  - url: https://api.upmore.net
security:
  - bearerAuth: []
paths:
  /v1/images/generations:
    post:
      summary: Generate image
      description: Generates images from a text prompt. Returns base64-encoded image data.
      operationId: createImageGPTImage25
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - prompt
              properties:
                model:
                  type: string
                  enum:
                    - gpt-image-2.5-flare
                    - gpt-image-2.5-sunburst
                  example: gpt-image-2.5-flare
                  description: The image model to use. Both model IDs are interchangeable.
                prompt:
                  type: string
                  example: A red fox sitting in a snowy forest at dusk, photorealistic
                  description: Text description of the desired image.
                'n':
                  type: integer
                  minimum: 1
                  maximum: 10
                  default: 1
                  description: Number of images to generate.
                size:
                  type: string
                  example: 1536x1024
                  description: >-
                    {width}x{height}. Edges must be multiples of 16, aspect
                    ratio <= 3:1, total pixels 655,360-8,294,400, max edge
                    3,840px. Omit to let the model choose (~1.3M pixels).
                quality:
                  type: string
                  enum:
                    - low
                    - medium
                    - high
                    - auto
                  default: low
                  description: Rendering quality.
                background:
                  type: string
                  enum:
                    - opaque
                    - transparent
                    - auto
                  default: opaque
                  description: Background treatment. Use png output with transparent.
                output_format:
                  type: string
                  enum:
                    - png
                    - jpeg
                  default: png
                  description: Output image format. webp is not supported.
                output_compression:
                  type: integer
                  minimum: 0
                  maximum: 100
                  description: Compression level for jpeg output.
                moderation:
                  type: string
                  enum:
                    - auto
                    - low
                  default: auto
                  description: Content moderation strictness.
                stream:
                  type: boolean
                  default: false
                  description: Stream partial images as server-sent events.
                partial_images:
                  type: integer
                  description: Number of preview frames to request when stream is true.
      responses:
        '200':
          description: Images generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImageResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ImageResponse:
      type: object
      properties:
        created:
          type: integer
          description: Unix timestamp of the generation.
        background:
          type: string
          description: Background treatment used.
        output_format:
          type: string
          description: Format of the returned images.
        quality:
          type: string
          description: Quality actually used.
        size:
          type: string
          description: Resolution actually used.
        data:
          type: array
          items:
            type: object
            properties:
              b64_json:
                type: string
                description: Base64-encoded image data.
        usage:
          type: object
          properties:
            input_tokens:
              type: integer
            input_tokens_details:
              type: object
              properties:
                image_tokens:
                  type: integer
                text_tokens:
                  type: integer
            output_tokens:
              type: integer
            total_tokens:
              type: integer
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````