# ElevenLabs Forced Alignment API

> ElevenLabs Forced Alignment matches a known transcript to an audio file and returns start and end timestamps for every word and character.

Source: https://www.sandbase.ai/models/elevenlabs/forced-alignment
API reference: https://www.sandbase.ai/models/elevenlabs/forced-alignment#api

## Facts

- Provider: ElevenLabs
- Type: Audio model
- Model ID: `elevenlabs/forced-alignment`
- Price: From $0.30 per run
- Capabilities: speech to text
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

- Unified Run API: `POST https://api.sandbase.ai/v1/run`

```bash
curl -X POST https://api.sandbase.ai/v1/run \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "elevenlabs/forced-alignment",
  "text": "Hey, this is a test recording for Scribe version two, which is now available on fal.ai.",
  "audio": "https://static.sandbase.ai/examples/elevenlabs/scribe-v2/input_audio_0.mp3"
}'
```

The response returns a run id; poll `GET https://api.sandbase.ai/v1/run/{id}` until the status is `completed` or `failed`.

## FAQ

### How do I call ElevenLabs Forced Alignment through SandBase?

Create a SandBase API key, then send requests with the model ID "elevenlabs/forced-alignment" to Unified Run API (/v1/run) at https://api.sandbase.ai. The request examples on this page show the exact payload.

### Do I need a separate ElevenLabs account?

No. One SandBase API key and balance gives you access to ElevenLabs Forced Alignment and the other models in the catalog; you do not need to sign up with ElevenLabs separately.

## README

### ElevenLabs Forced Alignment

ElevenLabs Forced Alignment takes an audio file and its transcript and returns when each word and character is spoken. Use it for subtitles, karaoke-style highlighting, and lip-sync timing when you already have the text.

#### Fields

| Field | Type | Default | Notes |
|---|---|---|---|
| `audio` | audio file or URL, required | — | Up to 3 GB and 10 hours. |
| `text` | string, required | — | Transcript to align with the audio. |

#### Output

`words` (text, start, end, loss per word), `characters` (text, start, end per character) and the average `loss`.

#### Billing

$0.30 per started hour of input audio, minimum 1 hour. The charge uses the measured audio length.

| Audio | Price |
|---|---|
| Up to 1 h | $0.30 |
| 2 h | $0.60 |
| 10 h | $3.00 |

Failed runs are not charged.
