providers/xAI
xAI · Palo Alto, CA

xAI models on AIgateway — pricing, context, capabilities

xAI ships 24 models on AIgateway spanning audio-stt, audio-tts, image, text, video. Call any of them via the OpenAI-compatible endpoint at api.aigateway.sh/v1 with one key. Pass-through inference pricing, no seat fees, no minimum.

Get your key →See pricingVisit xAI →
models · 24modalities · audio-stt, audio-tts, image, text, videolocation · Palo Alto, CA
audio-stt

xAI audio-stt models

1 audio-stt model from xAI.

Grok STT
xai/grok-stt
xAI's Grok speech-to-text model. Transcribes audio files into text across 25 languages with word-level timestamps, multichannel transcription, speaker diarization, and key-term biasing.
$0.0017 / min
audio-tts

xAI audio-tts models

2 audio-tts models from xAI.

Grok TTS
xai/grok-tts
xAI's Grok text-to-speech model. Generates high-fidelity spoken audio in 5 expressive voices (eve, ara, rex, sal, leo) with 20+ supported languages. Supports inline speech tags for laughter, whispers, and pauses.
$0.0150 / 1k chars
xAI Text to Speech
xai/tts/v1
Generate speech with expressive and realistic voices from xAI
$0.0150 / 1k chars
image

xAI image models

6 image models from xAI.

Grok Imagine Image
xai/grok-imagine-image
xAI's Grok Imagine image model. Generates and edits images from text and reference-image inputs with configurable aspect ratio and resolution.
$0.020 / image
Grok Imagine Image (Quality Text To Image)
xai/grok-imagine-image-quality
Grok Imagine Pro is an advanced AI model from xAI that creates high-quality visuals from text prompts and allows you to edit or analyze existing images.
$0.010 / image
Grok Imagine Image 2.0 (Text To Image)
xai/grok-imagine-image-2.0
Generate images from text using xAi's Grok Imagine 2.0 model.
$0.060 / image
Grok Imagine Image (Edit)
xai/grok-imagine-image/edit
Edit images precisely with xAI's Grok Imagine model
$0.020 / image
Grok Imagine Image Editing Quality
xai/grok-imagine-image/quality/edit
Grok Imagine Pro is an advanced AI model from xAI that creates high-quality visuals from text prompts and allows you to edit or analyze existing images.
$0.010 / image
Grok Imagine Image 2.0 (Edit)
xai/grok-imagine-image/v2.0/edit
Edit images with xAi's Grok Imagine 2.0 model.
$0.010 / image
text

xAI text models

6 text models from xAI.

Grok 4.7
★ featured
xai/grok-4.7
xAI's Grok 4.7, a frontier reasoning model for coding, agentic tasks, and knowledge work. Accepts text and image inputs, and supports function calling, structured outputs, and configurable reasoning effort (low, medium, high, xhigh).
$2.00 in · $6.00 out / 1M500,000 ctx
Grok 4.6
xai/grok-4.6
xAI's Grok 4.6, a flagship reasoning model for coding, agentic tasks, and visual work. Accepts text and image inputs, and supports function calling and structured outputs.
$2.00 in · $6.00 out / 1M500,000 ctx
Grok 4.5
xai/grok-4.5
xAI's Grok 4.5, a frontier model built for coding, agentic tasks, and knowledge work. Accepts text and image inputs, and supports function calling, structured outputs, and configurable reasoning effort (low, medium, high).
$2.00 in · $6.00 out / 1M500,000 ctx
Grok 4.20 Non-Reasoning
xai/grok-4.20-0309-non-reasoning
xAI's Grok 4.20 non-reasoning model. Skips the thinking trace for fast, single-pass responses while keeping the same training as the reasoning variant.
$2.00 in · $6.00 out / 1M2,000,000 ctx
Grok 4.20 Reasoning
xai/grok-4.20-0309-reasoning
xAI's Grok 4.20 reasoning model. Uses extended thinking to work through complex problems, returning a reasoning trace alongside the final answer.
$2.00 in · $6.00 out / 1M2,000,000 ctx
Grok 4.3
xai/grok-4.3
xAI's Grok 4.3 model with a 1M-token context window and strong agentic tool calling with minimal hallucinations. Accepts text and image inputs, and supports function calling, structured outputs, and configurable reasoning effort (none, low, medium, high).
$1.25 in · $2.50 out / 1M1,000,000 ctx
video

