Skip to main content
POST
Create a forced alignment

Authorizations

chariotai-api-key
string
header
required

Your Chariot API key, generated from the dashboard. Send it in the chariotai-api-key header on every request.

Body

multipart/form-data
file
file
required

The audio: WAV, MP3, FLAC, OGG, M4A, AAC or WebM. Video containers such as MP4 must contain an audio track.

text
string
required

The transcript of the audio as plain text, up to 5,000 characters. Speaker labels and timestamps are not supported.

language
string
default:hi

ISO 639-1 code of the spoken language, for example hi, en, ta. See GET /v1/forced-alignment/options for the full list.

Response

The completed alignment.

alignment_id
string<uuid>
required
status
enum<string>
required
Available options:
processing,
completed,
failed
language
string
required

ISO 639-1 code the audio was aligned as.

filename
string | null
required

Name of the uploaded file, for display. null after content_expires_at.

duration_seconds
number
required

Duration of the audio, measured by Chariot. This is what you are billed for.

text_characters
integer
required
credits_used
integer
required

Credits charged: the duration in seconds, rounded up. 0 when a failed alignment was refunded.

created_at
string<date-time>
required
word_count
integer | null
loss
number | null

Average alignment loss over the transcript. Lower is better.

words
object[] | null

One entry per whitespace-separated word of your transcript, in order. Present once status is completed; null in lists and before completion. Punctuation-only words have start equal to end. null after content_expires_at.

text
string | null

The transcript as aligned. Returned when you create the alignment and by its detail; null in lists, and once the content has expired.

has_audio
boolean

Whether the audio you sent is stored and available from GET /v1/forced-alignment/{alignment_id}/audio. It is stored just after the alignment is created, so it can read false for a moment. false once the content has expired.

error
object | null
started_at
string<date-time> | null
completed_at
string<date-time> | null
content_expires_at
string<date-time> | null

When the words, transcript, filename and stored audio expire under your workspace's data retention setting. After it, words, text and filename read as null and has_audio is false; duration, status and credits remain. null means kept until deleted.