Model providers
Gateway
Groq
Route Groq requests through Inference for full observability.
Route your Groq requests through the Inference gateway to get cost tracking, latency monitoring, and analytics. Groq is OpenAI-compatible, so you use the OpenAI SDK with the x-inference-provider-url header to specify Groq's base URL.
Prefer automatic setup? Run
inf instrument to instrument your codebase in seconds. Learn moreSetup
Get your API keys
You need two keys:
- Inference project API key — from your dashboard under API Keys
- Groq API key — from your Groq console
Set environment variables
export INFERENCE_API_KEY=<your-project-api-key>
export GROQ_API_KEY=<your-groq-api-key>Update your code
Point the SDK at the gateway. Your project API key goes in apiKey, and the x-inference-provider-url header tells the gateway to forward requests to Groq.