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

# Retrieve a task

> Returns task status and output by batch task ID or child video UUID. Provide exactly one of the id or uuid query parameters.



## OpenAPI

````yaml /openapi.json get /openapi/v1/tasks/task-info
openapi: 3.0.3
info:
  title: Neural4D API
  description: >-
    API v1 uploads reusable input files, creates videos asynchronously, and
    retrieves task status and results.
  version: 1.0.0
servers:
  - url: https://api.neural4d.com
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Video generation
    description: Create asynchronous video generation tasks.
  - name: Tasks
    description: Poll asynchronous tasks by ID.
  - name: Files
    description: Upload input files for reuse in generation requests.
paths:
  /openapi/v1/tasks/task-info:
    get:
      tags:
        - Tasks
      summary: Retrieve a task
      description: >-
        Returns task status and output by batch task ID or child video UUID.
        Provide exactly one of the id or uuid query parameters.
      operationId: getTaskInfo
      parameters:
        - name: id
          in: query
          required: false
          description: >-
            Batch task ID returned by a generation request. Provide this or
            uuid, but not both.
          schema:
            type: string
            example: normal-video-c50fe63e-699d-4d61-93f5-2099ab159d6d
        - name: uuid
          in: query
          required: false
          description: >-
            Child video UUID returned in the generation response. Provide this
            or id, but not both.
          schema:
            type: string
            format: uuid
            example: 7d1fa4bb-41e6-4a5d-88d8-1851f5342e87
      responses:
        '200':
          description: Task details
          headers:
            x-ratelimit-limit-requests:
              $ref: '#/components/headers/RateLimitLimitRequests'
            x-ratelimit-remaining-requests:
              $ref: '#/components/headers/RateLimitRemainingRequests'
            x-ratelimit-reset-requests:
              $ref: '#/components/headers/RateLimitResetRequests'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
              example:
                id: normal-video-c50fe63e-699d-4d61-93f5-2099ab159d6d
                status: succeeded
                mode: first_frame_image_to_video
                model: bytedance/seedance-2.0-fast
                created_at: 1784044800
                updated_at: 1784044842
                usage:
                  credits: 26
                output:
                  videos:
                    - uuid: 7d1fa4bb-41e6-4a5d-88d8-1851f5342e87
                      url: https://cdn.neural4d.com/results/video.mp4
                      format: mp4
                      duration: 5
                      resolution: 720p
                      aspect_ratio: '16:9'
                      has_audio: true
                      mode: first_frame_image_to_video
                      status: succeeded
                      created_at: 1784044800
                      updated_at: 1784044842
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      servers:
        - url: https://api.neural4d.com
          description: Production server
