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

# gpt-image-2-c

> Generate images from text prompts using gpt-image-2-c, the cost-effective variant of GPT Image 2. Supports `response_format`. Does not support the `n` parameter (one image per request).



## OpenAPI

````yaml api-reference/model-api/openai/openapi/gpt-image-2-c/openapi.yaml POST /v1/images/generations
openapi: 3.1.0
info:
  title: gpt-image-2-c
  description: Generate images using gpt-image-2-c (cost-effective variant) via Anyfast API
  version: 1.0.0
servers:
  - url: https://www.anyfast.ai
security:
  - bearerAuth: []
paths:
  /v1/images/generations:
    post:
      summary: Generate Images
      description: >-
        Generate images from text prompts using gpt-image-2-c, the
        cost-effective variant of GPT Image 2. Supports `response_format`. Does
        not support the `n` parameter (one image per request).
      operationId: createGptImage2c
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - prompt
              properties:
                model:
                  type: string
                  enum:
                    - gpt-image-2-c
                  description: Model ID.
                  example: gpt-image-2-c
                prompt:
                  type: string
                  description: Text description of the desired image.
                  example: A futuristic city skyline at sunset with flying cars
                size:
                  type: string
                  default: 1024x1024
                  description: >-
                    Output image size in `{width}x{height}` format. Supports
                    flexible resolutions — both edges must be multiples of 16,
                    aspect ratio ≤ 3:1, total pixels between 655,360 and
                    8,294,400, max edge 3,840px.
                  example: 1024x1024
                quality:
                  type: string
                  enum:
                    - low
                    - medium
                    - high
                  default: medium
                  description: Image quality.
                  example: high
                output_format:
                  type: string
                  enum:
                    - png
                    - jpeg
                  default: png
                  description: Output image format.
                  example: png
                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 format (0-100%).
                  example: 80
                response_format:
                  type: string
                  enum:
                    - url
                    - b64_json
                  default: url
                  description: Response format. Either `url` or `b64_json`.
                  example: url
      responses:
        '200':
          description: Images generated successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: Array of generated images.
                    items:
                      type: object
                      properties:
                        url:
                          type: string
                          description: >-
                            Pre-signed URL of the generated image (when
                            `response_format=url`).
                        b64_json:
                          type: string
                          description: >-
                            Base64-encoded image data (when
                            `response_format=b64_json`).
                        revised_prompt:
                          type: string
                          description: The revised prompt used.
        '400':
          description: Bad request. Invalid parameters.
        '401':
          description: Unauthorized. Invalid or missing API key.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````