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

# Submit GPT Image 2.5 task

> POST a GPT Image 2.5 generation or image editing task

## Submit task

`prompt` is required. Omit `image_urls` for generation, or provide up to 16 HTTP(S) URLs or base64 data URIs (JPEG, PNG, or WebP) for editing. `version` selects `flare` (default) or `sunburst`. Each accepted request produces one image.

```bash theme={null}
curl --fail-with-body --silent --show-error \
  -X POST https://api.wizzx.ai/api/v1/task/submit/gpt-image-2.5 \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  --data '{
    "prompt": "An orange mechanical keyboard on a dark desk",
    "version": "flare",
    "aspect_ratio": "16:9",
    "resolution": "2K"
  }'
```

The gateway charges per image by `resolution`: 1K = 13, 2K = 21, 4K = 32 credits. `version`, `aspect_ratio`, and reference images do not change the price. Read `/pricing` for the current amount.


## OpenAPI

````yaml POST /api/v1/task/submit/gpt-image-2.5
openapi: 3.0.3
info:
  title: Wizzx AI API
  version: 1.2.0
  description: >-
    Wizzx asynchronous image, video, and audio generation API. Model keys are
    placed in the submit URL. Submit returns a Wizzx task_id; poll that ID
    through /api/v1/task/status. Authentication uses a Wizzx API key in the
    Authorization: Bearer <key> header.
  license:
    name: MIT
    url: https://github.com/tonyljx/documentation/blob/main/LICENSE
servers:
  - url: https://api.wizzx.ai
    description: Production API
security: []
tags:
  - name: Discovery
    description: Public model and pricing discovery.
  - name: Credits
    description: Authenticated credit balance.
  - name: Image generation
    description: Asynchronous image tasks.
  - name: Video generation
    description: Asynchronous video tasks.
  - name: Audio generation
    description: Asynchronous music and audio tasks.
  - name: Tasks
    description: Asynchronous task status.
  - name: Legacy models
    description: >-
      Compatibility-only models hidden from /pricing. Do not select these
      automatically.
paths:
  /api/v1/task/submit/gpt-image-2.5:
    post:
      tags:
        - Image generation
      summary: Submit GPT Image 2.5 task
      description: >-
        Creates one asynchronous paid task. Save data.task_id and poll the
        status endpoint. Do not automatically retry an ambiguous submit.
      operationId: submitGptImage25Task
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GPTImage25SubmitRequest'
            example:
              prompt: An orange mechanical keyboard on a dark desk
              version: flare
              resolution: 2K
      responses:
        '200':
          description: Task accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskSubmitResponse'
        '400':
          description: Malformed JSON or binding validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing, invalid, or revoked API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: Insufficient credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '413':
          description: Request body exceeds the configured limit
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Model-specific validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers:
            X-Retry-After:
              description: Retry delay in seconds.
              schema:
                type: integer
                minimum: 0
        '500':
          description: Internal or upstream submission error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Service or model temporarily unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    GPTImage25SubmitRequest:
      type: object
      additionalProperties: false
      required:
        - prompt
      description: >-
        Omit image_urls for text-to-image; provide 1-16 images for
        image-to-image editing. One image per request. version, aspect_ratio,
        and reference images do not change the price.
      properties:
        prompt:
          type: string
          minLength: 1
          description: Required prompt. The gateway enforces a 20000-byte UTF-8 limit.
          x-wizzx-maxBytes: 20000
        version:
          type: string
          enum:
            - flare
            - sunburst
          default: flare
          description: >-
            flare is faster; sunburst gives finer edits for product, ad, and
            multi-turn editing. Same price.
        image_urls:
          type: array
          maxItems: 16
          items:
            type: string
            pattern: ^(https?://|data:image/(jpeg|png|webp);base64,)
            description: HTTP(S) URL or base64 data URI. JPEG, PNG, or WebP only.
        aspect_ratio:
          type: string
          enum:
            - auto
            - '1:1'
            - '16:9'
            - '9:16'
            - '4:3'
            - '3:4'
            - '3:2'
            - '2:3'
            - '5:4'
            - '4:5'
            - '21:9'
          default: auto
        resolution:
          type: string
          enum:
            - 1K
            - 2K
            - 4K
          default: 1K
          description: 'Billed per image: 1K = 13, 2K = 21, 4K = 32 credits.'
    TaskSubmitResponse:
      type: object
      required:
        - code
        - message
        - data
        - request_id
      properties:
        code:
          type: integer
          enum:
            - 0
        message:
          type: string
          example: success
        data:
          $ref: '#/components/schemas/TaskSubmitData'
        request_id:
          type: string
          format: uuid
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
        request_id:
          type: string
          format: uuid
        retry_after:
          type: integer
          format: int64
          minimum: 0
          description: Retry delay in seconds. Present for rate-limit errors.
    TaskSubmitData:
      type: object
      required:
        - task_id
        - model_key
        - credits_deducted
      properties:
        task_id:
          type: string
          format: uuid
          description: Wizzx task ID used for status polling.
        model_key:
          type: string
        credits_deducted:
          type: integer
          minimum: 0
          description: Credits reserved when the task is accepted.
        provider_task_id:
          type: string
          description: Diagnostic field returned only when debug=1.
        provider_key:
          type: string
          description: Diagnostic field returned only when debug=1.
    ErrorDetail:
      type: object
      required:
        - message
        - type
        - param
        - code
      properties:
        message:
          type: string
        type:
          type: string
          enum:
            - invalid_request_error
            - authentication_error
            - insufficient_quota
            - permission_denied
            - not_found_error
            - conflict_error
            - unprocessable_entity_error
            - rate_limit_error
            - server_error
            - service_unavailable
        param:
          type: string
          nullable: true
        code:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Wizzx API key. This is not a JWT.

````