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

# 经典绘图

> 使用文本描述生成图像



## OpenAPI

````yaml /api-reference/images/Image.json POST /v1/images/generations
openapi: 3.1.0
info:
  title: API
  version: 1.0.0
  description: API 文档，支持绘图、语音生成、视频生成、音乐生成等多种 AIGC 接口。
servers:
  - url: https://aiapi.xiaoliu.fun
    description: 生产服务器
security:
  - bearerAuth: []
paths:
  /v1/images/generations:
    post:
      tags:
        - 绘图模型
      summary: 绘图
      description: 使用文本描述生成图像
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                prompt:
                  type: string
                  description: 所需图像的文本描述
                model:
                  type: string
                  description: 模型名称
                size:
                  type: string
                  description: 生成图像的大小，格式为“长x宽”
              required:
                - prompt
                - model
                - size
      responses:
        '200':
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                properties:
                  created:
                    type: integer
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        url:
                          type: string
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````