xAI video models

9 video models from xAI.

Grok Imagine Video 1.5 Preview
xai/grok-imagine-video-1.5-preview
xAI's next-generation video generation model. Generates, edits, and extends videos from text and image inputs. Supports multiple aspect ratios and resolutions with improved quality over the previous generation.
$0.080 / sec
Grok Imagine Video
xai/grok-imagine-video
xAI's video generation model. Generates, edits, and extends videos from text and image inputs with native synchronized audio including dialogue, sound effects, and music. Supports multiple creative modes (normal, fun, custom).
$0.050 / sec
Grok Imagine Video (Edit Video)
xai/grok-imagine-video/edit-video
Edit videos using xAI's Grok Imagine
$0.050 / sec
Grok Imagine Extend Video
xai/grok-imagine-video/extend-video
Extend videos with xAI's Grok Imagine video model
$0.050 / sec
Grok Imagine Video (Image To Video)
xai/grok-imagine-video/image-to-video
Generate videos from images with audio using xAI's Grok Imagine Video model.
$0.050 / sec
Grok Imagine Reference to Video
xai/grok-imagine-video/reference-to-video
Generate videos using multiple reference images with xAI's Grok Imagine video model
$0.050 / sec
Grok Imagine Video 1.5
xai/grok-imagine-video/v1.5/image-to-video
Generate videos from images with audio using xAI's Grok Imagine 1.5 Video model.
$0.010 / sec
Grok Imagine Video 1.5 Reference to Video
xai/grok-imagine-video/v1.5/reference-to-video
Generate videos from images and audio references using xAI's Grok Imagine 1.5 Video model.
$0.010 / sec
Grok Imagine Video 1.5 Text to Video
xai/grok-imagine-video/v1.5/text-to-video
Generate videos from prompts with audio using xAI's Grok Imagine 1.5 Video model.
$0.010 / sec
About xAI

Who they are, what they focus on

xAI builds the Grok family. Grok 4 is strong on real-time awareness (live search integration), competitive on math and code, and known for a distinctive tone. Good pick when freshness matters.

Headquartered in Palo Alto, CA. Homepage: x.ai.

FAQ

Common questions about xAI on AIgateway

Which xAI models does AIgateway support?
AIgateway routes 24 xAI models including Grok 4.7. Full catalog with pricing and context windows is in the sections above.
How do I call a xAI model from my code?
Point the OpenAI SDK at https://api.aigateway.sh/v1 with your AIgateway key and set model to the xAI slug (e.g. "xai/grok-4.7"). Request and response shapes are identical to OpenAI.
How much do xAI models cost on AIgateway?
Pass-through xAI pricing. No seat fees, no minimum beyond the $5 top-up floor.
Can I bring my own xAI API key (BYOK)?
Yes. Attach your xAI key in the AIgateway dashboard. Calls to xAI models flip to pass-through and AIgateway adds no platform fee on those calls.
Where is xAI based?
xAI is headquartered in Palo Alto, CA.
Is there free credit?
A payment method is required to call the API — adding a card is free and never charges you, and grants $1 in credit across a curated trial catalog led by GLM-5.3 Flash. The $1 expires 30 days after you add the card. Paid xAI models require a $5 minimum credit top-up.
Other providers

Browse other labs

Anthropic →OpenAI →Google →Moonshot →DeepSeek →Meta →Mistral →Alibaba →Deepgram →Black Forest Labs →BAAI →All providers →