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

# Midjourney Describe API 文档

> 通过 Midjourney 图像描述接口, 上传图片的画面内容并返回可用于生成的提示词建议，适合做反向提示词提取和创意拆解。



## OpenAPI

````yaml openapi/cn/midjourney.json POST /midjourney/v1/describe
openapi: 3.1.0
info:
  title: TTAPI API DOCS
  version: 1.0.0
  description: Midjourney 图片生成相关接口
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /midjourney/v1/describe:
    post:
      description: 上传图像，并根据该图像生成四个提示信息。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DescribeRequest'
      responses:
        '200':
          $ref: '#/components/responses/SuccessResponse'
        '400':
          $ref: '#/components/responses/400Response'
        '401':
          $ref: '#/components/responses/401Response'
      security:
        - CustomApiKey: []
components:
  schemas:
    DescribeRequest:
      type: object
      properties:
        base64:
          type: string
          example: data:image/png;base64,xxx1
          description: 图像的base64编码
        url:
          type: string
          description: 图片url地址, url参数与base64参数至少存在一个值不为空，若两个字段同时传值，默认取base64字段
        timeout:
          type: integer
          example: '300'
          description: 任务超时时间，单位：秒，范围 300 - 1200。fast与turbo模式下默认最小值为300，relax模式下默认最小值为600。
        hookUrl:
          type: string
          description: 回调通知地址
      required:
        - base64
  responses:
    SuccessResponse:
      description: 请求成功
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: SUCCESS
              message:
                type: string
                example: success
              data:
                type: object
                example:
                  jobId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
            required:
              - status
              - message
              - data
    400Response:
      description: 参数错误
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: FAILED
              message:
                type: string
                example: '"prompt" cannot be empty.'
              data:
                type: object
            required:
              - status
              - message
    401Response:
      description: 授权失败
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: FAILED
              message:
                type: string
                example: Wrong TT-API-KEY or email is not activated.
            required:
              - status
              - message
  securitySchemes:
    CustomApiKey:
      type: apiKey
      in: header
      name: TT-API-KEY
      description: >-
        请前往 <a href='https://dashboard.ttapi.io' target='_blank'>TTAPI 控制台</a>
        获取 API 密钥。

````