> ## 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 任务结果查询 API 文档

> 使用 Midjourney 任务结果查询接口获取图像生成任务状态、结果地址和返回数据，适合异步轮询和任务管理。



## OpenAPI

````yaml openapi/cn/midjourney.json GET /midjourney/v1/fetch
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/fetch:
    get:
      parameters:
        - name: jobId
          in: query
          required: true
          schema:
            type: string
          description: 上一步请求返回的jobId
      responses:
        '200':
          description: 请求成功
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - 'PENDING_QUEUE '
                      - ON_QUEUE
                      - SUCCESS
                      - FAILED
                  message:
                    type: string
                    description: 响应信息
                  jobId:
                    type: string
                    description: 任务id
                  data:
                    type: object
                    description: 任务结果
                    properties:
                      jobId:
                        type: string
                        description: 任务id
                      action:
                        type: string
                        description: 任务类型
                      progress:
                        type: string
                        description: 任务进度
                      prompt:
                        type: string
                        description: 提示词
                      quota:
                        type: string
                        description: 消耗配额
                      discordImage:
                        type: string
                        description: discord的cdn图片地址。有效期详见[存储与持久化](/grids/cn/faq/storage)
                      cdnImage:
                        type: string
                        description: 国内可访问的cdn代理地址。有效期详见[存储与持久化](/grids/cn/faq/storage)
                      width:
                        type: string
                        description: 图像宽度
                      heigth:
                        type: string
                        description: 图像高度
                      components:
                        type: array
                        description: 可执行操作列表
                      seed:
                        type: string
                        description: 图像种子
                      images:
                        type: array
                        description: 图像切割列表。有效期详见[存储与持久化](/grids/cn/faq/storage)
                      hookUrl:
                        type: string
                        description: 回调地址
                example:
                  status: SUCCESS
                  message: ''
                  jobId: c679a92e-dae0-462d-b70f-dcfeaf2189fa
                  data:
                    action: imagine
                    jobId: c679a92e-dae0-462d-b70f-dcfeaf2189fa
                    progress: '100'
                    prompt: a cat
                    quota: '2'
                    discordImage: >-
                      https://cdn.ttapi.io/midjourney/2025-11-14/20260302_050724_554d43430e2e80dd.png
                    cdnImage: >-
                      https://cdn.ttapi.io/midjourney/2025-11-14/20260302_050724_554d43430e2e80dd.png
                    width: 1024
                    height: 1024
                    hookUrl: null
                    components:
                      - upsample1
                      - upsample2
                      - upsample3
                      - upsample4
                      - reroll
                      - variation1
                      - variation2
                      - variation3
                      - variation4
                    seed: null
                    images:
                      - >-
                        https://cdn.ttapi.io/midjourney/20260302/bf839f4e-b7c0-4d14-922c-a842ad451443tl.png
                      - >-
                        https://cdn.ttapi.io/midjourney/20260302/bf839f4e-b7c0-4d14-922c-a842ad451443tr.png
                      - >-
                        https://cdn.ttapi.io/midjourney/20260302/bf839f4e-b7c0-4d14-922c-a842ad451443bl.png
                      - >-
                        https://cdn.ttapi.io/midjourney/20260302/bf839f4e-b7c0-4d14-922c-a842ad451443br.png
                required:
                  - status
                  - message
        '400':
          $ref: '#/components/responses/400Response'
        '401':
          $ref: '#/components/responses/401Response'
      security:
        - CustomApiKey: []
components:
  responses:
    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 密钥。

````