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

# Generate Images

<Tip>
  This endpoint integrates a third-party model. For detailed parameter information, please refer to the official documentation at [OpenAI Docs](https://platform.openai.com/docs/api-reference/images/create).
</Tip>


## OpenAPI

````yaml api-reference/endpoint/image/openai_openapi.json post /v1/images/generations
openapi: 3.0.1
info:
  title: AI model interface
  description: ''
  version: 1.0.0
servers:
  - url: https://api.ai.cc
security:
  - BearerAuth: []
tags:
  - name: OpenAI Image
paths:
  /v1/images/generations:
    post:
      tags:
        - OpenAI Image
      summary: Generate an image (OpenAI)
      operationId: openaicreateImage
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                prompt:
                  type: string
                moderation:
                  type: string
                  description: >-
                    Control the content-moderation level for images generated by
                    the GPT image models. Must be either low for less
                    restrictive filtering or auto
                'n':
                  type: integer
                  description: The number of images to generate. Must be between 1 and 10
                output_format:
                  type: string
                  description: >-
                    The format in which the generated images are returned. This
                    parameter is only supported for the GPT image models. Must
                    be one of png, jpeg, or webp.
                partial_images:
                  type: integer
                  description: >-
                    The number of partial images to generate. This parameter is
                    used for streaming responses that return partial images.
                    Value must be between 0 and 3. When set to 0, the response
                    will be a single image sent in one streaming event.
                quality:
                  type: string
                  description: >-
                    The quality of the image that will be generated. 

                    auto (default value) will automatically select the best
                    quality for the given model.

                    high, medium and low are supported for the GPT image models.

                    hd and standard are supported for dall-e-3.

                    standard is the only option for dall-e-2.
                response_format:
                  type: string
                  description: >-
                    The format in which generated images with dall-e-2 and
                    dall-e-3 are returned. Must be one of url or b64_json. URLs
                    are only valid for 60 minutes after the image has been
                    generated. This parameter isn't supported for the GPT image
                    models, which always return base64-encoded images.
                size:
                  type: string
                  description: >-
                    The size of the generated images. Must be one of 1024x1024,
                    1536x1024 (landscape), 1024x1536 (portrait), or auto
                    (default value) for the GPT image models, one of 256x256,
                    512x512, or 1024x1024 for dall-e-2, and one of 1024x1024,
                    1792x1024, or 1024x1792 for dall-e-3.
              required:
                - model
                - prompt
            examples:
              Default:
                summary: examples
                value:
                  model: gpt-image-1
                  prompt: A cute baby sea otter
                  'n': 1
                  size: 1024x1024
      responses:
        '200':
          description: Image generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImageResponse'
          headers: {}
      deprecated: false
      security:
        - BearerAuth: []
components:
  schemas:
    ImageResponse:
      type: object
      properties:
        created:
          type: integer
        data:
          type: array
          items:
            type: object
            properties:
              url:
                type: string
              b64_json:
                type: string
              revised_prompt:
                type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        Authentication is done using Bearer Token. 
        Format: `Authorization: Bearer sk-xxxxxx`

````