Prerequisite: You need an AI Gateway endpoint before continuing. Create one using the dashboard quickstart or follow the manual setup guide.
Requirements
For any SDK or client to work with the AI Gateway, it must:- Support the OpenAI API or Anthropic Claude API format
- Allow customizing the base URL / endpoint
- Send requests with proper authorization headers (for OpenAI API,
Authorization; for Anthropic Claude API,x-api-key)
cURL
For testing or shell scripts:HTTP request format
Any HTTP client can call the AI Gateway:Using provider prefixes
All clients support routing to specific providers using model prefixes:Supported endpoints
The AI Gateway supports these endpoints:| Endpoint | API Format | Description |
|---|---|---|
/v1/chat/completions | OpenAI | Chat completions |
/v1/completions | OpenAI | Legacy completions |
/v1/embeddings | OpenAI | Text embeddings |
/v1/models | OpenAI | List available models |
/v1/messages | Anthropic | Messages |
Next steps
- OpenAI SDK - Official Python, TypeScript, Go, Java, and .NET guide
- Vercel AI SDK - For Next.js and React applications
- LangChain - For LangChain applications
- Model Selection Strategies - Configure routing