New: Audio API, Embeddings & Realtime WebSocket now available!
osmAPI LogoosmAPI

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

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?