> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.vapi.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.vapi.ai/_mcp/server.

# xAI

> Configure xAI as your Vapi assistant's language model and choose from the Grok models Vapi supports.

xAI provides language models for Vapi voice agents.

You can use xAI through Vapi's default integration, or connect your own account in [Integrations](/providers/integrations).

## Supported capability

| Capability     | Provider value |
| -------------- | -------------- |
| Language model | `xai`          |

## Language model

Set `model.provider` to `xai` and `model.model` to one of the models Vapi currently supports:

```bash
curl -X PATCH "https://api.vapi.ai/assistant/ASSISTANT_ID" \
  -H "Authorization: Bearer $VAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": {
      "provider": "xai",
      "model": "grok-4.3"
    }
  }'
```

For additional API configuration options, review the [`XaiModel` fields](/api-reference/assistants/create#request.body.model.XaiModel) in the Create Assistant API reference.

| Model                   | Model ID                       |
| ----------------------- | ------------------------------ |
| Grok 4.3 Non-Reasoning  | `grok-4.3`                     |
| Grok 4.20 Reasoning     | `grok-4.20-0309-reasoning`     |
| Grok 4.20 Non-Reasoning | `grok-4.20-0309-non-reasoning` |

You can also set the common model options `temperature` (`0` to `2`) and `maxTokens` (`50` to `10000`). If omitted, Vapi uses `0.5` and `250`, respectively.

## Related

#### [xAI text-to-speech](/providers/voice/xai)

Configure xAI for text-to-speech.

#### [xAI speech-to-text](/providers/transcriber/xai)

Configure xAI for speech-to-text.

#### [Model providers](/providers/model/overview)

Compare every language model provider Vapi supports.