Render
Rendering turns .ws source or a RenderGraph into an MP4. Render jobs are asynchronous so callers can queue work, poll status, and retrieve output when complete.
Render From Source
POST
/api/renderQueue render from `.ws` source
Compiles the source, validates the RenderGraph, and queues a native render job.
bash
curl -X POST "$WORKSHOP_URL/api/render" \
-H "Content-Type: application/json" \
-H "x-api-key: $WORKSHOP_API_KEY" \
-d '{
"source": "Film "Hello"
mood: confident
Scene "Intro"
show "Hello, Workshop."
size: hero",
"engine": "native"
}'
json
{
"jobId": "job_abc123",
"status": "queued",
"message": "Render queued. Poll GET /api/render/job_abc123 for status.",
"statusUrl": "https://demo.ws.video/api/render/job_abc123"
}
Render From File
POST
/api/render/fileQueue render from uploaded `.ws`
Accepts multipart form-data with a .ws file.
bash
curl -X POST "$WORKSHOP_URL/api/render/file" \
-H "x-api-key: $WORKSHOP_API_KEY" \
-F "file=@launch.ws"
Render From Template
POST
/api/render/templateRender with template variables
Combines a saved template with variable values and queues a render.
json
{
"template": "weekly-update",
"variables": {
"headline": "Revenue grew 18%",
"cta": "Read the board memo"
}
}
Poll Status
GET
/api/render/{id}Get render status
Returns job state, progress, output metadata, and errors if the render failed.
bash
curl "$WORKSHOP_URL/api/render/job_abc123" \
-H "x-api-key: $WORKSHOP_API_KEY"
Statuses include queued, rendering, complete, and failed.
Download Video
GET
/api/video/{id}Download rendered MP4
Returns the completed MP4 for a finished render job.
bash
curl -L -o output.mp4 "$WORKSHOP_URL/api/video/job_abc123" \
-H "x-api-key: $WORKSHOP_API_KEY"
Queue Status
GET
/api/queueRead queue status
Returns current render queue depth and worker state.
Next Steps
- Templates - render repeatable formats
- Batch Rendering - render many variants
- Documents - render persisted
.wsdocuments