Documentation

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/render

Request 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.

Request

GET /api/render/{renderId}

Response (In Progress)

{
  "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)

{
  "status": 500, // Or other relevant error code
  "message": "An error occurred during rendering.",
  "code": "RENDERING_ERROR" // Example error code
}

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.