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

# GPT Image 2 API Documentation

> GPT Image 2 API delivers near-perfect text rendering and hard world-knowledge realism with production-ready 4K output. It offers extreme instruction following and seamless pixel-level editing for flawless commercial assets. Integrate the GPT Image 2 API now.

Check out GPT Image 2 API pricing [here](https://api.pollo.ai/pricing?modelName=openai-gpt-image-2-0\&modelType=image), cheaper than Fal AI.


## OpenAPI

````yaml POST /v1/generation/openai/gpt-image-2/image
openapi: 3.0.3
info:
  title: Pollo | AI Video Collection
  description: >-
    ✨RESTful API Document. Model discovery: GET /api/v1/model-specs (public,
    keyless).
  version: 1.0.0
servers:
  - url: https://pollo.ai/api/platform
security: []
externalDocs:
  url: https://pollo.ai/api/platform/api/openapi.json
paths:
  /v1/generation/openai/gpt-image-2/image:
    post:
      tags:
        - Image
      summary: gpt-image-2
      operationId: v1-openai/gpt-image-2/image
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - input
              properties:
                input:
                  oneOf:
                    - type: object
                      properties:
                        images:
                          type: array
                          minItems: 1
                          items:
                            type: string
                            format: uri
                          maxItems: 16
                          description: >-
                            Reference image URLs (HTTP(S); base64 not allowed).
                            Supported formats: JPG/JPEG, PNG.
                        prompt:
                          type: string
                          maxLength: 32000
                          minLength: 1
                          description: Text prompt describing the content to generate.
                        aspectRatio:
                          type: string
                          enum:
                            - '1:1'
                            - '3:2'
                            - '2:3'
                            - '16:9'
                            - '9:16'
                            - '4:3'
                            - '3:4'
                            - '21:9'
                            - auto
                          default: auto
                          description: Output aspect ratio, as width:height (e.g. 16:9).
                        resolution:
                          type: string
                          enum:
                            - 1K
                            - 2K
                            - 4K
                          default: 1K
                          description: >-
                            Output resolution of the generated media (e.g. 720p,
                            1080p, 2K, 4K). Values are case-insensitive.
                        quality:
                          type: string
                          enum:
                            - low
                            - medium
                            - high
                          default: low
                          description: Output quality tier of the generation.
                      required:
                        - prompt
                      title: Image To Image
                    - type: object
                      properties:
                        prompt:
                          type: string
                          maxLength: 32000
                          minLength: 1
                          description: Text prompt describing the content to generate.
                        aspectRatio:
                          type: string
                          enum:
                            - '1:1'
                            - '3:2'
                            - '2:3'
                            - '16:9'
                            - '9:16'
                            - '4:3'
                            - '3:4'
                            - '21:9'
                            - auto
                          default: auto
                          description: Output aspect ratio, as width:height (e.g. 16:9).
                        resolution:
                          type: string
                          enum:
                            - 1K
                            - 2K
                            - 4K
                          default: 1K
                          description: >-
                            Output resolution of the generated media (e.g. 720p,
                            1080p, 2K, 4K). Values are case-insensitive.
                        quality:
                          type: string
                          enum:
                            - low
                            - medium
                            - high
                          default: low
                          description: Output quality tier of the generation.
                      required:
                        - prompt
                      title: Text To Image
                webhookUrl:
                  type: string
                  format: uri
                  description: >-
                    Webhook URL (HTTP(S)) that receives status callbacks when
                    the generation succeeds or fails.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  taskId:
                    type: string
                  status:
                    type: string
                    enum:
                      - waiting
                      - succeed
                      - failed
                      - processing
                required:
                  - taskId
                  - status
                additionalProperties: false
        default:
          $ref: '#/components/responses/error'
      security:
        - ApiKeyAuth: []
components:
  responses:
    error:
      description: Error response
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
              code:
                type: string
              issues:
                type: array
                items:
                  type: object
                  properties:
                    message:
                      type: string
                  required:
                    - message
                  additionalProperties: false
            required:
              - message
              - code
            additionalProperties: false
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key to authorize requests

````