osmAPI Documentation
osmAPI is a unified AI gateway that connects your apps to every major LLM provider through a single API.
osmAPI Documentation
The unified AI gateway. One API key, every LLM provider. Drop-in compatible with the OpenAI SDK.
curl -X POST https://api.osmapi.com/v1/chat/completions \
-H "Authorization: Bearer $OSM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gpt-4o", "messages": [{"role": "user", "content": "Hello!"}]}'Explore the APIs
Chat Completions
Text generation with 130+ models across OpenAI, Anthropic, Google, and more
Embeddings
Vector embeddings for search, similarity, and RAG applications
Audio
Text-to-Speech, Speech-to-Text, and translation with OpenAI and Groq
Realtime
Voice agents with bidirectional WebSocket streaming
Image Generation
Generate images through chat completions
API Reference
Full endpoint documentation for all APIs
Why osmAPI?
- One API for All Providers — Switch between OpenAI, Anthropic, Google, Groq, and 25+ more without changing your code.
- Embeddings, Audio & Realtime — Beyond chat: vector embeddings, TTS/STT, and real-time voice agents.
- Smart Routing — Automatic provider selection based on uptime, latency, throughput, and cost.
- Real-Time Analytics — Track every request, token, and dollar spent across all your AI usage.
- Cost Optimization — See exactly where your AI budget goes. API returns cost per request in USD.
- Enterprise Security — IAM rules, rate limiting, retry with backoff, circuit breakers.
Get Started
How is this guide?