> ## 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

> 使用 GPT Image 2 的高性价比版本 gpt-image-2-c 根据文本提示词生成图片。支持 `response_format`。不支持 `n` 参数（每次请求生成 1 张图片）。



## OpenAPI

````yaml zh/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: 通过 Anyfast API 使用 gpt-image-2-c（高性价比版本）生成图片
  version: 1.0.0
servers:
  - url: https://www.anyfast.ai
security:
  - bearerAuth: []
paths:
  /v1/images/generations:
    post:
      summary: 生成图片
      description: >-
        使用 GPT Image 2 的高性价比版本 gpt-image-2-c 根据文本提示词生成图片。支持
        `response_format`。不支持 `n` 参数（每次请求生成 1 张图片）。
      operationId: createGptImage2c
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - prompt
              properties:
                model:
                  type: string
                  enum:
                    - gpt-image-2-c
                  description: 模型 ID。
                  example: gpt-image-2-c
                prompt:
                  type: string
                  description: 图像描述文本。
                  example: 一座未来城市的日落天际线，天空中有飞行汽车
                size:
                  type: string
                  default: 1024x1024
                  description: >-
                    输出图片尺寸，格式 `{宽}x{高}`，支持灵活分辨率——边长须为 16 的倍数，宽高比 ≤ 3:1，总像素数
                    655,360–8,294,400，最大单边 3,840px。
                  example: 1024x1024
                quality:
                  type: string
                  enum:
                    - low
                    - medium
                    - high
                  default: medium
                  description: 图片质量。
                  example: high
                output_format:
                  type: string
                  enum:
                    - png
                    - jpeg
                  default: png
                  description: 输出图片格式。
                  example: png
                moderation:
                  type: string
                  enum:
                    - auto
                    - low
                  default: auto
                  description: 内容审核级别。
                  example: auto
                output_compression:
                  type: integer
                  minimum: 0
                  maximum: 100
                  description: jpeg 格式的压缩级别（0–100%）。
                  example: 80
                response_format:
                  type: string
                  enum:
                    - url
                    - b64_json
                  default: url
                  description: 响应格式，可选 `url` 或 `b64_json`。
                  example: url
      responses:
        '200':
          description: 图片生成成功。
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: 生成的图片数组。
                    items:
                      type: object
                      properties:
                        url:
                          type: string
                          description: 生成图片的预签名 URL（`response_format=url` 时返回）。
                        b64_json:
                          type: string
                          description: Base64 编码的图片数据（`response_format=b64_json` 时返回）。
                        revised_prompt:
                          type: string
                          description: 模型实际使用的修改后提示词。
        '400':
          description: 请求错误。参数无效。
        '401':
          description: 未授权。API 密钥无效或缺失。
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````