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

# 生成图像(qwen-image)

>  百炼qwen-image系列图片生成



## OpenAPI

````yaml /api.json post /v1/images/generations
openapi: 3.0.1
info:
  title: TKHub API
  description: TKHub 平台 API 接口文档
  version: 1.0.0
servers:
  - url: https://api.tkhub.ai
    description: 生产环境
  - url: https://api-test.tkhub.ai
    description: 测试环境
security:
  - bearerAuth: []
paths:
  /v1/images/generations:
    post:
      tags:
        - 图片生成/Qwen千问
      summary: 生成图像(qwen-image)
      description: ' 百炼qwen-image系列图片生成'
      operationId: createImage
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                input:
                  type: object
                  properties:
                    messages:
                      type: array
                      items:
                        type: object
                        properties:
                          role:
                            type: string
                          content:
                            type: array
                            items:
                              type: object
                              properties:
                                text:
                                  type: string
                  required:
                    - messages
                parameters:
                  type: object
                  properties:
                    negative_prompt:
                      type: string
                    prompt_extend:
                      type: boolean
                    watermark:
                      type: boolean
                    size:
                      type: string
              required:
                - model
                - input
            example:
              model: qwen-image-plus
              input:
                messages:
                  - role: user
                    content:
                      - text: >-
                          一副典雅庄重的对联悬挂于厅堂之中，房间是个安静古典的中式布置，桌子上放着一些青花瓷，对联上左书“义本生知人机同道善思新”，右书“通云赋智乾坤启数高志远”，
                          横批“智启通义”，字体飘逸，在中间挂着一幅中国风的画作，内容是岳阳楼。
              parameters:
                negative_prompt: ''
                prompt_extend: true
                watermark: false
                size: 1328*1328
      responses:
        '200':
          description: 成功生成图像
          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: |
        使用 Bearer Token 认证。
        格式: `Authorization: Bearer sk-xxxxxx`

````