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

# Retrieve a task

> Retrieves the task with the given ID.



## OpenAPI

````yaml https://api.infinitecreator.com/openapi.json get /v1/tasks/{task_id}
openapi: 3.1.0
info:
  title: Infinite Creator API
  description: >-
    For more information, refer to the [official
    documentation](https://docs.infinitecreator.com).
  version: 1.3.0
servers:
  - url: https://api.infinitecreator.com
security: []
paths:
  /v1/tasks/{task_id}:
    get:
      tags:
        - tasks
      summary: Retrieve a task
      description: Retrieves the task with the given ID.
      operationId: retrieve_endpoint_v1_tasks__task_id__get
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
            minLength: 8
            description: ID of the Task
            title: Task Id
          description: ID of the Task
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
          description: Unauthorized
        '402':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
          description: Payment Required
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
          description: Forbidden
        '404':
          description: Task not found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
          description: Method Not Allowed
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
          description: Internal Server Error
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
          description: Service Unavailable
components:
  schemas:
    Task:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the object.
          examples:
            - 01K364FEGEDX32AK5RK447H2KP
        state:
          type: string
          enum:
            - PENDING
            - RUNNING
            - FAILED
            - SUCCEEDED
          title: State
          description: State of the task
          default: PENDING
          examples:
            - RUNNING
            - FAILED
            - SUCCEEDED
        failure_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Failure Message
          description: >-
            If task state is FAILED, this will contain a brief description of
            the error
        results:
          items:
            $ref: '#/components/schemas/TaskResult'
          type: array
          title: Results
          description: >-
            If task state is SUCCEEDED, this will contain the results of the
            task
        dropped_assets:
          items:
            $ref: '#/components/schemas/DroppedAsset'
          type: array
          title: Dropped Assets
          description: >-
            If some of the input assets did not pass our internal checks, this
            will contain the assets that were dropped from the video along with
            a brief description of the error
      type: object
      required:
        - id
      title: Task
    APIError:
      properties:
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
        context:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Context
      additionalProperties: false
      type: object
      title: APIError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TaskResult:
      properties:
        agent_id:
          type: string
          title: Agent Id
        url:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Url
          description: URL of the video
          examples:
            - https://cdn.infinitecreator.com/example.mp4
        preview_url:
          anyOf:
            - type: string
              maxLength: 2083
              minLength: 1
              format: uri
            - type: 'null'
          title: Preview Url
          description: >-
            URL of the preview gif. This is only available if `create_preview`
            is enabled.
          examples:
            - https://cdn.infinitecreator.com/example.gif
        metadata:
          additionalProperties:
            type: string
          type: object
          title: Metadata
          description: Metadata specified at Task creation.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Time when the video was created.
          examples:
            - '2026-06-18T10:48:54.689287+00:00'
      type: object
      required:
        - agent_id
        - url
        - created_at
      title: TaskResult
    DroppedAsset:
      properties:
        url:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Url
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
          description: Brief reason for dropping the asset, if any.
          examples:
            - quality
            - too_big
            - download_error
      type: object
      required:
        - url
      title: DroppedAsset
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````