Skip to main content
Base URL: https://platform.runblob.io

POST /v1/sora/generate

Creates a video generation task from text description using Sora 2 AI model.
prompt
string
required
Text description of the video (1-4000 characters)
orientation
string
default:"9:16"
Video orientation: "9:16" (portrait) or "16:9" (landscape)
duration
integer
default:"10"
Duration: 10 or 15 seconds
callback_url
string
Webhook URL for completion notifications (must be valid HTTPS URL)
image_base64
string
Base64-encoded image for Image-to-Video (max 10MB, JPEG/PNG/WEBP)
image_url
string
URL of image for Image-to-Video (alternative to image_base64)
curl -X POST https://platform.runblob.io/v1/sora/generate \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A beautiful sunset over the ocean with waves crashing on the shore",
    "orientation": "9:16",
    "duration": 10
  }'

Response

{
  "generation_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "pending",
  "price": "0.1200"
}
generation_id
string
UUID of the generation task for status checking
status
string
Initial status, always "pending"
price
string
Amount charged in USD
Video generation typically takes 5-15 minutes. Use the generation_id to check status or set up webhooks for notifications.

Generation Modes

The API supports 2 generation modes:

1. Text-to-Video

Generate video from text prompt only (no images).
{
  "prompt": "A person walking through a forest",
  "orientation": "9:16",
  "duration": 10
}

2. Image-to-Video

Animate a single image with text prompt using image_base64 or image_url parameter.
  • Formats: JPEG, PNG, WEBP
  • Max size: 10 MB
  • Either image_base64 OR image_url (not both)
{
  "prompt": "Animate this portrait with subtle movements",
  "image_url": "https://example.com/portrait.jpg",
  "orientation": "9:16",
  "duration": 10
}
You cannot use both image_base64 and image_url in the same request. Choose one method.

Orientation Options

Best for:
  • Mobile/vertical content
  • Instagram Reels, TikTok, YouTube Shorts
  • Social media stories
Resolution: Optimized for vertical displays
Best for:
  • Desktop/horizontal content
  • YouTube videos
  • Traditional video platforms
  • Cinematic content
Resolution: Optimized for widescreen displays

Duration Options

DurationUse CasePrice Factor
10 secondsQuick clips, social mediaStandard
15 secondsExtended content, storytellingHigher
Longer durations take more time to generate and cost more credits.