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

# Get Task Status

> Returns the current status of a task and the final result when available.



## OpenAPI

````yaml GET /v1/tasks
openapi: 3.1.0
info:
  title: Loova API
  description: Loova API lets developers generate AI images and videos programmatically.
  version: 1.0.0
servers:
  - url: https://api.loova.ai/api
security:
  - bearerAuth: []
paths:
  /v1/tasks:
    get:
      summary: Get Task Status
      description: >-
        Returns the current status of a task and the final result when
        available.
      operationId: getTaskStatus
      parameters:
        - name: task_id
          in: query
          required: true
          description: The `task_id` returned by the create task endpoint
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTaskResponse'
              examples:
                succeeded:
                  summary: Task succeeded
                  value:
                    code: 200
                    trace_id: 45c30d76f06549b199a3775544515689
                    message: null
                    data:
                      task_id: record_id
                      status: succeeded
                      model: seedance_2_0
                      created_at: '2024-01-01T12:00:00Z'
                      updated_at: '2024-01-01T12:00:05Z'
                      credits_cost: 12
                      result:
                        video_url: https://example.com/video.mp4
                        error_message: null
                        finished_at: '2024-01-01T12:02:00Z'
                imageSucceeded:
                  summary: Image task succeeded
                  value:
                    code: 200
                    trace_id: 45c30d76f06549b199a3775544515689
                    message: null
                    data:
                      task_id: record_id
                      status: succeeded
                      model: gpt_image_2
                      created_at: '2026-07-15T12:00:00Z'
                      updated_at: '2026-07-15T12:00:30Z'
                      credits_cost: 2
                      result:
                        image_urls:
                          - https://example.com/generated-image.png
                        error_message: null
                        finished_at: '2026-07-15T12:00:30Z'
                running:
                  summary: Task in progress
                  value:
                    code: 200
                    trace_id: 45c30d76f06549b199a3775544515689
                    message: null
                    data:
                      task_id: record_id
                      status: running
                      model: seedance_2_0
                      created_at: '2024-01-01T12:00:00Z'
                      updated_at: '2024-01-01T12:00:05Z'
                      credits_cost: 12
                      result: null
        '400':
          description: Request failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 400
                trace_id: 45c30d76f06549b199a3775544515689
                message: Detailed error message
                data: null
      security:
        - bearerAuth: []
components:
  schemas:
    GetTaskResponse:
      type: object
      properties:
        code:
          type: integer
        trace_id:
          type: string
        message:
          type:
            - string
            - 'null'
        data:
          type: object
          properties:
            task_id:
              type: string
            status:
              type: string
              enum:
                - queued
                - running
                - succeeded
                - error
                - cancelled
              description: >-
                Public task status. Internal `failed` and `error` states are
                both returned as `error`.
            model:
              type: string
            created_at:
              type: string
              format: date-time
            updated_at:
              type: string
              format: date-time
            credits_cost:
              type: number
            result:
              type:
                - object
                - 'null'
              properties:
                image_urls:
                  type: array
                  items:
                    type: string
                    format: uri
                  description: Generated image URLs for a successful image task.
                video_url:
                  type:
                    - string
                    - 'null'
                  format: uri
                error_message:
                  type:
                    - string
                    - 'null'
                finished_at:
                  type:
                    - string
                    - 'null'
                  format: date-time
    ErrorResponse:
      type: object
      properties:
        code:
          type: integer
        trace_id:
          type: string
        message:
          type:
            - string
            - 'null'
        data:
          type:
            - object
            - 'null'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````