The Vixlens API

Generate video and images from your own code — the same models, the same credit balance and the same pipeline as the web app.

API access is included on the Studio plan. See pricing.

1. Authenticate

Create a key in Settings → API Keys. Send it as a bearer token on every request; it acts as your account and spends your credits. Your API base URL and public key are shown on the same page. Each key is limited to 120 requests a minute, and keys can be revoked at any time.

Authorization: Bearer sk_live_...

2. Pricing

API generations cost exactly what they cost in the web app: credits per generation, depending on the model, resolution and duration. Every response includes costCredits. Credit packs sell credits at $0.01 each, and plans for less. Failed generations are refunded automatically.

3. Create a generation

One endpoint per type. The body takes a model id from the table below, a prompt, and that model's own settings (its model page lists them).

curl -X POST "$VIXLENS_API_BASE/generations/text-to-image" \
  -H "Authorization: Bearer sk_live_..." \
  -H "apikey: $VIXLENS_PUBLIC_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-image-2",
    "prompt": "A matte ceramic mug on a wooden table, morning window light",
    "size": "1024x1024",
    "quality": "medium"
  }'
HTTP/1.1 201 Created
{
  "job_id": "7f3c…",
  "estimated_time_seconds": 3,
  "status": "pending",
  "model": "openai/gpt-image-2",
  "costCredits": …,
  …
}

4. Poll for the result

Generations run asynchronously. Poll the job until its status is completed or failed. Result links are signed and expire, so download the file rather than storing the URL.

curl "$VIXLENS_API_BASE/generations/7f3c…" \
  -H "Authorization: Bearer sk_live_..." \
  -H "apikey: $VIXLENS_PUBLIC_KEY"

{ "status": "completed", "resultUrl": "https://…", "thumbnailUrl": "https://…", … }

Models

Model ids and the endpoint each one uses. Seedance 2.5, Seedance 2.0 and the motion-control models take their own request shapes — ask us for details.

ModelIdTypeEndpoint
HappyHorse 1.1 — Livealibaba/hh1.1-i2vImage to videoPOST /generations/image-to-video
Wan 2.7alibaba/wan-2.7-i2vImage to videoPOST /generations/image-to-video
Kling 2.6 Imagekling/2.6-imageImage to videoPOST /generations/image-to-video
Kling 2.1 Prokling/2.1-proImage to videoPOST /generations/image-to-video
Recraft v4.1recraft/recraftv4-1Text to imagePOST /generations/text-to-image
Recraft v4.1 Prorecraft/recraftv4-1-proText to imagePOST /generations/text-to-image
Recraft v4.1 Vectorrecraft/recraftv4-1-vectorText to imagePOST /generations/text-to-image
Lucid Origin@cf/leonardo/lucid-originText to imagePOST /generations/text-to-image
Nano Banana 2 Litegoogle/nano-banana-2-liteText to imagePOST /generations/text-to-image
Nano Banana Progoogle/nano-banana-proText to imagePOST /generations/text-to-image
Nano Banana 2.1google/nano-banana-2-1Text to imagePOST /generations/text-to-image
GPT Image 2openai/gpt-image-2Text to imagePOST /generations/text-to-image
Grok Imaginexai/grok-imagine-imageText to imagePOST /generations/text-to-image
Grok Imagine Qualityxai/grok-imagine-image-qualityText to imagePOST /generations/text-to-image
Seedream 5 Probytedance/seedream-5-proText to imagePOST /generations/text-to-image
Seedream 4.5bytedance/seedream-4.5Text to imagePOST /generations/text-to-image
Seedream 5 Litebytedance/seedream-5-liteText to imagePOST /generations/text-to-image
Seedance 2.0 Minibytedance/seedance-2.0-miniText to videoPOST /generations/text-to-video
Wan 3.0alibaba/wan-3.0Text to videoPOST /generations/text-to-video
Flux 3 Videoblack-forest-labs/flux-3-videoText to videoPOST /generations/text-to-video
Grok Imagine Videoxai/grok-imagine-videoText to videoPOST /generations/text-to-video
Grok Imagine Video 1.5 Previewxai/grok-imagine-video-1.5-previewText to videoPOST /generations/text-to-video
Veo 3.1google/veo-3.1Text to videoPOST /generations/text-to-video
Veo 3.1 Fastgoogle/veo-3.1-fastText to videoPOST /generations/text-to-video
Hailuo 2.3minimax/hailuo-2.3Text to videoPOST /generations/text-to-video
H3 Maxminimax/h3-maxText to videoPOST /generations/text-to-video
P-Videopruna/p-videoText to videoPOST /generations/text-to-video
Vidu Q3 Providu/q3-proText to videoPOST /generations/text-to-video
Vidu Q3 Turbovidu/q3-turboText to videoPOST /generations/text-to-video
Kling 4.0kling/4.0Text to videoPOST /generations/text-to-video
Kling 3.0kling/3.0Text to videoPOST /generations/text-to-video
Kling 3.0 Omnikling/3.0-omniText to videoPOST /generations/text-to-video
Kling 3.0 Turbokling/3.0-turboText to videoPOST /generations/text-to-video
Kling 2.6kling/2.6Text to videoPOST /generations/text-to-video