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

# 获取单个素材

<Note>
  创建素材任务需要通过任务结果获取接口查询素材生成状态，当  `status` 字段值为 `succeed` 表明素材创建成功，可以拿到素材ID进行后续操作。
</Note>

### 请求/响应参数明细


## OpenAPI

````yaml openapi.yaml GET /assets/{task_id}
openapi: 3.1.0
info:
  title: 极客智坊 API文档
  description: 极客智坊 API 消息接口规范文档
  version: 1.0.0
servers:
  - url: https://geekai.co/api/v1
    description: 国内代理入口
  - url: https://geekai.dev/api/v1
    description: 海外代理入口
security:
  - bearerAuth: []
  - apiKeyAuth: []
paths:
  /assets/{task_id}:
    get:
      tags:
        - GetAssetData
      summary: 素材任务查询接口
      description: 根据任务ID查询素材生成任务的状态和结果。
      operationId: GetAssetData
      parameters:
        - name: task_id
          in: path
          required: true
          description: 素材生成任务ID
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - status
                properties:
                  id:
                    type: string
                    description: 素材ID
                  status:
                    type: string
                    description: 任务状态
                    enum:
                      - pending
                      - running
                      - succeed
                      - failed
                  name:
                    type: string
                    description: 素材名称
                  group_id:
                    type: string
                    description: 所属素材组ID
                  url:
                    type: string
                    format: uri
                    description: 素材URL
                  asset_type:
                    type: string
                    enum:
                      - Image
                      - Video
                      - Audio
                    description: 素材类型
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: 任务不存在
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          $ref: '#/components/responses/StandardError'
components:
  responses:
    ValidationError:
      description: 参数验证错误
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: validation_error
              message:
                type: string
                example: 参数验证失败
              details:
                type: object
                additionalProperties:
                  type: string
                example:
                  field: 错误描述
    Unauthorized:
      description: 未授权
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: unauthorized
              message:
                type: string
                example: Invalid API key or token
    StandardError:
      description: 标准错误响应
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: 错误代码
          example: invalid_request
        message:
          type: string
          description: 错误信息描述
          example: 请求参数不合法
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: API认证token
    apiKeyAuth:
      type: apiKey
      in: header
      name: GeekAI-API-Key
      description: API密钥认证

````