Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.prismvideos.com/llms.txt

Use this file to discover all available pages before exploring further.

POST /api/generations
Submits a new video generation for the API key owner. The request is queued immediately; poll Get Generation Status with the returned generation ID until the video is complete.

Request

curl "https://www.prismvideos.com/api/generations" \
  -X POST \
  -H "Authorization: Bearer prism_sk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A fast-paced product demo with bold captions",
    "modelName": "veo-3.1",
    "aspectRatio": "9:16",
    "duration": "8s",
    "resolution": "1080p",
    "count": 1,
    "hasAudio": true
  }'

Body parameters

ParameterTypeRequiredDescription
promptstringYesPrompt for the generated video
modelNamestringYesExact Prism video model ID, such as veo-3.1
aspectRatiostringNoOne of auto, 21:9, 16:9, 4:3, 1:1, 3:4, or 9:16
durationstringNoRequested duration, such as 5s, 8s, or 10s
resolutionstringNoRequested resolution, such as 720p or 1080p
countintegerNoNumber of videos to queue, from 1 to 4
hasAudiobooleanNoWhether to request generated audio for supported models
startFrameKeystringNoS3 key for a start frame image returned by Upload Reference or asset APIs
endFrameKeystringNoS3 key for an end frame image returned by upload or asset APIs
ingredientImageKeysstring[]NoImage S3 keys to use as visual references
characterReferenceImageKeysstring[]NoImage S3 keys to use as character references
sourceVideoKeystringNoUploaded source video S3 key for edit-capable models
referenceVideoKeysstring[]NoUploaded video S3 keys to use as video references
audioKeystringNoUploaded audio S3 key for audio-driven models
templateIdstringNoTemplate ID to associate with the generation

Using uploaded references

To generate from your own image, video, or audio file:
  1. Call Upload Reference to get an upload_url and s3_key.
  2. Upload the file with PUT upload_url.
  3. Pass the returned s3_key into this endpoint.
For example, use an uploaded image as the first frame:
{
  "prompt": "Animate this product image into a clean studio video",
  "modelName": "veo-3.1",
  "startFrameKey": "users/user_abc/user-uploads/batch_abc/product.png"
}
Use the same s3_key pattern for other reference fields, such as ingredientImageKeys, characterReferenceImageKeys, sourceVideoKey, referenceVideoKeys, or audioKey.

Response

{
  "data": {
    "generations": [
      {
        "id": "gen_abc123",
        "asset_id": "asset_abc123",
        "request_id": "fal_request_abc123",
        "status": "queued"
      }
    ],
    "endpoint_id": "fal-ai/veo3",
    "variant": "text-to-video",
    "metadata": {
      "model_name": "veo-3.1",
      "selected_model_name": "veo-3.1",
      "credits_charged": 120,
      "num_generations": 1
    }
  }
}

Response fields

FieldTypeDescription
data.generations[].idstringGeneration ID to pass to GET /api/generations/:id
data.generations[].asset_idstring or nullAsset record ID reserved for the generated video
data.generations[].request_idstring or nullProvider request ID when available
data.generations[].statusstring or nullInitial queue status
data.endpoint_idstring or nullProvider endpoint used for the generation
data.variantstring or nullResolved generation variant
data.metadataobjectModel and billing metadata for the submission

Errors

StatusErrorWhen
400validation_errorInvalid JSON request body
400model or parameter errorMissing or unsupported generation parameters
401unauthorizedMissing or invalid API key
402insufficient_creditsThe account does not have enough credits
403forbiddenAPI key lacks templates:read scope
503free_tier_pausedFree tier generation is temporarily paused
See Errors for the full error reference.