Skip to main content
POST
Reiche einen Videogenerierungs-Job ein. Das Feld mode wählt die Form der Anfrage (image_to_video, text_to_video oder text_to_video_styled) und der Aufruf gibt 202 Accepted mit einer Job-id zurück; frage GET /videos/generations/{id} nach dem Ergebnis ab. Prüfe GET /videos/models für die von jeder Engine unterstützte duration, resolution, aspect_ratio, Endframe- und Audio-Unterstützung.

Beispiel: image-to-video mit Start- und Endframe

Im Modus image_to_video ist image der Startframe und end_image ein optionaler Endframe (nur auf endframe-fähigen Engines — siehe supports_end_frame in GET /videos/models). Jeder Frame nimmt genau eines von image_id, url oder base64 + mime_type.
duration ist erforderlich und muss ein von der Engine unterstützter Wert sein (siehe durations in GET /videos/models) — ein nicht unterstützter Wert liefert 422. Für text_to_video_styled ist style_id zusätzlich zu prompt und duration erforderlich; das Dropdown des Request-Bodys oben zeigt alle drei Modi.

Autorisierungen

Authorization
string
header
erforderlich

Organization API key as a bearer token: Authorization: Bearer samsa_sk_....

Body

application/json

mode: image_to_video — animate a start frame (optional end frame).

duration
integer
erforderlich

Clip length in seconds. Each engine supports a specific set — see durations in GET /videos/models. Unsupported values return 422.

Beispiel:

8

image
PublicVideoFrame · object
erforderlich

The start frame: exactly one of image_id, url, or base64+mime_type.

engine
string | null

Video engine — a public engine id from GET /videos/models (e.g. veo_3_1_lite, the default). Unknown engines return 422.

Beispiel:

"veo_3_1_lite"

aspect_ratio
string
Standard:16:9

Aspect ratio — 16:9, 9:16, or 1:1 (engine-dependent; see aspect_ratios in GET /videos/models).

Beispiel:

"16:9"

resolution
string | null

Output resolution — 720p, 1080p, or 4k where the engine supports it (see resolutions in GET /videos/models). Omit to use the engine default. Credits scale with the engine's resolution multipliers.

Beispiel:

"720p"

generate_audio
boolean
Standard:false

Generate audio with the video — audio-capable engines only (see supports_audio in GET /videos/models); adds the engine's audio credit multiplier.

Beispiel:

false

webhook_url
string | null

Optional https webhook notified once on terminal status (signed per the webhook signature scheme; see the webhooks docs).

Beispiel:

"https://example.com/webhooks/samsa"

mode
string
Standard:image_to_video
Allowed value: "image_to_video"
end_image
PublicVideoFrame · object | null

Optional end frame — only for end-frame-capable engines (see supports_end_frame in GET /videos/models).

prompt
string | null

Optional text prompt guiding the motion.

Minimum string length: 1
Beispiel:

"The camera slowly pans right as waves roll in"

Antwort

Successful Response

202 body for POST /videos/generations (ADR §7.1).

id
string<uuid>
erforderlich

The video job id — poll GET /videos/generations/{id}.

status
enum<string>
erforderlich

Initial status: always pending at submit.

Verfügbare Optionen:
pending,
processing,
completed,
failed,
cancelled
Beispiel:

"pending"

mode
string
erforderlich

The requested mode — image_to_video, text_to_video, or text_to_video_styled.

Beispiel:

"text_to_video"

estimated_credits
integer
erforderlich

Credits this job is expected to cost (base 5/sec x engine multiplier x resolution x audio; styled adds a flat 10 for the intermediate image).

Beispiel:

80