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

# Grok Voice TTS

> [Core Function] Grok Voice TTS converts text into natural spoken audio with expressive voices and optional speech tags embedded in the text. [Strengths] Supports 20+ languages (plus auto-detect), 26 built-in voices, multiple codecs (mp3/wav/pcm/mulaw/alaw), and custom voice IDs. [Best For] Product voiceovers, IVR/telephony (mulaw/alaw), and multilingual narration. [Limitations] Do NOT exceed 15,000 characters per request. Audio is returned on the completed task after polling. [Routing] Use this model for xAI Grok Voice quality or custom cloned voices. [Built-in voices] Original: eve (default), ara, leo, rex, sal. Flagship: altair, atlas, carina, castor, celeste, cosmo, helios, helix, iris, kepler, lumen, luna, lux, naksh, orion, perseus, rigel, sirius, ursa, zagan, zenith — case-insensitive; custom voice IDs are also accepted as voice_id.



## OpenAPI

````yaml /model-api/xai/xai-tts.json post /xai/grok-voice-tts
openapi: 3.1.0
info:
  title: xAI Grok Voice Text-to-Speech API
  description: >-
    xAI Grok Voice text-to-speech. Submit text as an async task; poll GET
    /api/v1/tasks/{task_id} for the synthesized audio.
  version: 1.0.0
  contact:
    name: Modellix Support
    email: support@modellix.ai
servers:
  - url: https://api.modellix.ai/api/v1
    description: xAI Grok Voice text-to-speech models API
security:
  - bearerAuth: []
