Which xAI models does AIgateway support?
AIgateway routes 2 xAI models including Grok 4. 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"). Request and response shapes are identical to OpenAI.
How much do xAI models cost on AIgateway?
Pass-through xAI pricing plus a 5% platform fee applied at credit top-up, not per call. 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 waives the 5% platform fee on those calls.
Where is xAI based?
xAI is headquartered in Palo Alto, CA.
Is there a free tier?
AIgateway's free tier is 100 requests/day on Kimi K2.6 — any account can test without a card. Paid xAI models require a $5 minimum credit top-up.