# Call Kling, Seedance and Veo by model id through one API

> Call Kling, Seedance, Veo and other video generation models through one API and CLI, with per-call metering and permanent asset storage.

**You can call video models from Kling, Seedance, Veo, and other labs through one unified API using thelastapi.** You submit an asynchronous generation job to `/v1/ai/jobs` or use the CLI with the model's exact identifier, and the gateway executes that specific model against your project credits. Every completed render is saved automatically to your project's file storage with a permanent URL.

Different video providers come with separate billing accounts, varying SDKs, distinct authentication schemes, and incompatible response structures. Navigating four different video dashboards just to evaluate motion quality slows down development. Here is how to discover video models, trigger text-to-video or image-to-video jobs, pass model-specific parameters, and retrieve your rendered assets through one endpoint.

## How to find video models and live prices

Rather than hardcoding provider endpoints or maintaining separate credentials for every release, you can search all supported media models directly through the API or SDK. Beyond the curated `vibiz/video` tier, you can run third-party models by id, including releases from Kling, Seedance, Veo, Hailuo, and Wan.

To query the catalogue via HTTP:

```bash
curl https://thelastapi.dev/v1/ai/media-models?q=kling \
  -H "Authorization: Bearer $VIBIZ_API_KEY"
```

If you are using the `@vibiz/app` SDK in your application, query the catalogue programmatically:

```ts
import { vibiz } from '@vibiz/app';

const models = await vibiz.ai.mediaModels({ q: 'kling' });
console.log(models);
```

The response returns each model identifier alongside its live pricing units. Models are billed by video render, by megapixel, or by generated duration in seconds. If an unlisted model identifier is submitted in a generation request, the API rejects the request immediately with a `400` status and `unknown_model`, preventing unintended charges on misspelled names.

| Model / Tier | Runs | Capabilities | Pricing structure |
| --- | --- | --- | --- |
| `vibiz/video` | LTX-2.5 Fast (Lightricks) | 6 s clips at 720p with sound from text or image | $0.54 per video |
| `kling-video/...` | Kling | High-motion text-to-video and image-to-video | Live per-second or per-video rate |
| Veo models by id | Veo | Text-to-video and cinematic generation | Live catalogue rate |
| Seedance models by id | Seedance | Prompt-driven video sequences | Live catalogue rate |

