Skip to content
Inferlane

Guides, 12 of 17

Guide: video generation

Generate clips from a prompt or a first frame and handle longer waits.

Two ways to make a clip

  • Text to video: describe the shot and get a clip. Example: google/veo-3-1.
  • Image to video: send a start frame in image_url and describe the motion. Example: kling/kling-3-pro-image-to-video.

Video models

Every model below takes the same three calls. Prices come from the catalog and are billed per second or per the unit shown.

google/veo-3-1$0.40 / second
Veo 3.1. Google DeepMind's video model with native audio, camera control and realistic motion.
kling/kling-3-pro$0.11 / second
Kling 3.0 Pro. Kling's pro tier text to video model with fluid motion and strong prompt following.
minimax/h3-max$0.09 / second
MiniMax H3 Max. MiniMax's top tier video model for cinematic shots with physically plausible motion.
openai/sora-2$0.10 / second
Sora 2. OpenAI's video and audio generation model with synchronized dialogue and sound.
xai/grok-imagine-1-5$0.08 / second
Grok Imagine 1.5. xAI's video model for short clips with sound, from a prompt.
lightricks/ltx-2-3$0.04 / second
LTX 2.3. Open weights video model from Lightricks, built for fast generation with synchronized audio. Open weights.
wan/wan-3$0.06 / second
Wan 3.0. Text to video model from the Wan team at Alibaba, with multi shot prompts and camera control.
bytedance/seedance-2-5$0.12 / second
Seedance 2.5. Animate a still into a multi shot clip with stable subjects and smooth camera moves.
kling/kling-3-pro-image-to-video$0.11 / second
Kling 3.0 Pro Image to Video. Turn a reference frame into a clip with Kling 3.0, with optional end frame control.
minimax/h3$0.05 / second
MiniMax H3. Standard tier MiniMax image to video model, faster and lower cost than H3 Max.
wan/wan-2-2$0.04 / second
Wan 2.2 Image to Video. Open weights image to video model from the Wan team, released under Apache 2.0. Open weights.
minimax/h3-max-image-to-video$0.09 / second
MiniMax H3 Max Image to Video. The top MiniMax tier for animating a still, with steady subjects and cinematic camera moves.
pixverse/pixverse-v6$0.05 / second
PixVerse V6. PixVerse's image to video model for short, stylized clips with effects and fast turnaround.

Inputs of Veo 3.1

This walkthrough uses google/veo-3-1. Its inputs, read from the same schema that GET /models/google/veo-3-1 returns:

promptstring, required
What to generate. Plain language works best.
aspect_ratioenum
Frame aspect ratio. One of 16:9, 9:16. Default "16:9".
durationenum
Clip length in seconds. Billed per second. One of 4, 6, 8. Default "8".
resolutionenum
Output resolution. One of 720p, 1080p. Default "1080p".
generate_audioboolean
Generate a matching soundtrack with the clip. Default true.
negative_promptstring
Things to keep out of the result. Default "".
seedinteger
Fix the seed to reproduce a result. Leave empty for random. From 0 to 2147483647.

Submit the request

curl -X POST "https://inferlane.net/api/v1/queue/google/veo-3-1" \
  -H "Authorization: Key $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"Slow aerial shot along a rocky coastline at golden hour, waves breaking on dark stone","aspect_ratio":"16:9","duration":"8","resolution":"1080p","generate_audio":true}'

The answer is 202 with a request_id. Keep it: export REQUEST_ID="...".

Poll until it completes

Poll the status about once a second. A Veo 3.1 request completes in about 11 seconds.

curl "https://inferlane.net/api/v1/requests/$REQUEST_ID/status" \
  -H "Authorization: Key $API_KEY"

Read the result

curl "https://inferlane.net/api/v1/requests/$REQUEST_ID" \
  -H "Authorization: Key $API_KEY"
200 OK
{
  "request_id": "Z29vZ2xlL3Zlby0zLTF8bXVxemQwdnN8OHw5NmViNTIwOXw1MTdjZTI",
  "model_id": "google/veo-3-1",
  "status": "COMPLETED",
  "sample": true,
  "output": {
    "video": {
      "url": "https://inferlane.net/media/outputs/video-frame-16x9.webp",
      "content_type": "image/webp",
      "width": 1280,
      "height": 720,
      "duration": 8,
      "preview_frame": true
    },
    "seed": 90210
  },
  "billing": {
    "unit": "second",
    "quantity": 8,
    "unit_price": 0.4,
    "amount": 3.2,
    "currency": "USD",
    "sample": true
  },
  "timings": {
    "queue_ms": 2000,
    "inference_ms": 9000
  },
  "submitted_at": "2026-10-02T13:09:55.000Z",
  "completed_at": "2026-10-02T13:10:06.000Z"
}
In this preview the video.url is a still frame and preview_frame is true. Render outputs by content_type so the same code handles real video later.

Veo 3.1 is priced at $0.40 / second. Each second of output video or audio, or of the input clip for lipsync and upscale. This request bills a quantity of 8, so billing.amount is 3.2 USD.

The whole flow in one script

# 1. Submit the request and keep its request_id
REQUEST_ID=$(curl -s -X POST "https://inferlane.net/api/v1/queue/google/veo-3-1" \
  -H "Authorization: Key $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "prompt": "Slow aerial shot along a rocky coastline at golden hour, waves breaking on dark stone",
  "aspect_ratio": "16:9",
  "duration": "8",
  "resolution": "1080p",
  "generate_audio": true
}' \
  | sed -n 's/.*"request_id": *"\([^"]*\)".*/\1/p')

# 2. Poll the status about once a second until it is COMPLETED
until curl -s "https://inferlane.net/api/v1/requests/$REQUEST_ID/status" \
  -H "Authorization: Key $API_KEY" | grep -q '"status": "COMPLETED"'; do
  sleep 1
done

# 3. Fetch the result
curl "https://inferlane.net/api/v1/requests/$REQUEST_ID" \
  -H "Authorization: Key $API_KEY"

Start from an image

The same flow with a first frame. kling/kling-3-pro-image-to-video takes the frame in image_url; a path on this site, a public URL or a data URI all work.

curl -X POST "https://inferlane.net/api/v1/queue/kling/kling-3-pro-image-to-video" \
  -H "Authorization: Key $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"Gentle wind moves the curtains, slow push in","image_url":"/media/outputs/portrait-1x1.webp","duration":"5"}'

Kling 3.0 Pro Image to Video is priced at $0.11 / second. Each second of output video or audio, or of the input clip for lipsync and upscale. This request bills a quantity of 5, so billing.amount is 0.55 USD.

Handle longer waits

Video takes longer than images. Poll less often, show progress from progress, and set an overall timeout so a stuck job never blocks your app.

# Poll every 2 seconds, give up after 10 minutes
for i in $(seq 1 300); do
  STATUS=$(curl -s "https://inferlane.net/api/v1/requests/$REQUEST_ID/status" \
    -H "Authorization: Key $API_KEY")
  echo "$STATUS" | grep -q '"status": "COMPLETED"' && break
  sleep 2
done
curl "https://inferlane.net/api/v1/requests/$REQUEST_ID" -H "Authorization: Key $API_KEY"