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

# 任务查询

> 使用视频任务 ID 查询异步生成状态。

视频提交响应中的 `id` 是异步任务 ID。使用**同一用户的本项目 API 密钥**查询原任务；不要因尚未生成结果而重复付费提交。

```bash theme={null}
curl -sS 'https://ai.xbrod.com/v1/tasks/<任务 ID>' \
  -H 'Authorization: Bearer <本项目 API 密钥>'
```

完成后按任务返回的素材地址与访问规则获取视频；若结果需要鉴权，请不要公开带有授权信息的下载链接。


## OpenAPI

````yaml openapi.yaml GET /v1/tasks/{task_id}
openapi: 3.0.3
info:
  title: new-api public API (documentation preview)
  version: 0.1.0
  description: >-
    Gateway-facing contracts for the first set of documented models. The enabled
    models and billing depend on each deployment's settings.
servers:
  - url: https://ai.xbrod.com
    description: 本项目线上 API 地址
security:
  - bearerAuth: []
paths:
  /v1/tasks/{task_id}:
    get:
      summary: 查询任务状态
      operationId: getTask
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
          description: 提交任务返回的 ID。
      responses:
        '200':
          description: 当前用户的任务状态及结果信息。
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key created in this gateway, not a provider key.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.