SandBase is live — $1 in free credits on signupStart free ›
Use in agentxAI models

xAI modelsaudio generation api

xai/grok-tts

Grok Tts by xAI - convert text to natural-sounding speech with AI. Supports multiple voices, languages, emotions, and speaking styles for content creation and accessibility.

Input
The text to convert to speech. Maximum 15,000 characters. Supports speech tags for expressive delivery: inline tags like [laugh], [pause], [sigh] and wrapping tags like <whisper>text</whisper>, <slow>text</slow>.
The voice to use for speech synthesis. Allowed values: eve, ara, rex, sal, leo.
Idle

Example output — click Run to generate your own

API README

Grok Text to Speech

Grok Text to Speech is a specialized SandBase endpoint built to turn scripts as long as 15,000 characters into expressive spoken audio. It is most useful when teams need five selectable voices, inline performance cues, and long-form narration in a single request, with the route’s inputs defining a repeatable production contract instead of leaving critical delivery choices to an ad-hoc manual workflow.

Use this exact route when its input mode matches the creative asset already in hand: describe the visual or spoken result clearly, set only the controls that support the intended delivery, and keep the subject, action, environment, camera or performance direction internally consistent. The result is returned asynchronously as a downloadable media URL suitable for review, automation, or downstream finishing.

Highlights

  • Expressive speech markup. Inline cues such as [laugh], [pause], and [sigh] add performance beats without splitting the script into separate clips.
  • Phrase-level delivery control. Wrapping tags such as <whisper> and <slow> shape how selected passages are spoken while the surrounding narration remains natural.
  • Five distinct voices. Choose Eve, Ara, Rex, Sal, or Leo to match the tone and character of the production.
  • Long-form synthesis. Inputs up to 15,000 characters support explainers, accessibility narration, lessons, and story passages in one request.

Pricing

Text is billed in 1,000-character blocks, rounded up. Each started block costs $0.0042.

Text lengthPrice
1–1,000 characters$0.0042
1,001–2,000 characters$0.0084
2,001–3,000 characters$0.0126
Up to 15,000 characters$0.0630

When to Use

ScenarioWhy this route fits
Concept developmentChoose Grok Text to Speech when its grok tts workflow matches the starting material and you need several clearly directed variations.
Production iterationUse explicit duration, resolution, ratio, seed, or quality controls to compare versions without changing the core creative brief.
Channel adaptationGenerate directly in the landscape, square, portrait, or vertical format required by the destination whenever that control is available.
Automated pipelinesIntegrate the asynchronous media URL into review queues, asset libraries, publishing tools, or a later finishing stage.
Alternative routePick a related text-, image-, reference-, edit-, or turbo route when the available source media or required degree of control is different.

Prompt Guide

Lead with the main subject or source asset, then describe the intended action or transformation, environment, composition, camera or vocal delivery, lighting and mood. Keep instructions concrete and compatible; use the route’s explicit fields for duration, resolution, ratio, quality, voice, or reproducibility instead of burying those settings in prose.

{
  "text": "Welcome to the product tour. [pause] Let us begin.",
  "voice": "eve"
}

Technical Specs

PropertyDetails
Model IDxai/grok-tts
Required inputsNone declared
ExecutionAsynchronous; poll the returned generation ID
OutputDownloadable media URL
textstring; optional
voicestring; optional; choices: eve, ara, rex, sal, leo

Related Models

ModelBest for
xai/grok-imagine-video/text-to-videoAlternative text to video workflow
xai/grok-imagine-video/extendAlternative extend workflow
xai/grok-imagine-video/image-to-videoAlternative image to video workflow
xai/grok-imagine-video/reference-to-videoAlternative reference to video workflow

More Models by xAI

xai/grok-imagine-video/1.5/image-to-videoGrok Imagine Video 1.5 is xAI's image-to-video AI model. Bring static images to life with fluid animation, consistent character motion, and professional-grade video output.Pay per usexai/grok-imagine-image/editGrok Imagine Image Edit is xAI's intelligent image editing model. Transform, retouch, and reimagine existing images using text prompts - from background replacement to artistic style conversion.Pay per usexai/grok-imagine-video/image-to-videoGrok Imagine Video is xAI's image-to-video AI model. Bring static images to life with fluid animation, consistent character motion, and professional-grade video output.Pay per usex-ai/grok-4.3Grok 4.3 is a reasoning model from xAI. It accepts text and image inputs with text output, and is suited for agentic workflows, instruction-following tasks, and applications requiring high factual acc...$$xai/grok-imagine-video/text-to-videoGrok Imagine Video by xAI - generate cinematic videos from text descriptions with AI. Create high-quality video content with natural motion, camera control, and optional audio generation.x-ai/grok-4.20Grok 4.20 is a reasoning model from xAI with industry-leading speed and agentic tool calling capabilities. It combines the lowest hallucination rate on the market with strict prompt adherance, deliver...$$x-ai/grok-3-miniA lightweight model that thinks before responding. Fast, smart, and great for logic-based tasks that do not require deep domain knowledge. The raw thinking traces are accessible.$x-ai/grok-build-0.1Grok Build 0.1 is xAI’s fast coding model trained specifically for agentic software engineering workflows. It supports text and image inputs with text output, and is optimized for interactive coding a...$$