> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chariot.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a forced alignment

> Fetch one alignment and its word timings.



## OpenAPI

````yaml api-reference/openapi.json GET /v1/forced-alignment/{alignment_id}
openapi: 3.1.0
info:
  title: Chariot API
  version: '1'
  description: >-
    Chariot is a voice AI platform built for Indian and English languages.
    Convert text into natural-sounding speech over a simple REST call, an HTTP
    audio stream, or a low-latency WebSocket, and transcribe speech to text over
    a streaming WebSocket or from a prerecorded file (Beta). This reference
    documents the public, API-key-authenticated endpoints.
  contact:
    name: Chariot Support
    email: support@chariot.in
    url: https://chariot.in
servers:
  - url: https://api.chariot.in
    description: Production
security:
  - APIKeyHeader: []
tags:
  - name: Text to Speech
    description: Convert text into speech synchronously or as a stream.
  - name: Speech to Text
    description: >-
      Transcribe prerecorded files (Beta) and review streaming speech-to-text
      sessions.
  - name: Forced Alignment
    description: Time a transcript against its audio, word by word (Beta).
  - name: Voices
    description: Browse the voice catalog.
  - name: Account
    description: Inspect your credit balance and usage.
paths:
  /v1/forced-alignment/{alignment_id}:
    get:
      tags:
        - Forced Alignment
      summary: Get a forced alignment
      description: >-
        **Beta.** One alignment from your workspace. `words` is filled once
        `status` is `completed`. A failed alignment has an `error` and
        `credits_used` of `0`.


        See the [Forced alignment guide](/guides/forced-alignment/overview).
      operationId: getForcedAlignment
      parameters:
        - name: alignment_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The alignment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForcedAlignment'
              example:
                alignment_id: 6f1c2d9e-3b7a-4f0e-9a51-2c8d4e7b1a90
                status: completed
                language: hi
                filename: greeting.wav
                duration_seconds: 1.83
                text_characters: 21
                word_count: 4
                credits_used: 2
                loss: 0.06
                words:
                  - text: नमस्ते,
                    start: 0.12
                    end: 0.58
                    loss: 0.04
                  - text: आप
                    start: 0.66
                    end: 0.81
                    loss: 0.06
                  - text: कैसे
                    start: 0.81
                    end: 1.1
                    loss: 0.05
                  - text: हैं?
                    start: 1.1
                    end: 1.42
                    loss: 0.09
                text: नमस्ते, आप कैसे हैं?
                has_audio: true
                error: null
                created_at: '2026-10-29T10:00:00Z'
                started_at: '2026-10-29T10:00:00Z'
                completed_at: '2026-10-29T10:00:01Z'
                content_expires_at: null
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: No alignment with this ID in your workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - APIKeyHeader: []
components:
  schemas:
    ForcedAlignment:
      type: object
      required:
        - alignment_id
        - status
        - language
        - filename
        - duration_seconds
        - text_characters
        - credits_used
        - created_at
      properties:
        alignment_id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - processing
            - completed
            - failed
        language:
          type: string
          description: ISO 639-1 code the audio was aligned as.
        filename:
          type:
            - string
            - 'null'
          description: >-
            Name of the uploaded file, for display. `null` after
            `content_expires_at`.
        duration_seconds:
          type: number
          description: >-
            Duration of the audio, measured by Chariot. This is what you are
            billed for.
        text_characters:
          type: integer
        word_count:
          type:
            - integer
            - 'null'
        credits_used:
          type: integer
          description: >-
            Credits charged: the duration in seconds, rounded up. `0` when a
            failed alignment was refunded.
        loss:
          type:
            - number
            - 'null'
          description: Average alignment loss over the transcript. Lower is better.
        words:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/ForcedAlignmentWord'
          description: >-
            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:
          type:
            - string
            - 'null'
          description: >-
            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:
          type: boolean
          description: >-
            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:
          oneOf:
            - $ref: '#/components/schemas/ForcedAlignmentError'
            - type: 'null'
        created_at:
          type: string
          format: date-time
        started_at:
          type:
            - string
            - 'null'
          format: date-time
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
        content_expires_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            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.
    Error:
      type: object
      description: Standard error envelope returned by all endpoints.
      properties:
        statusCode:
          type: integer
          description: HTTP status code, echoed in the body.
        error:
          type: string
          description: Machine-readable error class name.
        message:
          type: string
          description: Human-readable description of what went wrong.
      required:
        - statusCode
        - error
        - message
    ForcedAlignmentWord:
      type: object
      required:
        - text
        - start
        - end
      properties:
        text:
          type: string
          description: >-
            The word, exactly as it appears in your transcript, punctuation
            included.
        start:
          type: number
          description: Start time in seconds from the beginning of the audio.
        end:
          type: number
          description: End time in seconds from the beginning of the audio.
        loss:
          type:
            - number
            - 'null'
          description: >-
            Alignment loss for this word. Lower means the aligner is more
            confident. `null` when not available.
    ForcedAlignmentError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          enum:
            - transcript_unalignable
            - audio_too_short
            - aligner_unavailable
            - aligner_timeout
            - interrupted
            - internal_error
          description: >-
            Why the alignment failed. `transcript_unalignable`: the transcript
            has no words that can be aligned. `audio_too_short`: the audio is
            too short to align. `aligner_unavailable`: the aligner could not
            process the request. `aligner_timeout`: the aligner took too long.
            `interrupted`: the request was interrupted on Chariot's side.
            `internal_error`: something went wrong on Chariot's side.
        message:
          type: string
          description: >-
            What went wrong, in plain words. A generic message once the content
            has expired.
  responses:
    Unauthorized:
      description: Authentication failed. The API key is missing, invalid, or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missing:
              summary: No credentials provided
              value:
                statusCode: 401
                error: UnauthorizedException
                message: No API key or user credentials provided
            invalid:
              summary: Invalid or unknown API key
              value:
                statusCode: 401
                error: UnauthorizedException
                message: Invalid API Key or user credentials
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: chariotai-api-key
      description: >-
        Your Chariot API key, generated from the dashboard. Send it in the
        `chariotai-api-key` header on every request.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.