Skip to main content

Add the credential

Open Settings > Model Providers, click Add Model Provider and select xAI. Give the row a name, pick the organization, team or project it belongs to, and fill in: Save the row. Every virtual key whose scope can see the row can now dispatch to it, unless the key restricts its providers. See Virtual keys.
The xAI model provider drawer with the XAI_API_KEY field and the routing handle xai

The xAI row: name, scope, XAI_API_KEY and the routing handle xai.

Model names

Write xai/<model>, for example xai/grok-4. The gateway does not infer xAI from a bare name.

Send a request

Endpoints

Last modified on September 6, 2026