Gateway Integration
1
2
Create an X AI account
Log into https://console.x.ai/ or create an account. Once you have an account, you
can generate an API key from your dashboard.
3
Set HELICONE_API_KEY and XAI_API_KEY as environment variables
4
Modify the base URL and add Auth headers
Replace the following X AI URL with the Helicone Gateway URL:
https://api.x.ai/v1/chat/completions
-> https://x.helicone.ai/v1/chat/completions
and then add the following authentication headers: