Rendering
Rendering outputs with the Swiftia API
Rendering outputs with the Swiftia API
The Swiftia API provides endpoints to render various types of outputs, typically after a job has completed. Rendering generates the final output file (e.g., MP4 video, processed audio, etc.) with applied styles, effects, and customizations.
Initiate Render
Send a POST request to /api/render to start the rendering process.
Request
POST /api/renderRequest Body
{
"id": "YOUR_JOB_ID",
... // Function-specific render options
}Note: The specific options available depend on the function and output type being rendered. Video rendering might include caption styling options, while audio rendering might include different audio processing options.
Response
{
"renderId": "NEWLY_CREATED_RENDER_ID"
}Get Render Status/Result
Send a GET request to /api/render/{renderId} to retrieve the render status or the final result. The renderId is the value returned from the POST /api/render response.
Request
GET /api/render/{renderId}Response (Queued)
When the render is queued (waiting to start):
{
"type": "queued",
"status": "QUEUED",
"queuePosition": 2, // Position in the render queue
"progress": 0 // Progress is always 0 when queued (for backward compatibility)
}Response (In Progress)
When the render is actively processing:
{
"type": "progress",
"progress": 0.204 // Progress percentage (0.0 - 1.0)
}Response (Completed)
{
"type": "done",
"url": "https://example.com/rendered_output.mp4", // URL of the rendered output
"size": 14396911 // Size of the rendered output in bytes
}Response (Failed)
When the render has failed:
{
"type": "error",
"message": "An error occurred during rendering."
}Function-Specific Rendering
Different functions may support different rendering options and presets. For detailed information about rendering options for specific functions, see the Functions section.