Skip to content

AI Video Generate

AI Video Generate API

Video generation is asynchronous:

  1. POST /v1/video/generate → returns a job_id; credits are held, not charged
  2. Wait (typically 45 seconds – 2 minutes)
  3. GET /v1/video/jobs/{job_id} until status is completed or failed
  4. completed → the link is in result. failed → credits are refunded automatically

Base URL and authentication

Every endpoint shares one base:

https://revidapi.com/v1
Authorization: Bearer sk_...

X-API-Key: sk_... works too. Get a key at revidapi.com/dashboard.


Models

Live list with per-configuration pricing:

curl https://revidapi.com/v1/video/models \
  -H "Authorization: Bearer sk_..."
Model Notes
veo3.1-lite Cheapest. 720p/1080p/4k · 4–8s
veo3.1-fast Fast. 720p/1080p/4k · 4–8s
veo3.1-omni Fullest. Adds 10s and veo_mode
grok-i2v Image to video, 480p and up
kling-2.5-turbo 720p/1080p · 5–10s
kling-2.6 Has separate audio tiers
kling-3.0-video Most configurations

Only use a model returned by GET /v1/video/models. Anything else returns 404 model_not_found.


1) Create a video job

  • Method: POST
  • URL: https://revidapi.com/v1/video/generate
  • Content-Type: application/json
Name Type Required Description
model string Yes From GET /v1/video/models
prompt string Yes What the video should show
duration string No 4s, 5s, 8s, 10s — whatever the model sells
resolution string No 720p, 1080p, 4k — whatever the model sells
aspect_ratio string No 16:9, 9:16, 1:1
audio bool No Only meaningful on models with separate audio tiers
img_url string | array No Input image (image-to-video)
image_urls array | comma-separated string No Several images — used with veo_mode
video_url string No Input video (video editing)
veo_mode string No frames or ingredients, Veo family only

resolution and duration must match a configuration that is actually sold. A mismatch returns 400 listing the real configurations rather than a generic error.

From a prompt

curl -X POST https://revidapi.com/v1/video/generate \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "veo3.1-lite",
    "prompt": "Close-up of a coffee drop falling, cinematic light",
    "duration": "4s",
    "resolution": "720p",
    "aspect_ratio": "16:9"
  }'

From an image

curl -X POST https://revidapi.com/v1/video/generate \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-i2v",
    "prompt": "the character steps forward, static camera",
    "img_url": "https://example.com/start.jpg",
    "duration": "6s",
    "resolution": "480p"
  }'

Veo — interpolate first frame → last frame

import requests

r = requests.post(
    "https://revidapi.com/v1/video/generate",
    headers={"Authorization": "Bearer sk_..."},
    json={
        "model": "veo3.1-omni",
        "prompt": "smooth transition from the first frame to the last",
        "veo_mode": "frames",
        "image_urls": ["https://example.com/start.jpg",
                       "https://example.com/end.jpg"],
        "duration": "4s",
        "resolution": "720p",
        "aspect_ratio": "16:9",
    },
)
print(r.json())

Veo — combine reference images

json={
    "model": "veo3.1-omni",
    "prompt": "a video in the style of the reference images",
    "veo_mode": "ingredients",
    "image_urls": ["https://example.com/a.jpg",
                   "https://example.com/b.jpg",
                   "https://example.com/c.jpg"],
    "duration": "4s",
    "resolution": "720p",
}

Response

{
  "job_id": "job_vid_PFxvMD1e3fTKaCQo",
  "status": "pending",
  "cost": 13,
  "poll": "/v1/video/jobs/job_vid_PFxvMD1e3fTKaCQo"
}

cost is what will be charged if the video succeeds.


2) Poll the job

  • Method: GET
  • URL: https://revidapi.com/v1/video/jobs/{job_id}
curl https://revidapi.com/v1/video/jobs/job_vid_PFxvMD1e3fTKaCQo \
  -H "Authorization: Bearer sk_..."

Running:

{ "id": "job_vid_...", "object": "video.job", "status": "running", "model": "veo3.1-lite" }

Done:

{
  "id": "job_vid_...",
  "object": "video.job",
  "status": "completed",
  "model": "veo3.1-lite",
  "result": "https://cdn.revidapi.com/outputs/.../result.mp4"
}

Failed — credits already refunded:

{
  "id": "job_vid_...",
  "status": "failed",
  "error": { "message": "Generation failed. Please try again later.",
             "type": "upstream_error" }
}

Sensible polling: every 10–15 seconds, up to 5 minutes.


Error codes

Code Meaning What to do
400 Missing model/prompt, or unsold configuration Read message — it lists the real configurations
401 Wrong or missing key Check the Authorization header
402 Not enough credits Top up at revidapi.com/dashboard/usage
404 That model is not sold See GET /v1/video/models
503 Video service temporarily down Retry later