Image to Video
Animate static images into dynamic video sequences using the SIRAYA Model Router Image to Video API. This endpoint supports high-fidelity animation using leading video models.
POST
https://llm.siraya.ai/v1/videos/generations
Header
Authorization
string
Required
Your API Key (e.g.,
Bearer <API_KEY>).
Body
model
string
Required
The ID of the model (e.g.,
sora-2-pro-image-to-video).
prompt
string
Required
Text description of the desired animation or context.
image_url
string
Required
The URL of the input image to use as the first frame. Supports public URLs or base64 data URIs.
seconds
integer
Default: 8
Video duration in seconds. Supported values depend on the model (e.g., Veo supports
4, 6, 8).
seed
integer
Random seed for reproducibility. Same seed produces the same video.
extra_body
object
Vendor-specific parameters. See below for details per provider.
async
boolean
Default: false
When
false, the request waits for generation to finish and returns the completed video URL. When true, it returns immediately with a video id you poll for status. See Asynchronous generation.
callbackUrl
string
Only used when
async is true. A URL the router will POST to once generation completes (or fails), so you don't have to poll.
|
import requests
url = "https://llm.siraya.ai/v1/videos/generations"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer <API_KEY>"
}
data = {
"model": "sora-2",
"prompt": "A cute baby sea otter swimming happily",
"image_url": "https://example.png",
"seconds": 8
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
Example Response
{
"id": "video_abc123...",
"object": "video",
"status": "processing",
"created_at": 1772093692,
"seconds": 8,
"model": "sora-2-pro-image-to-video"
}
Info
The id is encrypted and contains provider and model information. Use this ID directly for subsequent queries and downloads.
Visit the Models Directory to find more supported image-to-video models.