paths:
  /xai/grok-voice-tts:
    post:
      summary: Grok Voice TTS
      description: >-
        [Core Function] Grok Voice TTS converts text into natural spoken audio
        with expressive voices and optional speech tags embedded in the text.
        [Strengths] Supports 20+ languages (plus auto-detect), 26 built-in
        voices, multiple codecs (mp3/wav/pcm/mulaw/alaw), and custom voice IDs.
        [Best For] Product voiceovers, IVR/telephony (mulaw/alaw), and
        multilingual narration. [Limitations] Do NOT exceed 15,000 characters
        per request. Audio is returned on the completed task after polling.
        [Routing] Use this model for xAI Grok Voice quality or custom cloned
        voices. [Built-in voices] Original: eve (default), ara, leo, rex, sal.
        Flagship: altair, atlas, carina, castor, celeste, cosmo, helios, helix,
        iris, kepler, lumen, luna, lux, naksh, orion, perseus, rigel, sirius,
        ursa, zagan, zenith — case-insensitive; custom voice IDs are also
        accepted as voice_id.
      operationId: grokVoiceTTS
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GrokVoiceTTSRequest'
            examples:
              basic:
                summary: Minimal request (default voice eve)
                value:
                  text: Hello! Welcome to the xAI Text to Speech API.
                  language: en
              builtin_voice_ara:
                summary: Built-in voice ara
                value:
                  text: Hello from Ara.
                  language: en
                  voice_id: ara
              full_options:
                summary: Full options
                value:
                  text: Crystal clear audio at maximum quality.
                  language: en
                  voice_id: rex
                  codec: mp3
                  sample_rate: 44100
                  bit_rate: 192000
                  speed: 1.2
                  text_normalization: true
                  optimize_streaming_latency: 0
      responses:
        '200':
          description: >-
            Task submitted successfully. Poll GET /api/v1/tasks/{task_id} until
            the task completes; synthesized audio is returned on the task
            result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AsyncTaskResponse'
              example:
                code: 0
                message: success
                data:
                  status: pending
                  task_id: task-grok-voice-tts-001
                  model_id: xai/grok-voice-tts
                  get_result:
                    method: GET
                    url: >-
                      https://api.modellix.ai/api/v1/tasks/task-grok-voice-tts-001
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    GrokVoiceTTSRequest:
      type: object
      required:
        - text
        - language
      additionalProperties: false
      properties:
        text:
          type: string
          minLength: 1
          maxLength: 15000
          description: >-
            Text to synthesize (max 15,000 characters). Supports inline speech
            tags such as [pause], [laugh], and wrapping tags like
            <whisper>...</whisper>.
        language:
          type: string
          enum:
            - auto
            - en
            - ar-EG
            - ar-SA
            - ar-AE
            - bn
            - zh
            - fr
            - de
            - hi
            - id
            - it
            - ja
            - ko
            - pt-BR
            - pt-PT
            - ru
            - es-MX
            - es-ES
            - tr
            - vi
          description: BCP-47 language code, or auto for automatic detection.
        voice_id:
          default: eve
          description: >-
            Voice ID for synthesis. Built-in voices are listed below (26 total,
            case-insensitive). Custom voice IDs from your xAI voice library are
            also accepted.
          anyOf:
            - type: string
              enum:
                - eve
                - ara
                - leo
                - rex
                - sal
                - altair
                - atlas
                - carina
                - castor
                - celeste
                - cosmo
                - helios
                - helix
                - iris
                - kepler
                - lumen
                - luna
                - lux
                - naksh
                - orion
                - perseus
                - rigel
                - sirius
                - ursa
                - zagan
                - zenith
              description: 'Built-in voices (26). Default: eve.'
            - type: string
              minLength: 1
              description: Custom voice ID from your xAI voice library.
        codec:
          type: string
          enum:
            - mp3
            - wav
            - pcm
            - mulaw
            - alaw
          default: mp3
          description: Audio codec. Default mp3.
        sample_rate:
          type: integer
          enum:
            - 8000
            - 16000
            - 22050
            - 24000
            - 44100
            - 48000
          default: 24000
          description: Sample rate in Hz. Default 24000.
        bit_rate:
          type: integer
          enum:
            - 32000
            - 64000
            - 96000
            - 128000
            - 192000
          default: 128000
          description: MP3 bit rate in bps. Only applied when codec is mp3. Default 128000.
        speed:
          type: number
          minimum: 0.7
          maximum: 1.5
          default: 1
          description: Speech speed multiplier. Range 0.7–1.5. Default 1.0.
        text_normalization:
          type: boolean
          default: false
          description: >-
            When true, normalize written-form text (numbers, abbreviations)
            before synthesis.
        optimize_streaming_latency:
          type: integer
          enum:
            - 0
            - 1
            - 2
          default: 0
          description: >-
            Latency vs quality trade-off: 0 best quality (default), 1 lower
            first-byte latency, 2 lowest first-byte latency.
    AsyncTaskResponse:
      description: Response object for asynchronous task submission.
      type: object
      required:
        - code
        - message
        - data
      properties:
        code:
          type: integer
          description: Response code, 0 indicates success
          example: 0
        message:
          type: string
          description: Response message
          example: success
        data:
          type: object
          required:
            - status
            - task_id
            - model_id
          description: >-
            Task submission details. Poll GET /api/v1/tasks/{task_id} until
            status is success; audio appears in result.resources.
          properties:
            status:
              type: string
              enum:
                - pending
                - processing
              description: Initial task status
              example: pending
            task_id:
              type: string
              description: Unique task identifier for polling
              example: task-grok-voice-tts-001
            model_id:
              type: string
              description: Model ID in provider/model format
              example: xai/grok-voice-tts
            get_result:
              type: object
              description: >-
                Endpoint to query the task result. See Common API: Query Task
                Result.
              properties:
                method:
                  type: string
                  example: GET
                url:
                  type: string
                  example: https://api.modellix.ai/api/v1/tasks/task-grok-voice-tts-001
  responses:
    BadRequest:
      description: Bad request
    Unauthorized:
      description: Unauthorized
    TooManyRequests:
      description: Rate limited
    InternalServerError:
      description: Internal server error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````