# Render (`render`)

> Render a varg composition written as code into a finished video in the cloud. Flat price per run.

- Capability: Video rendering (tool `render`) — Text to video
- Price: from $0.05 per run (1 credit = $0.01). Exact price for a request: POST https://api.varg.ai/v2/estimate
- Typical time: ~2 min
- JSON Schema: https://api.varg.ai/v2/tools/render?model=render (public, no key)
- Try it: https://varg.ai/dashboard/tools/playground?model=render

## Call it

REST: `POST https://api.varg.ai/v2/tools/render/call` with `Authorization: Bearer $VARG_API_KEY` (create a key at https://varg.ai/dashboard/api).
It answers `202` with a job right away. Poll `GET /v2/jobs/{id}` until `status` is `completed`, then read `output.outputs[0].url` — or pass `options.webhook_url` and get the finished job POSTed to you.

```bash
curl -X POST https://api.varg.ai/v2/tools/render/call \
  -H "Authorization: Bearer $VARG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "render",
  "code": "\nconst music = Music({\n  prompt: \"dark cyberpunk electronic odyssey, brooding synth bass, pulsing industrial beats, neon noir atmosphere, dystopian city vibes\",\n  model: elevenlabs.musicModel(\"music_v1\"),\n  volume: 0.75,\n  duration: 10\n});\n\nconst vid = Video({\n  prompt: \"slow cinematic drone glide low through rain-soaked cyberpunk alleyway at night, neon signs reflecting in puddles, steam rising from grates, holographic advertisements flickering on walls, atmospheric fog, flying vehicles in the distance\",\n  model: varg.videoModel(\"kling-v3\"),\n  duration: 10,\n  aspectRatio: \"16:9\"\n});\n\nexport default (\n  <Render width={1920} height={1080}>\n    <Clip duration={10}>\n      {vid}\n    </Clip>\n    {music}\n  </Render>\n);\n",
  "verbose": true
}'
```

MCP: the varg server `https://mcp.varg.ai/mcp` (OAuth sign-in, no key) runs it with `call_tool`:

```json
{
  "tool": "render",
  "input": {
    "model": "render",
    "code": "\nconst music = Music({\n  prompt: \"dark cyberpunk electronic odyssey, brooding synth bass, pulsing industrial beats, neon noir atmosphere, dystopian city vibes\",\n  model: elevenlabs.musicModel(\"music_v1\"),\n  volume: 0.75,\n  duration: 10\n});\n\nconst vid = Video({\n  prompt: \"slow cinematic drone glide low through rain-soaked cyberpunk alleyway at night, neon signs reflecting in puddles, steam rising from grates, holographic advertisements flickering on walls, atmospheric fog, flying vehicles in the distance\",\n  model: varg.videoModel(\"kling-v3\"),\n  duration: 10,\n  aspectRatio: \"16:9\"\n});\n\nexport default (\n  <Render width={1920} height={1080}>\n    <Clip duration={10}>\n      {vid}\n    </Clip>\n    {music}\n  </Render>\n);\n",
    "verbose": true
  },
  "wait": true
}
```

## Inputs

| field | type | required | default | allowed | description |
|---|---|---|---|---|---|
| `model` | string | yes | — | `render` or a route key below | Which model runs the job. |
| `code` | string | yes | — | — | — |
| `verbose` | boolean | no | — | — | — |
| `mode` | string | no | — | strict \| preview | — |
| `output` | string | no | — | video \| frames | — |

Media inputs are URLs. Upload a local file first with `POST /v2/files` and pass the returned URL.

## Routes

`"model": "render"` picks a route automatically (priority order, then the inputs you send). To pin one, pass its key as `model`.

| model key | provider | modality | price from | typical time |
|---|---|---|---|---|
| `varg:render` | varg | text-to-video | $0.05 | ~2 min |

## Example output

- video/mp4: https://s3.varg.ai/files/194b94d0-58ff-4e8b-91de-4f1959d04013/file_dc107d1da453.mp4

---

Catalog version 2026-11-11T12:59:09.901887+00:00. All models: https://varg.ai/models/llms.txt
