> ## 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/grokimage.json post /grok/image/fetch
openapi: 3.1.0
info:
  title: Grok Edit Image DOCS
  version: 1.0.0
  description: Grok Edit Image API 提供高效的图片分析和生成能力，帮助开发者快速集成智能图片功能。
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /grok/image/fetch:
    post:
      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
                      aspectRatio:
                        type: string
                        description: 视频宽高比，如1:1
                      images:
                        type: array
                        description: 参考图片地址。有效期详见[存储与持久化](/grids/cn/faq/storage)
                example:
                  status: SUCCESS
                  message: success
                  jobId: 9e73af91-6fe4-4833-9005-b63cb741619d
                  data:
                    prompt: 一只可爱的小猫
                    'n': 1
                    aspectRatio: '1:1'
                    images:
                      - >-
                        https://cdn.ttapi.io/grok/2026-03-23/27790f48a54240ad8a1b5ca28a7c94a3.jpg
                    quota: '0'
                    finishTime: '2026-03-23 07:23:50'
                    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 密钥。

````