xAI (Grok)

Configure jambonz to use xAI’s Grok models — reasoning + vision over an OpenAI-compatible API.

xAI’s Grok family is available to the agent verb over an OpenAI-compatible Chat Completions API — streaming, tool calls, and vision are all supported. This is a good fit for voice agents that need strong reasoning and the option to reason over images.

This page covers the agent verb’s llm block (cascaded STT → LLM → TTS). For xAI’s realtime speech-to-speech offering, see xAI Voice Agent on the llm verb page.

Get credentials

  1. Sign in at https://console.x.ai.
  2. Open API Keys (direct link: https://console.x.ai/team/default/api-keys).
  3. Click Create API Key, copy the xai-... string.

Configure in jambonz

In the portal: Account → LLM Services → + Add LLM Service → xAI (Grok).

API Key
stringRequired

The xai-... key from xAI’s console.

Base URL
string

Defaults to https://api.x.ai/v1. Override only for proxies — xAI’s production endpoint is the default.

Click Test to verify.

Use in an agent verb

1session.agent({
2 llm: {
3 vendor: 'xai',
4 model: 'grok-4.3',
5 llmOptions: {
6 systemPrompt: 'You are a helpful voice assistant.',
7 },
8 },
9 stt: { vendor: 'deepgram', language: 'en-US' },
10 tts: { vendor: 'cartesia', voice: 'sonic-english' },
11 turnDetection: 'krisp',
12 bargeIn: { enable: true },
13 actionHook: '/agent-complete',
14}).send();

Available Models

Model slugs move quickly — see xAI’s docs for the live catalog. The jambonz manifest ships these; you can also call listAvailableModels() or query xAI’s /v1/models endpoint directly.

ModelNotes
grok-4.3Flagship — reasoning, vision, tool calls, ~1M context. Best general pick.
grok-4.20-0309-reasoningReasoning variant.
grok-4.20-0309-non-reasoningLower-latency non-reasoning variant.
grok-4.20-multi-agent-0309Deep-research multi-agent — high latency; not suited to real-time voice.

Quirks & errors

Chat Completions is “legacy” but fully functional. xAI has marked the Chat Completions endpoint legacy in favor of its Responses API, but it continues to support streaming and tool calls in full — which is what jambonz relies on. No action needed.

Retired model slugs silently redirect. grok-4, grok-3, grok-3-mini, and grok-4-fast still resolve, but xAI redirects them to grok-4.3 and bills at flagship rates. Use the current ids listed above to avoid surprise cost.

401 — bad or revoked key. Regenerate at console.x.ai/team/default/api-keys.