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

# 查询任务结果

> 通过jobId查询当前任务生成结果



## OpenAPI

````yaml openapi/cn/grok.json get /grok/fetch
openapi: 3.1.0
info:
  title: Grok Video DOCS
  version: 1.0.0
  description: Grok Video API 提供高效的视频分析和生成能力，帮助开发者快速集成智能视频功能。
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /grok/fetch:
    get:
      description: 通过jobId查询当前任务生成结果
      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
                    description: 任务状态：待排队/排队中/成功/失败
                  message:
                    type: string
                    description: 响应信息
                  jobId:
                    type: string
                    description: 任务id
                  data:
                    type: object
                    description: 任务结果
                    properties:
                      finishTime:
                        type: string
                        description: 完成时间，格式：YYYY-MM-DD HH:mm:ss
                      prompt:
                        type: string
                        description: 生成视频的提示词
                      quota:
                        type: string
                        description: 消耗配额
                      hookUrl:
                        type:
                          - string
                          - 'null'
                        description: 回调地址，无则为null
                      videoId:
                        type: string
                        description: 生成的视频ID
                      aspectRatio:
                        type: string
                        description: 视频宽高比，如9:16
                      videoLength:
                        type: string
                        description: 视频时长（秒）
                      resolutionName:
                        type: string
                        description: 视频分辨率，如720p
                      referImage:
                        type:
                          - string
                          - 'null'
                        description: 参考图片地址。有效期详见[存储与持久化](/grids/cn/faq/storage)
                      videoUrl:
                        type:
                          - string
                          - 'null'
                        description: 生成的视频地址。有效期详见[存储与持久化](/grids/cn/faq/storage)
                example:
                  status: SUCCESS
                  message: success
                  jobId: c822d894-fba8-4cd7-8b34-5cf54284af61
                  data:
                    videoId: video_b96164dd8bfa43518c858bcf
                    prompt: 镜头不动，石灯上的蚂蚁正在爬行，背景的花草随风有微微的晃动，背景音乐有蝉鸣的声音
                    aspectRatio: '9:16'
                    videoLength: '30'
                    resolutionName: 720p
                    referImage: >-
                      https://api.nananobanana.cn/api/cos-proxy/default-tenant-001/images/a515af9c-1619-42e8-abc7-97a6792ec524.png
                    videoUrl: >-
                      https://cdn.ttapi.io/other/2026-03-10/56a8bece963a4e8e9a585f41c5d24162.mp4
                    quota: '9'
                    finishTime: '2026-03-10 09:52:59'
                    hookUrl: null
                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 密钥。

````