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

# 获取任务状态 - fetch

> 查询任务结果，**该接口不消耗quota，免费使用**



## OpenAPI

````yaml openapi/cn/sora.json get /midjourney/video/fetch
openapi: 3.1.0
info:
  title: Sora API DOCS
  version: 1.0.0
  description: TTAPI Sora API 接口服务，目前集成了市场上最为领先的视频大模型sora2。
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /midjourney/video/fetch:
    get:
      description: 查询任务结果，**该接口不消耗quota，免费使用**
      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: 消耗配额
                      videos:
                        type: array
                        description: >-
                          生成的视频文件，midjourney的官方cdn地址。有效期详见[存储与持久化](/grids/cn/faq/storage)
                      hookUrl:
                        type: string
                        description: 回调地址
                example:
                  status: SUCCESS
                  message: ''
                  jobId: c679a92e-dae0-462d-b70f-dcfeaf2189fa
                  data:
                    action: generate
                    jobId: 943583cb-08f4-4077-ad1e-f1bfc6c1191a
                    progress: '100'
                    prompt: >-
                      hyperrealistic album cover: Black sacral Ocean. Sunken
                      prayer canoe. Ghost Canoe Horizon
                    quota: '30'
                    videos:
                      - >-
                        https://cdn.midjourney.com/video/780b1227-227a-418c-998e-3eb90eb4824a/0.mp4
                      - >-
                        https://cdn.midjourney.com/video/780b1227-227a-418c-998e-3eb90eb4824a/1.mp4
                      - >-
                        https://cdn.midjourney.com/video/780b1227-227a-418c-998e-3eb90eb4824a/2.mp4
                      - >-
                        https://cdn.midjourney.com/video/780b1227-227a-418c-998e-3eb90eb4824a/3.mp4
                    hookUrl: https://webhook-test.com/1cb411db3bc4bfa7729c7df3ca2c1a5e
                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 密钥。

````