components:
  headers:
    RateLimitLimitRequests:
      description: Request limit for the current window.
      schema:
        type: integer
        format: int32
        minimum: 0
    RateLimitRemainingRequests:
      description: Requests remaining in the current window.
      schema:
        type: integer
        format: int32
        minimum: 0
    RateLimitResetRequests:
      description: Time until the request window resets, such as 1s.
      schema:
        type: string
        example: 1s
    RetryAfter:
      description: Seconds to wait before retrying.
      schema:
        type: integer
        minimum: 0
  schemas:
    Task:
      type: object
      required:
        - mode
        - id
        - status
        - created_at
        - output
      properties:
        id:
          type: string
          example: normal-video-c50fe63e-699d-4d61-93f5-2099ab159d6d
          description: Batch task ID returned by a generation request.
        status:
          allOf:
            - $ref: '#/components/schemas/TaskStatus'
          description: Normalized task lifecycle status.
        model:
          type: string
          enum:
            - bytedance/seedance-2.0
            - bytedance/seedance-2.0-fast
            - google/veo-3.1
            - xai/grok-imagine
          nullable: true
          description: Video generation model used by the task.
        created_at:
          type: integer
          format: int64
          description: Unix timestamp in seconds.
        updated_at:
          type: integer
          format: int64
          description: Unix timestamp in seconds.
        usage:
          $ref: '#/components/schemas/TaskUsage'
          description: Credits charged for this task when available.
        error:
          allOf:
            - $ref: '#/components/schemas/TaskError'
          description: Error details when the task fails.
        output:
          $ref: '#/components/schemas/VideoTaskOutput'
          description: >-
            Current child video task output, including entries that are still
            queued or processing.
        mode:
          type: string
          enum:
            - text_to_video
            - first_frame_image_to_video
            - first_last_frame_image_to_video
            - reference_to_video
          description: Video generation mode used by the task.
    TaskStatus:
      type: string
      enum:
        - queued
        - processing
        - succeeded
        - failed
      description: Normalized lifecycle status of an asynchronous task.
    TaskUsage:
      type: object
      required:
        - credits
      properties:
        credits:
          type: number
          format: float
          minimum: 0
          description: Credits charged for the task or submission.
          example: 26
    TaskError:
      type: object
      required:
        - code
        - message
      description: Failure details recorded by asynchronous processing.
      properties:
        code:
          type: string
          description: Stable machine-readable task failure code.
        message:
          type: string
          description: Human-readable explanation of the task failure.
        failed_at:
          type: integer
          format: int64
          description: Unix timestamp in seconds when the task failed.
        retryable:
          type: boolean
          description: Whether retrying the same operation may succeed.
    VideoTaskOutput:
      type: object
      required:
        - videos
      properties:
        videos:
          type: array
          items:
            $ref: '#/components/schemas/VideoFile'
          description: >-
            All child video tasks and their current output information. url and
            format are null until a result file is available.
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
          description: Structured error details.
    VideoFile:
      type: object
      required:
        - uuid
        - url
        - format
        - duration
        - resolution
        - aspect_ratio
        - has_audio
        - mode
        - status
        - created_at
        - updated_at
      properties:
        uuid:
          type: string
          format: uuid
          example: 7d1fa4bb-41e6-4a5d-88d8-1851f5342e87
          description: Generated video child UUID.
        url:
          type: string
          format: uri
          description: >-
            Temporary signed URL for downloading the generated video when
            available.
          nullable: true
        format:
          type: string
          nullable: true
          example: mp4
          description: Video file format when known, such as mp4.
        duration:
          type: integer
          nullable: true
          minimum: 0
          description: Generated video duration in seconds when available.
        resolution:
          type: string
          nullable: true
          example: 720p
          description: Generated video resolution when available, such as 720p.
        aspect_ratio:
          type: string
          nullable: true
          example: '16:9'
          description: Generated video aspect ratio when available, such as 16:9.
        has_audio:
          type: boolean
          description: Whether native audio generation was enabled for this video.
        mode:
          type: string
          enum:
            - text_to_video
            - first_frame_image_to_video
            - first_last_frame_image_to_video
            - reference_to_video
          description: Generation mode used for this video.
        status:
          allOf:
            - $ref: '#/components/schemas/TaskStatus'
          description: Current status of this generated video.
        created_at:
          type: integer
          format: int64
          description: Unix timestamp in seconds when this generated video was created.
        updated_at:
          type: integer
          format: int64
          description: >-
            Unix timestamp in seconds when this generated video was last
            updated.
    ApiError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Stable machine-readable error code.
          example: invalid_prompt
        message:
          type: string
          example: prompt is required and must be a non-empty string
          description: Human-readable explanation of the error.
        doc_url:
          type: string
          format: uri
          nullable: true
          example: https://api.neural4d.com/docs/errors#invalid_prompt
          description: Optional documentation URL with more information about the error.
  responses:
    BadRequest:
      description: Invalid request
      headers:
        x-ratelimit-limit-requests:
          $ref: '#/components/headers/RateLimitLimitRequests'
        x-ratelimit-remaining-requests:
          $ref: '#/components/headers/RateLimitRemainingRequests'
        x-ratelimit-reset-requests:
          $ref: '#/components/headers/RateLimitResetRequests'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            invalid_prompt:
              summary: Invalid prompt
              value:
                error:
                  code: invalid_prompt
                  message: prompt is required and must be a non-empty string
            unsupported_model:
              summary: Unsupported model
              value:
                error:
                  code: unsupported_model
                  message: 'Unsupported modelKey: missing-model'
            model_unavailable:
              summary: Model unavailable
              value:
                error:
                  code: model_unavailable
                  message: 'Model is unavailable: veo-3.1'
    Unauthorized:
      description: Authentication failed
      headers:
        x-ratelimit-limit-requests:
          $ref: '#/components/headers/RateLimitLimitRequests'
        x-ratelimit-remaining-requests:
          $ref: '#/components/headers/RateLimitRemainingRequests'
        x-ratelimit-reset-requests:
          $ref: '#/components/headers/RateLimitResetRequests'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: invalid_api_key
              message: The API key is invalid or expired
    Forbidden:
      description: >-
        The authenticated user cannot access this resource or has insufficient
        credits
      headers:
        x-ratelimit-limit-requests:
          $ref: '#/components/headers/RateLimitLimitRequests'
        x-ratelimit-remaining-requests:
          $ref: '#/components/headers/RateLimitRemainingRequests'
        x-ratelimit-reset-requests:
          $ref: '#/components/headers/RateLimitResetRequests'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: insufficient_credits
              message: Insufficient credits for video generation
    NotFound:
      description: The requested resource was not found
      headers:
        x-ratelimit-limit-requests:
          $ref: '#/components/headers/RateLimitLimitRequests'
        x-ratelimit-remaining-requests:
          $ref: '#/components/headers/RateLimitRemainingRequests'
        x-ratelimit-reset-requests:
          $ref: '#/components/headers/RateLimitResetRequests'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: task_not_found
              message: The requested task does not exist
    RateLimited:
      description: Request or quota limit exceeded
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
        x-ratelimit-limit-requests:
          $ref: '#/components/headers/RateLimitLimitRequests'
        x-ratelimit-remaining-requests:
          $ref: '#/components/headers/RateLimitRemainingRequests'
        x-ratelimit-reset-requests:
          $ref: '#/components/headers/RateLimitResetRequests'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: rate_limit_exceeded
              message: Too many requests. Retry after the indicated interval.
    InternalError:
      description: Internal or upstream service error
      headers:
        x-ratelimit-limit-requests:
          $ref: '#/components/headers/RateLimitLimitRequests'
        x-ratelimit-remaining-requests:
          $ref: '#/components/headers/RateLimitRemainingRequests'
        x-ratelimit-reset-requests:
          $ref: '#/components/headers/RateLimitResetRequests'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: internal_error
              message: An internal error occurred
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: Neural4D API key using the Bearer scheme.
      x-default: ${YOUR_API_KEY}

````