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 format
- Allow customizing the base URL / endpoint
- Send requests with proper
Authorizationheaders
cURL
For testing or shell scripts:HTTP request format
Any HTTP client can call the AI Gateway using the OpenAI API format:Using provider prefixes
All clients support routing to specific providers using model prefixes:Supported endpoints
The AI Gateway supports these OpenAI-compatible endpoints:| Endpoint | Description |
|---|---|
/v1/chat/completions | Chat completions (GPT-4, Claude, etc.) |
/v1/completions | Legacy completions |
/v1/embeddings | Text embeddings |
/v1/models | List available models |
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