Render
Rendering is asynchronous. Submit a render job, receive a job ID, poll for completion, download the MP4.
Render from Source
POST
/api/renderRender video
Compiles the source, validates the output, and queues a render job. Send source (string) or renderGraph (object), not both.
Request body:
json
{
"source": "Film \"Demo\"\n mood: playful\n\nScene \"Hello\"\n show \"Workshop renders video!\"\n size: hero\n enter: pop"
}
Response (200):
json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "queued",
"message": "Render queued. Poll GET /render/a1b2c3d4... for status."
}
Render from File
POST
/api/render/fileRender from file
Upload a .ws file directly as multipart form-data.
Render from Template
POST
/api/render/templateRender from template
Renders from a registered template with variable substitution and optional overrides.
Request body:
json
{
"template": "product-launch",
"variables": { "headline": "Introducing Apex", "cta": "Start free" },
"overrides": { "mood": "dramatic", "theme": "corporate-blue" }
}
Poll Status
GET
/api/render/:idCheck render status
Returns current status: queued, rendering, complete, or failed.
Download Video
GET
/api/video/:idDownload MP4
Returns the video binary with Content-Type: video/mp4. Returns 409 if not ready.
bash
curl -o my-video.mp4 https://api.ws.video/api/video/YOUR_JOB_ID \
-H "x-api-key: YOUR_API_KEY" \
-H "x-org-id: YOUR_ORG_ID"
Next Steps
- Quickstart — the complete compile → render → download flow
- Batch Rendering — render multiple videos from one template