Documentation

Get Render

Get the status and result of a render with the Swiftia API

Get Render Status/Result

This endpoint retrieves the status and, upon completion, the result of a render job initiated by the POST /api/render endpoint.

Note: Renders are processed through a queue system. When you submit a render request, it may be queued if the system is processing other renders. Use this endpoint to poll for status updates. The response will indicate if the render is queued (with queue position), in progress (with progress percentage), completed (with file URL), or failed (with error message).

Endpoint

GET /api/render/{renderId}

Path Parameters

  • renderId (string, required): The unique identifier of the render job, obtained from the renderId field in the response of the POST /api/render request. This ID is used to track the render through its lifecycle (queued → processing → completed/failed).

Response (Queued)

When the render is queued (waiting to start):

{
  "type": "queued",
  "status": "QUEUED",
  "queuePosition": 3, // Your position in the render queue
  "progress": 0 // Progress is always 0 when queued
}

Response (In Progress)

When the render is actively processing:

{
  "type": "progress",
  "progress": 0.204 // 20% Progress percentage (0.0 - 1.0)
}

Response (Completed)

{
  "type": "done",
  "url": "https://example.com/rendered_video.mp4", // URL of the rendered video
  "size": 14396911 // Size of the rendered video in bytes
}

Response (Failed)

When the render has failed:

{
  "type": "error",
  "message": "An error occurred during rendering." // Detailed error message
}

Response Parameters

  • type (string): Indicates the status of the render: "queued", "progress", "done", or "error".
  • status (string, only present when type is "queued"): Always "QUEUED" when the render is waiting in the queue.
  • queuePosition (number, only present when type is "queued"): Your position in the render queue. Lower numbers indicate renders that will start sooner.
  • progress (number): The progress of the render as a percentage (0.0 - 1.0). Always 0 when type is "queued", and reflects actual progress when type is "progress".
  • url (string, only present when type is "done"): The URL of the rendered video file.
  • size (number, only present when type is "done"): The size of the rendered video file in bytes.
  • message (string, only present when type is "error"): A descriptive error message explaining why the render failed.

Example Request

curl --request GET \
  --url https://app.swiftia.io/api/render/[renderId] \  // Replace with the actual renderId
  --header 'Authorization: Bearer YOUR_API_KEY'

Example Response (Completed)

{
  "type": "done",
  "url": "https://example.com/v9lqxvtb9x/out.mp4",
  "size": 14396911
}