# Text to video API: generate video with Seedance through one API key

> A text-to-video API takes a prompt and returns a video file. rendermate's is `POST /v1/generations`: one API key calls ByteDance's Seedance 2.5, 2.0, 2.0 Fast and 2.0 Mini. You can generate from text or start from an image, and Seedance 2.5 can also edit or extend a video you have. Each result is saved as a file in your workspace.

## Generate a video from text

Send the model, the prompt, the params and where to save the result:

```bash
curl https://api.rendermate.com/v1/generations \
  -H "Authorization: Bearer $RENDERMATE_API_KEY" \
  --json '{"model": "bytedance/seedance-2.5",
           "prompt": "A barista pours latte art in a sunlit cafe, close-up, slow motion",
           "params": {"duration": 8, "ratio": "9:16", "resolution": "1080p"},
           "output": "ads/latte.mp4"}'
```

It answers at once with the generation's `id` and `status: running`. Poll `GET /v1/generations/{id}` until `status` is `succeeded`, or get a `generation.succeeded` [webhook](https://rendermate.com/docs/webhooks). The video is then the asset `ads/latte.mp4`, and `GET /v1/assets/ads/latte.mp4` gives a download URL. Seedance makes sound by default: voice, effects and music in sync with the picture.

## The same thing in TypeScript

```ts
const api = (path: string, init?: RequestInit) =>
  fetch(`https://api.rendermate.com/v1${path}`, {
    ...init,
    headers: {Authorization: `Bearer ${process.env.RENDERMATE_API_KEY}`, "Content-Type": "application/json"},
  }).then((r) => r.json());

let generation = await api("/generations", {
  method: "POST",
  body: JSON.stringify({
    model: "bytedance/seedance-2.5",
    prompt: "A barista pours latte art in a sunlit cafe, close-up, slow motion",
    params: {duration: 8, ratio: "9:16", resolution: "1080p"},
    output: "ads/latte.mp4",
  }),
});
while (generation.status === "running") {
  await new Promise((resolve) => setTimeout(resolve, 5000));
  generation = await api(`/generations/${generation.id}`);
}
if (generation.status !== "succeeded") throw new Error(generation.error);
const {download_url} = await api("/assets/ads/latte.mp4");
```

## Pick a model

| Model | Length | Resolution | Good for |
| --- | --- | --- | --- |
| `bytedance/seedance-2.5` | 4 to 30 seconds | 480p, 720p, 1080p | Long shots with sound, editing and extending videos, and cheap 480p drafts |
| `bytedance/seedance-2.0` | 4 to 15 seconds | 480p, 720p, 1080p, 4K | 4K output |
| `bytedance/seedance-2.0-fast` | 4 to 15 seconds | 480p, 720p | Quicker results |
| `bytedance/seedance-2.0-mini` | 4 to 15 seconds | 480p, 720p | The lowest price |

`GET /v1/models` lists every model with its input roles and a JSON Schema of its params, and needs no API key. What each one costs is in [Seedance API pricing](https://rendermate.com/blog/seedance-api-pricing).

## Params

- `duration`: seconds, within the model's range, or `-1` to let the model choose.
- `ratio`: `16:9`, `4:3`, `1:1`, `3:4`, `9:16` or `21:9`. When you leave it out, it's `adaptive`: the model picks one from the prompt and inputs.
- `resolution`: `480p`, `720p`, `1080p` or `4k`, as the model allows; 720p when absent.
- `generate_audio`: sound in sync with the picture; on unless you set it to `false`.
- `draft` and `from_draft` (Seedance 2.5): make a cheap 480p draft, then the full video of the same shot.
- `seed`: the same seed and inputs give a similar video.
- `camera_fixed`: keep the camera still.
- `return_last_frame`: also save the last frame as an image, to start the next clip from.
- `output_format`: `mp4` (the default) or `mov`. `watermark` burns in an "AI generated" mark; it's off unless you set it.

## Start from an image, or edit a video

Inputs are assets in your workspace, each with a role. The prompt can name references as `@Image1`, `@Video1` and `@Audio1`.

| Role | Up to | What the model does with it |
| --- | --- | --- |
| `first_frame` | 1 image | Starts the video on this image |
| `last_frame` | 1 image | Ends the video on this image; needs a `first_frame` |
| `reference_image` | 30 images | Uses a look, person or object from it |
| `reference_video` | 10 videos | Follows, edits or extends it |
| `reference_audio` | 10 audio files | Uses a voice or music from it |

```json
{
  "model": "bytedance/seedance-2.5",
  "prompt": "The camera slowly circles the product on a marble table",
  "inputs": [{"role": "first_frame", "asset": "products/bottle.png"}],
  "params": {"duration": 6, "ratio": "1:1"},
  "output": "products/bottle-orbit.mp4"
}
```

## Make a longer video from several clips

Set `return_last_frame` on a clip. Besides the video, the generation saves its last frame as an image next to it, such as `ads/latte.last_frame.png`. Pass that image as the next clip's `first_frame`, and the two clips join without a jump.

## What else the same key does

- **Transcribes** audio and video with word timings: see [transcribing a video with word-level timestamps](https://rendermate.com/blog/transcribe-video-word-timestamps).
- **Stores** every file as an asset at a path you choose, and keeps a local folder in sync with `rendermate sync`.
- **Works from AI agents:** every endpoint is also a tool on rendermate's MCP server at `https://api.rendermate.com/mcp`, which Claude, ChatGPT, Cursor and Claude Code connect to.
- **Sends webhooks** when generations finish and assets change.

## Questions

### Is there one API key for several text-to-video models?

Yes. A rendermate API key calls Seedance 2.5, 2.0, 2.0 Fast and 2.0 Mini, and the AssemblyAI and ElevenLabs transcription models, through the same `POST /v1/generations` endpoint and the same prepaid credits.

### Do I need a BytePlus account to use Seedance through rendermate?

No. rendermate calls BytePlus for you and bills the generation from your rendermate credits.

### How long can a generated video be?

Up to 30 seconds with Seedance 2.5 and up to 15 seconds with Seedance 2.0, 2.0 Fast and 2.0 Mini. For longer videos, chain clips with `return_last_frame` and `first_frame`.

### Does the generated video have sound?

Yes, by default. Seedance generates voice, effects and music in sync with the picture unless you set `generate_audio` to `false`.

### Can I generate vertical video for TikTok, Reels or Shorts?

Yes. Set `ratio` to `9:16`. Seedance also makes `16:9`, `4:3`, `1:1`, `3:4` and `21:9`.

### Can I turn an image into a video?

Yes. Upload the image as an asset and pass it with the role `first_frame`; add a `last_frame` image to set where the video ends.

### Which text-to-video model makes 4K?

Seedance 2.0 makes 4K (`"resolution": "4k"`) through rendermate. Seedance 2.5 goes up to 1080p; 2.0 Fast and 2.0 Mini up to 720p.

Published 2026-12-03. Page: https://rendermate.com/blog/text-to-video-api. Docs: https://rendermate.com/docs.
