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

# Get Task

> Query task execution status and result by task ID

Query the execution status and generation results of asynchronous tasks by task ID. All image and video generation requires polling task status using this endpoint.


## OpenAPI

````yaml /en/openapi.yaml GET /tasks/{id}
openapi: 3.0.0
info:
  contact:
    email: support@sinancode.com
    name: API Support
    url: https://sinancode.com/support
  description: AI Model Task Scheduling Platform API
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  termsOfService: https://sinancode.com/terms-of-service
  title: TikTomato API
  version: '1.0'
servers:
  - url: https://api.sinancode.com/v1
    description: Production server
security: []
paths:
  /tasks/{id}:
    get:
      tags:
        - public
      summary: Query task information
      description: Query task execution status and result by task ID
      parameters:
        - description: taskID
          example: 01234567-89ab-cdef-0123-456789abcdef
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dto.TaskResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
        '404':
          description: Task not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
      security:
        - AccessToken: []
components:
  schemas:
    dto.TaskResponse:
      properties:
        error_code:
          type: string
        error_msg:
          description: Friendly error message (falls back to error_code if empty)
          type: string
        id:
          example: 01234567-89ab-cdef-0123-456789abcdef
          type: string
        result:
          items:
            $ref: '#/components/schemas/dto.MediaItem'
          type: array
        status:
          example: processing
          type: string
      required:
        - id
        - status
      type: object
    apierror.ErrorResponse:
      properties:
        error_code:
          description: Machine-readable error code (e.g., TASK.INVALID_PARAMS)
          type: string
        message:
          description: User-friendly error message
          type: string
      type: object
    dto.MediaItem:
      properties:
        type:
          description: image, video, audio
          type: string
        url:
          type: string
      type: object
  securitySchemes:
    AccessToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Please use your API Token for authentication

````