Skip to content

Create a video

Start a video generation job from a prompt, a first frame, a last frame or reference images. Returns the job right away.

Markdown
On this page
POST/v1/videos

Starts a video job and returns the job object at once with status: "queued". Follow it with GET /videos/{id} and download the file with GET /videos/{id}/content. Walkthrough: Video generation.

Request body

modelstringrequired

A video model id (for example bytedance/seedance-1.0-pro) or a preset such as @video. List video models with GET /models?kind=video.

promptstringrequired

What should happen in the video.

imagestring

A first frame: a public https:// URL or a data URI.

last_framestring

A last frame, together with image, on models with lastFrame.

reference_imagesstring[]

Up to 32 reference images, as the model allows.

durationnumber

Length in seconds, within the model's durations. duration_seconds and seconds are read too.

aspect_ratiostring

From the model's aspectRatios.

resolutionstring

From the model's resolutions.

audioboolean

Sound on or off, for models where it can be chosen.

seedinteger

On models that support it.

provider_optionsobject

Provider-specific options from the model's allow-list.

models

, provider, user, metadata — As in POST /images/generations.

Example

Request
curl https://api.getlykia.com/v1/videos \
  -H "Authorization: Bearer $LYKIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "bytedance/seedance-1.0-pro",
    "prompt": "Waves rolling onto a quiet beach at dusk, slow camera pan",
    "duration": 5,
    "resolution": "720p",
    "aspect_ratio": "16:9"
  }'
Response200
{
    "id": "gen-1795463406-qOWSYdRnX7cEsv8q",
    "object": "video",
    "status": "queued",
    "progress": 0,
    "model": "bytedance/seedance-1.0-pro",
    "provider": "bytedance",
    "created_at": 1795463406,
    "completed_at": null,
    "expires_at": null,
    "duration_seconds": null,
    "params": {
        "duration": 5,
        "aspect_ratio": "16:9",
        "resolution": "720p",
        "image": false,
        "last_frame": false,
        "reference_images": 0
    }
}

The job object is described under GET /videos/{id}. params summarises what you asked for; image inputs show only whether they were given.

Errors

StatusCodeWhen
400unsupported_inputAn unsupported value (metadata.param), or an option combination that is not priced yet.
400unsupported_modelThe model does not make videos.
402insufficient_creditsThe balance, key limit or project budget cannot cover the job's reservation.
403platform_sales_disabledThe provider is not offered on Lykia credits yet; add your own key for it.
403byok_only_no_keyThe project only allows its own provider keys and has none for this model.
429media_queue_fullThe project already has the most jobs Lykia lets it keep waiting.

For example, a duration outside the model's range:

400 Bad Request
{
    "error": {
        "message": "duration must be between 2 and 12 seconds for seedance-1-0-pro-250528",
        "type": "invalid_request_error",
        "code": "unsupported_input",
        "status": 400,
        "metadata": {
            "reason": "unsupported_input",
            "param": "duration"
        }
    }
}