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

# Get Task Result

> 根据 taskId 查询任务状态 / 结果；异步任务创建后使用此接口轮询终态。



## OpenAPI

````yaml GET /openai/tasks
openapi: 3.0.0
info:
  title: Openai AI
  description: API documentation for Openai AI
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.mountsea.ai
    description: API Gateway
security: []
tags:
  - name: openai
    description: ''
  - name: openai-compat
    description: ''
paths:
  /openai/tasks:
    get:
      tags:
        - openai
      summary: 查询任务状态
      description: 根据 taskId 查询任务状态 / 结果；异步任务创建后使用此接口轮询终态。
      operationId: ApiPublicController_getTaskResult
      parameters:
        - name: taskId
          required: true
          in: query
          description: 任务 ID（UUID 格式）
          schema:
            type: string
      responses:
        '200':
          description: 任务结果
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResultDto'
      security:
        - bearerAuth: []
components:
  schemas:
    TaskResultDto:
      type: object
      properties:
        taskId:
          type: string
          description: 任务 ID
        status:
          enum:
            - pending
            - ready
            - assigned
            - processing
            - completed
            - failed
            - cancelled
            - timeout
          type: string
          description: 任务状态
        result:
          type: object
          description: 任务结果（直接透传协议层返回，类型根据任务类型不同而变化）
          nullable: true
        errorMessage:
          type: string
          description: 错误信息
        errorCode:
          type: number
          description: 错误代码
        finishedAt:
          format: date-time
          type: string
          description: 完成时间
        createdAt:
          format: date-time
          type: string
          description: 创建时间
        traceId:
          type: string
          description: 追踪 ID
        elapsedMs:
          type: number
          description: 任务耗时（毫秒），任务达到终态（completed / failed / timeout）时写入
      required:
        - taskId
        - status
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````