YepAPI
AI Models

Eleven Forced Alignment

Time every word and character of a known text against its recording.

Pricing, live playground and model overview: Eleven Forced Alignment API on YepAPI

POST/v1/media/queue
$0.44/hour

Overview

Forced alignment takes a recording and the text that was spoken, and returns when each word and character is said. Use it for subtitles, karaoke and lip-sync timing when you already have the script.

PropertyValue
Model IDelevenlabs/forced-alignment
Aliasforced-alignment
CategoryForced Alignment
Pricing$0.44 per hour of audio

Usage

All media models use the async job queue. Submit a job, then poll for the result.

Step 1: Submit Job

const res = await fetch('https://api.yepapi.com/v1/media/queue', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    model: 'elevenlabs/forced-alignment',
    prompt: 'The harbour was quiet this morning, and the boats had not yet gone out.',
    audioData: {
      mimeType: 'audio/mpeg',
      base64: 'BASE64_DATA'
    }
  }),
});
const { data } = await res.json();
// data.jobId — use this to poll for results
curl -X POST https://api.yepapi.com/v1/media/queue \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "elevenlabs/forced-alignment", "prompt": "The harbour was quiet this morning, and the boats had not yet gone out.", "audioData": {"mimeType": "audio/mpeg", "base64": "BASE64_DATA"}}'

Step 2: Poll for Result

curl https://api.yepapi.com/v1/media/status/JOB_ID \
  -H "x-api-key: YOUR_API_KEY"

When status is completed you get result.data with characters, words (each with text, start, end) and loss. Results are kept for one hour.

Request Body

ParameterTypeRequiredDescriptionDefault
modelstringYeselevenlabs/forced-alignment or alias forced-alignment—
promptstringYesThe exact text spoken, up to 100,000 characters—
audioDataobjectOne of theseThe file as mimeType and base64: MP3, WAV, FLAC, OGG, M4A or MP4. Up to about 18 MB—
options.referenceAudioUrlstringOne of thesePublic URL of the file, up to 50 MB—

Features

  • Word and character timings
  • 29 languages
  • Audio up to 1 hour

Billing

Billed per second of audio, measured when you submit. $0.01 minimum.

Under the Hood

Powered by ElevenLabs.

On this page