Skip to main content
POST
Create a Video

Authorizations

X-App-ID
string
header
required

Your Spatius App ID.

X-API-Key
string
header
required

The API key bound to the App ID.

Body

application/json
avatarId
string<uuid>
required

An existing public Avatar, an Avatar actively assigned to your account, or an Avatar explicitly allowed for your account. Access is checked on every creation and before rendering.

audioUrl
string<uri>
required

Audio source in WAV format only, at most 500 MiB and no longer than 20 minutes. Use a public HTTP(S) URL without embedded credentials. Signed query parameters are supported. Keep the URL accessible for the preparation window of up to 30 minutes. Each transfer has a five-minute limit. The source must return a supported Content-Type; application/octet-stream is not supported. See Media requirements.

Required string length: 1 - 4096
Pattern: ^https?://[^/?#@\s]+([/?#].*)?$
backgroundUrl
string<uri>

Optional background image, at most 50 MiB. Use a public HTTP(S) URL without embedded credentials. Signed query parameters are supported. Keep the URL accessible for the preparation window of up to 30 minutes. Each transfer has a five-minute limit. The source must return a supported Content-Type; application/octet-stream is not supported. See Media requirements. Its pixel dimensions determine omitted output dimensions according to the Output sizing rules.

Required string length: 1 - 4096
Pattern: ^https?://[^/?#@\s]+([/?#].*)?$
name
string

Optional job name. When omitted, Spatius generates a name from the job ID.

Required string length: 1 - 128
requestId
string<uuid>

Optional retry key, shared across Apps owned by your account. The same requestId and normalized input return the existing job without consuming creation quota again. Different input with the same key returns HTTP 409. Omitted video.width, video.height, and video.fit are distinct from explicit values, even if output is identical. Other omitted presentation settings remain equivalent to their documented defaults. Keep the key and request body unchanged when retrying an uncertain response. Requests accepted before the change to background-based sizing can return 409 on replay even with the original body; check the existing job before submitting a new requestId. Omit this field to create a new job on every call.

video
object

Optional presentation settings. When both dimensions are omitted and the background image dimensions are available, output follows the image size, scaled down proportionally to fit the limits and rounded down to even dimensions with a minimum of 64 pixels. If only one dimension is supplied, the missing dimension follows the background aspect ratio with the same rounding and minimum. Without usable background dimensions, each omitted dimension falls back to 1024. An invalid derived size can fail the job during preparation. Explicit dimensions must be even, from 64 to 1920, with an effective product at most 2,073,600 pixels; request validation substitutes 1024 for an omitted dimension. Omitted width, height, and fit remain distinct from explicit values for retry comparison. Encoding settings are managed by Spatius. Opening and closing transitions are included even when lead-in and lead-out are zero. See Output sizing.

Response

Job accepted, or an existing job returned for a retry.

jobId
string<uuid>
required

The accepted job ID.

status
enum<string>
required

New jobs return queued. A retry returns the existing job's current status, which may already be terminal.

Available options:
queued,
processing,
succeeded,
failed,
expired
createdAt
string<date-time>
required

Original acceptance time, including on a retry.