Quickstart
OneGateway is a unified AI gateway platform. It exposes multiple providers' models through a single unified API endpoint and supports OpenAI, Anthropic, and other API formats, with governance capabilities such as smart routing, semantic caching, multi-dimensional billing, and content safety.
This guide walks you through everything from getting credentials to making your first call, in just a few minutes.
Quick Start guide on the home page
After you sign in, the home page shows a Quick Start guide. Members Get started in 2 steps: create an API key and copy the base URL, then send a request and view the logs. Administrators Set up your organization in 3 steps: connect a provider, create a user, and set user quotas. This guide follows the same steps as the member guide.
1. Get an API Key
Sign in to the OneGateway console, open the API Keys page, and click Create API Key:
- Enter a name to create the key. By default it has no quota limit, never expires, and can call all models.
- To apply restrictions, expand Advanced settings and configure quota, expiration time, group pricing, and available models.
After creation, copy the full key (with the sk- prefix). Keys are masked by default—store it safely. The API URL at the top of the page is the Base URL for the next step; copy it as well.
2. Call Your First Model
First open Available Models, find the model you want to call, and click the copy icon next to its model ID. Which models you can call is configured by your administrator. Requests must use the model ID, not the display name shown on the card.
OneGateway supports multiple API formats; the examples below use the most common one, the OpenAI format. Replace the endpoint, key, and model in the examples with the API URL, API key, and model ID you copied:
curl https://your-api-endpoint/v1/chat/completions \
-H "Authorization: Bearer sk-xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "your-model-id",
"messages": [{ "role": "user", "content": "Hello" }]
}'from openai import OpenAI
client = OpenAI(
base_url="https://your-api-endpoint/v1",
api_key="sk-xxxxxxxx"
)
resp = client.chat.completions.create(
model="your-model-id",
messages=[{"role": "user", "content": "Hello"}]
)
print(resp.choices[0].message.content)import OpenAI from 'openai'
const client = new OpenAI({
baseURL: 'https://your-api-endpoint/v1',
apiKey: 'sk-xxxxxxxx'
})
const resp = await client.chat.completions.create({
model: 'your-model-id',
messages: [{ role: 'user', content: 'Hello' }]
})
console.log(resp.choices[0].message.content)If your application already uses another API format such as Anthropic, you don't need to switch to the style above—just point its request URL at the OneGateway API URL.
If the call fails, first check that the API URL is complete, the key was copied in full, and the model ID comes from the Available Models page.
3. Review Usage
Each call deducts from your quota in real time; the log entry appears about two minutes later. You can:
- Check each key's remaining quota and utilization on its API Keys card
- Review the model, token usage, and cost of each call in Request Logs
- Check quotas and recent spending and usage trends in Personal Dashboard
Next Steps
- Read the FAQ for answers about integration, permissions, quotas, and troubleshooting
- Read the Introduction to learn about OneGateway and how the docs are organized
- Chat with models directly in the Playground
- Configure available models and IP restrictions for your API Keys
- Reduce the cost of repeated requests with the Semantic Cache
- Administrators: start by connecting models in Providers & Models, then maintain member accounts in Managing Users
Roles at a Glance
| Role | What you can do |
|---|---|
| Member | Create and manage your own API keys, review usage and logs, top up with redemption codes |
| Administrator | Manage your company's providers, models, pricing, group pricing, members' API keys, redemption codes, and quota settings |