MotionLab for developers

AI video generation API

Integrate text-to-video and image-to-video with model discovery, owned uploads, cost estimates and asynchronous results.

Choose the video workflow before choosing a model

Use text-to-video when your application starts with a scene description. Use image-to-video when a product photo, illustration or existing frame should anchor the shot. Reference-to-video and first/last-frame controls are available only where a model advertises them. A model name alone does not establish which inputs it accepts.

Read result.models.video and result.models.videoCatalog from GET /api/v1/models, then choose the mode, supported duration and resolution. The live API model library is the public starting point for exploring the current selection.

Upload an owned start image

For image-to-video, first call motionlab_create_upload with filename, contentType and the actual fileSizeBytes. PUT the file bytes to uploadUrl with the same Content-Type, then pass the returned key as startImageKey. For compatible models, an owned completed image job can also be used through startImageJobId.

Do not substitute another user's asset or assume a third-party image URL is accepted. Model discovery determines reference-count limits and which start, end or multimodal reference fields are supported.

Estimate the same settings you will generate

Video cost depends on the selected model and settings. Duration, resolution and native audio can change the quote. The following bodies illustrate a five-second 720p image-to-video request; use them only with a model advertising those settings, and replace both placeholders.

POST /api/v1/actions/motionlab_estimate_cost
{
  "kind": "video",
  "model": "MODEL_ID_FROM_DISCOVERY",
  "duration": 5,
  "resolution": "720p",
  "aspectRatio": "16:9"
}

POST /api/v1/actions/motionlab_generate_video
{
  "model": "MODEL_ID_FROM_DISCOVERY",
  "startImageKey": "OWNED_UPLOAD_KEY",
  "prompt": "Slow camera push toward the product; soft daylight; stable geometry",
  "duration": 5,
  "resolution": "720p",
  "aspectRatio": "16:9",
  "idempotencyKey": "YOUR_SAVED_UNIQUE_REQUEST_ID"
}

These are JSON request bodies sent with Bearer authentication and Content-Type: application/json. For prompt-only generation, select a text-to-video model and omit startImageKey. Include generateAudio in your estimate and request when using provider-native audio controls that affect price.

Build a job-based experience in your application

Creation returns result.jobId, rather than a finished video. Show a pending state and poll motionlab_get_job with that ID. Stop at COMPLETED, FAILED or CANCELLED, and download successful output. Do not submit another generation just because the first job is still processing.

For a catalog workflow, save one job record for each shot and keep the source asset, prompt and settings alongside it. This makes a deliberate new variation distinct from a network retry. Test a small representative set for prompt adherence, motion, unwanted cuts and output quality before scaling your volume.

Plan video costs in credits and dollars

Use the estimate's totalCredits for your job budget. Multiply credits by your purchased pack's dollar-per-credit ratio when comparing providers. Compare the same model version, seconds, resolution, audio and output count. A price per second cannot be compared directly with a price per completed clip.

MotionLab's website and personal API use the same generation prices and wallet. See selected model price comparisons and the credit packs before committing to volume.

Continue building

Explore live models and prices · Create your API key

AI video generation API | MotionLab