Skip to main content

1. Create an API key

Go to Account Settings and create a new API key. Copy the secret — it’s only shown once.

2. Generate a video

curl -X POST https://rawugc.com/api/v1/videos/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sora-2-text-to-video",
    "prompt": "A serene beach at sunset with gentle waves",
    "aspectRatio": "landscape",
    "nFrames": "15"
  }'
You’ll receive a response like:
{
  "taskId": "task_abc123",
  "model": "sora-2-text-to-video",
  "status": "pending",
  "creditsUsed": 6,
  "newBalance": 994,
  "estimatedCompletionTime": "1-3 minutes",
  "createdAt": 1234567890000
}

3. Check video status

Poll the status endpoint until the video is ready:
curl https://rawugc.com/api/v1/videos/task_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY"
When complete, the response includes the video URL:
{
  "taskId": "task_abc123",
  "status": "completed",
  "model": "sora-2-text-to-video",
  "resultUrl": "https://storage.rawugc.com/videos/abc123.mp4",
  "creditsUsed": 6,
  "createdAt": 1234567890000,
  "completedAt": 1234567950000
}

Next steps