Skip to main content

Endpoint

POST https://api.ugc.inc/render/submit

Overview

Submit a video or image render job to the Modal rendering pipeline. This endpoint returns a job ID immediately, which can be used to check status and download the rendered output when complete.

Request Body

output_type
'video' | 'image'
default:"video"
Type of output to generate
  • video: Renders a full video (MP4) - supports all segment types
  • image: Renders a static image (PNG/JPEG) - only supports text and image segments
editor
EditorConfig
Editor configuration defining the compositionRequired properties:
  • width (number): Canvas width in pixels
  • height (number): Canvas height in pixels
  • fps (number): Frames per second (for video)
  • duration (number): Duration in milliseconds (for video)
  • channels (array): Array of channels, each containing segments
For video output: All segment types allowed (video, audio, text, image)For image output: Only text and image segments allowed
use_example
boolean
default:false
Set to true to use the built-in example configuration for testing
image_format
'png' | 'jpeg'
default:"png"
Output format for image renders (only used when output_type: 'image')
  • png: Lossless, supports transparency
  • jpeg: Lossy compression, smaller file size

Response

data
object
Job submission response
curl -X POST https://api.ugc.inc/render/submit \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "output_type": "video",
    "editor": {
      "width": 1080,
      "height": 1920,
      "fps": 30,
      "duration": 5000,
      "channels": [
        {
          "id": "background",
          "segments": [
            {
              "id": "bg-video",
              "type": "video",
              "source": "https://example.com/video.mp4",
              "order": 0,
              "offset": { "type": "absolute", "value": 0 },
              "xOffset": 0,
              "yOffset": 0,
              "width": 1080,
              "height": 1920
            }
          ]
        }
      ]
    }
  }'
{
  "ok": true,
  "code": 200,
  "message": "Success",
  "data": {
    "job_id": "550e8400-e29b-41d4-a716-446655440000",
    "status": "pending",
    "output_type": "video",
    "message": "Job submitted successfully. Use /status/{job_id} to check progress."
  }
}