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

# 查询任务状态

> 根据任务ID查询异步任务的状态、进度和结果信息



## OpenAPI

````yaml cn/api-manual/task-management/get-task-detail.json GET /v1/tasks/{task_id}
openapi: 3.1.0
info:
  title: 获取任务详情接口
  description: 根据任务ID查询异步任务的状态、进度和结果信息
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.evolink.ai
    description: 生产环境
security:
  - bearerAuth: []
tags:
  - name: 任务管理
    description: 异步任务管理相关接口
paths:
  /v1/tasks/{task_id}:
    get:
      tags:
        - 任务管理
      summary: 查询任务状态
      description: 根据任务ID查询异步任务的状态、进度和结果信息
      operationId: getTaskDetail
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
          description: 任务ID，查询时请忽略{}，在路径尾部拼接异步任务响应体的id
          example: task-unified-1756817821-4x3rx6ny
      responses:
        '200':
          description: 任务状态详情
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskDetailResponse'
        '400':
          description: 请求参数错误、格式错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: invalid_task_id
                  message: Invalid task ID format, must start with 'task-unified-'
                  type: invalid_request_error
                  param: task_id
        '401':
          description: 未认证、Token无效或过期
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: unauthorized
                  message: Authentication required
                  type: authentication_error
        '402':
          description: 配额不足、需要充值
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: quota_exceeded
                  message: Insufficient quota. Please top up your account.
                  type: insufficient_quota
        '403':
          description: 无权限访问
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: permission_denied
                  message: You don't have permission to access this task
                  type: invalid_request_error
        '404':
          description: 资源不存在
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: task_not_found
                  message: The requested task could not be found
                  type: invalid_request_error
        '429':
          description: 请求频率超限
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: rate_limit_exceeded
                  message: Rate limit exceeded
                  type: evo_api_error
        '500':
          description: 服务器内部错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: internal_error
                  message: Failed to retrieve task status
                  type: api_error
components:
  schemas:
    TaskDetailResponse:
      type: object
      properties:
        created:
          type: integer
          description: 任务创建时间戳
          example: 1756817821
        id:
          type: string
          description: 任务ID
          example: task-unified-1756817821-4x3rx6ny
        model:
          type: string
          description: 使用的模型
          example: gemini-3.1-flash-image-preview
        object:
          type: string
          description: 任务类型
          enum:
            - image.generation.task
            - video.generation.task
            - audio.generation.task
          example: image.generation.task
        progress:
          type: integer
          minimum: 0
          maximum: 100
          description: 任务进度百分比
          example: 100
        results:
          type: array
          items:
            type: string
            format: uri
          description: 任务结果列表（完成时提供）
          example:
            - http://example.com/image.jpg
        status:
          type: string
          description: 任务状态
          enum:
            - pending
            - processing
            - completed
            - failed
          example: completed
        error:
          type: object
          nullable: true
          description: >-
            任务失败时的错误信息（仅当 status 为 failed 时出现）。注意：此处的 error.code 为字符串类型的业务错误码，与
            HTTP 状态码不同。完整错误码列表请参阅错误码参考文档。
          properties:
            code:
              type: string
              description: 业务错误码（字符串类型）
              example: content_policy_violation
            message:
              type: string
              description: 用户友好的错误说明与排错建议
              example: |-
                Content policy violation.
                Your request was blocked by safety filters.
            type:
              type: string
              description: 错误类型标识，固定为 task_error
              example: task_error
        task_info:
          type: object
          description: 任务详细信息
          properties:
            can_cancel:
              type: boolean
              description: 是否可以取消任务
              example: false
        type:
          type: string
          description: 任务类型
          enum:
            - image
            - video
            - audio
            - text
          example: image
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: 错误码（字符串类型）
              example: invalid_task_id
            message:
              type: string
              description: 错误描述信息
              example: Invalid task ID format
            type:
              type: string
              description: 错误类型
              example: invalid_request_error
            param:
              type: string
              description: 相关参数名称
              example: task_id
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        ##所有接口均需要使用Bearer Token进行认证##

        **获取 API Key ：**

        访问 [API Key 管理页面](https://evolink.ai/dashboard/keys) 获取您的 API Key

        **使用时在请求头中添加：**
        ```
        Authorization: Bearer YOUR_API_KEY
        ```

````