To explore other media modalities alongside video, see our guide on [one API for image, video and voice AI models](https://thelastapi.dev/blog/one-api-image-video-voice-models).

## How video generation jobs work

Video generation takes time to process, so calls run asynchronously as background jobs. You submit the generation request to `POST /v1/ai/jobs`, receive a `202 Accepted` response with a job id, and poll `GET /v1/ai/jobs/:id` until the status completes.

### 1. Generating video from a text prompt

To launch a text-to-video generation job via curl, provide the model identifier, the prompt, and the target aspect ratio (`16:9` or `9:16`):

```bash
curl https://thelastapi.dev/v1/ai/jobs \
  -H "Authorization: Bearer $VIBIZ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "video",
    "model": "vibiz/video",
    "input": {
      "prompt": "An aerial drone shot of waves crashing against dark volcanic cliffs at sunrise",
      "aspect_ratio": "16:9"
    }
  }'
```

The server returns:

```json
{
  "id": "job_01k8v92b4",
  "status": "pending",
  "created_at": "2026-10-28T14:32:00.000Z"
}
```

For a focused walkthrough on basic six-second clips, read about [a text-to-video API: a six-second clip from a prompt](https://thelastapi.dev/blog/text-to-video-api).

### 2. Passing custom parameters with model_input

Different labs offer unique arguments such as generation duration, camera trajectory, or seed values. You pass these inside the `model_input` object within `input` (supporting up to 16 KB of JSON parameters).

Here is how to run a specific Kling image-to-video model using the `@vibiz/app` SDK:

```ts
import { vibiz } from '@vibiz/app';

const job = await vibiz.ai.jobs.create({
  type: 'video',
  model: 'kling-video/v2.1/master/image-to-video',
  input: {
    prompt: 'A gentle breeze blowing through the trees, cinematic golden hour lighting',
    image_url: 'https://thelastapi.dev/f/Qm9x1234abcd5678/initial-frame.png',
    model_input: {
      duration: '10'
    }
  }
});

console.log('Started job:', job.id);
```

When billing models by duration, charges calculate based on the requested `duration` (defaulting to 5 seconds if omitted). To protect your account from unbounded billing on experimental jobs, a single media call is hard-capped at $10; calls calculated to exceed this threshold fail with `call_too_expensive`. Learn more about photo animations in [an image-to-video API to animate a product photo](https://thelastapi.dev/blog/image-to-video-api-product-animation).

## Generating videos from the CLI

When prototyping or writing shell scripts, the `vibiz` CLI provides a synchronous interface that submits the job, polls for completion, and downloads the output video to your local machine:

```bash
# Text to video using the default vibiz/video tier
vibiz video "A cinematic timelapse of a desert highway at night" -o highway.mp4 --aspect 16:9

# Video generation using a specific model id and custom parameters
vibiz video "A red sports car drifting on a wet asphalt track" \
  --model "kling-video/v2.1/master/text-to-video" \
  --params '{"duration":"5"}' \
  -o drift.mp4

# Animate an existing image from a public URL
vibiz video "The waterfall begins flowing rapidly" \
  --from-image "https://thelastapi.dev/f/Qm9x1234abcd5678/waterfall.png" \
  -o waterfall.mp4
```

## How rendered files are stored and served

When you generate video within an initialized project, you do not need to build asset ingestion pipelines or external cloud buckets to prevent temporary links from expiring. Every generated video automatically lands in your project's [Files](https://thelastapi.dev/docs/files) storage.

Once `GET /v1/ai/jobs/:id` reports a completed status, the job output includes permanent asset links:

```json
{
  "id": "job_01k8v92b4",
  "status": "completed",
  "output": {
    "data": [
      {
        "url": "https://thelastapi.dev/f/Qm9x87654321/2026-10-28-aerial-drone-shot.mp4",
        "file_id": "file_01k8v99xyz",
        "file_url": "https://thelastapi.dev/f/Qm9x87654321/2026-10-28-aerial-drone-shot.mp4"
      }
    ]
  }
}
```

Key storage behaviors to know:
- **Permanent links:** Output URLs use a 32-character unguessable key path (`https://thelastapi.dev/f/<key>/<name>`). Because video files must be fetched by web browsers, social networks, and video players without authorization headers, these URLs are public and do not expire.
- **Seeking support:** Videos are served with `Accept-Ranges: bytes` headers, allowing video players and scrubbers to seek forward without downloading the entire file first.
- **Project scoping:** Media generated using development keys is isolated into your development environment's files. Production keys write to production. Calls made with account keys lacking an assigned project fall back to temporary links that expire after 24 hours.
- **Locating assets:** You can query past generations using the CLI:

```bash
vibiz files search "drone shot"
vibiz files latest --type video
```

## Spend limits and safety controls

Generating high-resolution AI video can quickly consume balances if an automated script loops uncontrollably. The gateway applies automatic guardrails detailed in the [AI docs](https://thelastapi.dev/docs/ai):

1. **Daily account spend ceiling:** Account spend across all AI capabilities defaults to $5 per UTC day. Account owners can raise this ceiling in Billing.
2. **Project-level budgets:** Every project includes a daily AI budget defaulting to $1 per UTC day. When a project reaches its cap, requests return `429` with `details.reason: "project_budget"`.
3. **Worst-case balance holds:** Before a video job executes, its estimated maximum cost is checked against your account credit balance. If credits are insufficient, the job fails with `402 payment_required`.
4. **Single-call ceiling:** Any single model execution priced above $10 is blocked with `call_too_expensive`.

If you also build conversational interfaces alongside video pipelines, you can keep your existing SDKs by reviewing how to [change the base URL to call other AI models from OpenAI code](https://thelastapi.dev/blog/change-base-url-other-ai-models).

## Next step

Query the media catalogue using `GET /v1/ai/media-models?q=kling` to view current model versions, then test your first generation with `vibiz video "a lighthouse in a storm" -o storm.mp4`.

## Frequently asked questions

### What aspect ratios are accepted for video generation?

Video generation endpoints accept `16:9` or `9:16`. If you submit `1:1`, the API returns a `16:9` render.

### How do I pass custom arguments like camera controls or duration to specific video models?

Include your parameters in the `model_input` JSON object within the `input` payload on `POST /v1/ai/jobs`, or pass them via `--params` when using the CLI. The `model_input` object supports up to 16 KB of configuration.

### What happens if a video model identifier contains a typo?

If the model name is not in the media models catalogue, the API immediately returns a `400 invalid_request` error with `unknown_model`, ensuring credits are never billed for unintended models.

### Where are finished video files stored?

If called with a project key, videos are automatically saved to your project's Files storage with a permanent, unguessable URL that supports HTTP byte ranges for video playback and seeking. Calls made without a project key return links that expire after 24 hours.

---

Published 2026-11-15 · https://thelastapi.dev/blog/kling-seedance-veo-one-api
