Quickstart
Make your first opengateway API call in under 60 seconds. cURL and OpenAI SDK examples for Chat Completions with one base URL change.
1. Get your API key#
Sign up at opengateway.ai, open API Keys, and click Create Key. Copy the key immediately. It is only displayed once.
export OPENGATEWAY_API_KEY="YOUR_API_KEY"
2. Make your first call#
Pick a model, pick a question, and run it right here. The code updates as you
choose, and it is the same code you would paste into your own project — if you
already use the OpenAI SDK, changing base_url is the only edit you make.
curl https://apis.opengateway.ai/v1/chat/completions \-H "Authorization: Bearer $OPENGATEWAY_API_KEY" \-H "Content-Type: application/json" \-d '{"model": "openai/gpt-4o-mini","messages": [{"role": "user", "content": "Hello, opengateway!"}],"stream": true}'
Turn stream off and run it again. The answer is identical; what changes is
that you wait for all of it before seeing any of it.
3. Swap the model#
You just did this above. The same OpenAI-compatible request shape works
across every supported provider — only the model field changes:
openai/gpt-4o-mini # cheap and fastopenai/gpt-4o # balancedanthropic/claude-sonnet-4 # top-tier reasoninggoogle/gemini-2.5-pro # long context and multimodal
The model catalog is available from the Models API reference.
4. See what just happened#
Open the dashboard. Your request is already there, along with its token counts, cost, latency, and the provider that served it. You did not have to install anything.
Next steps#
- Streaming — Receive tokens as the model generates them.
- Fallbacks — Configure chat-completion fallback models.
- Observability — See cost, latency, and every request in one place.
- Key Features — Namespacing, parameter normalization, debug mode, and more.