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.,
veo-3.1-generate-001, ByteDance-Seedance-1.0-pro-fast, happyhorse-1.0-i2v). The Wan Spicy models (wan2.7-i2v-spicy, wan2.2-i2v-spicy) take their first frame as image instead — see Wan Spicy.
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. This is shorthand for a single
first_frame entry in frame_images (which also allows a last frame on models that support it) — see frame_images.
seconds
integer
Default: model-specific
Video duration in seconds. Supported values and the default depend on the model (e.g., Veo supports
4, 6, 8 and defaults to 8; HappyHorse defaults to 5). duration is not a supported field — use seconds. Kling is the exception: it takes duration, and image-to-video there is driven by a first_frame entry in contents — see Kling.
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. An http(s) 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": "veo-3.1-generate-001",
"prompt": "A cute baby sea otter swimming happily",
"image_url": "https://example.com/your-image.png",
"seconds": 8
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
Example Response
By default the request waits for the render and returns the finished video:
{
"created": 1772093692,
"data": [
{
"url": "https://resources.siraya.ai/v1/videos/video_abc123.../content"
}
],
"error": {}
}
With "async": true the response is a job object instead, which you poll for status:
{
"id": "video_abc123...",
"object": "video",
"status": "processing",
"model": "veo-3.1-generate-001",
"seconds": 8,
"usage": { "completion_tokens": 0, "total_tokens": 0 }
}
Info
The id is encrypted and contains provider and model information. Use this ID directly for subsequent queries and downloads. See Asynchronous generation.
Visit the Models Directory to find more supported image-to-video models.