# Mirage Text Overlays

> Run Mirage Text Overlays by mirage online or via API. from $0.00000277/sec, no setup.

**URL:** https://inference.sh/apps/mirage/text-overlays
**Last updated:** 2026-07-29

---

Render up to 4 static text variants onto one video with per-variant font, size and colour — built for testing ad hooks and headlines against the same footage.

- app: `mirage/text-overlays`
- maker: [mirage](https://inference.sh/apps/mirage.md)
- category: [video](https://inference.sh/apps/category/video.md)
- input → output: video → video
- tasks: [video to video](https://inference.sh/apps/tag/video-to-video.md)
- price: from $0.00000277/sec
- runs via: api, javascript and python sdk, belt cli, mcp

## text-overlays API Guide

### About
render up to 4 static text variants onto one video with per-variant font, size and colour — built for testing ad hooks and headlines against the same footage.

### Get an API Key
Create one in [settings → api keys](https://app.inference.sh/settings/keys). The examples read it from `INFERENCE_API_KEY`.

```bash
export INFERENCE_API_KEY="inf_your_key"
```

### 1. Calling the API

#### Install the Client

```bash
pip install inferencesh
```

#### Run and Get Result
Submit a request and wait for the final result.

```python
import os
from inferencesh import inference

client = inference(api_key=os.environ["INFERENCE_API_KEY"])

## version @6zcrv1jx pinned
result = client.run({
        "app": "mirage/text-overlays@6zcrv1jx",
        "input": {
            "video": "https://example.com/file.png",
            "texts": [
                "I tried this for a week",
                "Nobody talks about this",
                "Day 3 changed it"
            ]
        }
    })

print(result["output"])
```

#### Stream Live Updates
Get real-time progress updates as the task runs.

```python
import os
from inferencesh import inference

client = inference(api_key=os.environ["INFERENCE_API_KEY"])

## version @6zcrv1jx pinned
## stream=True yields updates as they arrive
for update in client.run({
        "app": "mirage/text-overlays@6zcrv1jx",
        "input": {
            "video": "https://example.com/file.png",
            "texts": [
                "I tried this for a week",
                "Nobody talks about this",
                "Day 3 changed it"
            ]
        }
    }, stream=True):
    if update.get("progress"):
        print(f"progress: {update['progress']}%")
    if update.get("output"):
        print(f"output: {update['output']}")
```

#### Run in the Background
Start the task and get its id back right away, then check on it with `GET /tasks/{id}`. It is done when `status` is 10 (completed), 11 (failed) or 12 (cancelled).

```python
import os
from inferencesh import inference, TaskStatus

client = inference(api_key=os.environ["INFERENCE_API_KEY"])

## returns as soon as the task is created
task = client.run({
        "app": "mirage/text-overlays@6zcrv1jx",
        "input": {
            "video": "https://example.com/file.png",
            "texts": [
                "I tried this for a week",
                "Nobody talks about this",
                "Day 3 changed it"
            ]
        }
    }, wait=False)

## later: read its current state
state = client.tasks.get(task["id"]).data
if state["status"] == TaskStatus.COMPLETED:
    print(state["output"])
```

### 2. Files

#### Automatic Upload

```python
## local file paths are automatically uploaded
result = client.run({
    "app": "mirage/text-overlays@6zcrv1jx",
    "input": {
        "image": "/path/to/local/image.png",  # detected & uploaded
        "audio": "https://example.com/audio.mp3",  # url passed through
    }
})
```

#### Manual Upload

```python
## upload and get a hosted URL
file = client.files.upload("/path/to/file.png")
print(file.uri)  # https://cloud.inference.sh/...
```

### 3. Schema

#### Input
- **video** (string) *required*: Source video to render text onto (MP4 or MOV), at most 50 MB.
- **texts** (array) *required*: Text variants to render, one output video per entry. Up to 4 — the point is testing several hooks against the same footage in one call.
- **fonts** (array): Font per variant, aligned by position with texts. Blank entries let Mirage decide. Omit entirely to auto-pick every font.
- **sizes** (array): Font size in pixels per variant, aligned by position with texts. Blank entries auto-decide.
- **colors** (array): Text colour per variant as #RRGGBB, aligned by position with texts. Blank entries auto-decide.

#### Output
- **overlay_id** (string): Mirage text overlay job ID
- **results** (array): Per-variant outcome, including any that failed on their own
- **videos** (array): Rendered videos, in the order of texts

## other video apps

- [VACE](https://inference.sh/apps/pruna/vace.md): $0.40/video
- [P-Video-Animate](https://inference.sh/apps/pruna/p-video-animate.md): $0.03/sec 720p, $0.06/sec 1080p
- [P-Video-Upscale](https://inference.sh/apps/pruna/p-video-upscale.md): Std: $0.01/sec 720p, $0.02 1080p, $0.04 2k, $0.08 4k; high fps 2x
- [P-Video-2-Pro-Avatar](https://inference.sh/apps/pruna/p-video-2-pro-avatar.md): $0.02/sec 480p, $0.04/sec 768p, $0.06/sec 1080p, $0.08/sec 2k, $0.12/sec 4k
- [P-Video-2-Pro-Reference](https://inference.sh/apps/pruna/p-video-2-pro-reference.md): Output: cost $0.015-$0.105/sec, speed $0.02-$0.115/sec. Ref video: $0.03-$0.06/sec. Ref img: $0.005/img. Ref audio: $0.0015-$0.0025/sec

## faq

### how much does Mirage Text Overlays cost?

from $0.00000277/sec. you pay per run from your inference shell credits. no subscription is required.

### how do I run Mirage Text Overlays via api?

call mirage/text-overlays with the javascript or python sdk, the rest api, or `belt app run mirage/text-overlays` from a terminal. the api reference on this page lists every input.

### who makes Mirage Text Overlays?

Mirage Text Overlays is made by mirage and runs on inference shell. every mirage app is listed at https://inference.sh/apps/mirage.

### can my agent use Mirage Text Overlays?

yes. agents call it as a tool through the inference shell mcp server (https://api.inference.sh/mcp), the belt cli or the sdk, and pay per run like you do.

### what are the alternatives to Mirage Text Overlays?

other video apps on inference shell include VACE, P-Video-Animate, P-Video-Upscale, P-Video-2-Pro-Avatar. they run through the same api, so switching is a one-line change.
