Documentation Index
Fetch the complete documentation index at: https://portkey-docs-mintlify-bedrock-guardrails-docs-36443.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Portkey + Groq
Portkey is the Control Panel for AI apps. With it’s popular AI Gateway and Observability Suite, hundreds of teams ship reliable, cost-efficient, and fast apps. With Portkey, you can- Connect to 150+ models through a unified API,
- View 40+ metrics & logs for all requests,
- Enable semantic cache to reduce latency & costs,
- Implement automatic retries & fallbacks for failed requests,
- Add custom tags to requests for better tracking and analysis and more.
Use blazing fast Groq API with OpenAI Compatibility using Portkey!
Since Portkey is fully compatible with the OpenAI signature, you can connect to the Portkey AI Gateway through OpenAI Client.- Set the
base_urlasPORTKEY_GATEWAY_URL - Add
default_headersto consume the headers needed by Portkey using thecreateHeadershelper method.
With OpenAI Client
With Portkey Client
Note: You can safely store your Groq API key in Portkey and access models using virtual keyAdvanced Routing - Load Balancing
With load balancing, you can distribute load effectively across multiple API keys or providers based on custom weights to ensure high availability and optimal performance. Let’s take an example where we might want to split traffic between Groq’sllama-3-70b and OpenAI’s gpt-3.5 giving a weightage of 70-30.
The gateway configuration for this would look like the following:
Observability with Portkey
By routing requests through Portkey you can track a number of metrics like - tokens used, latency, cost, etc. Here’s a screenshot of the dashboard you get with Portkey!

