Under the Hood
Overview
OneKey is a routing layer between your application and AI providers. You get one API key, one base URL, and access to 40+ models from OpenAI, Anthropic, Google, and xAI — all through the standard OpenAI-compatible API format.
Your App
api.1key4ai.com
OpenAI / Anthropic / Google / xAI
Your App
api.1key4ai.com
OpenAI / Anthropic / Google / xAI
No SDKs to install. No code changes. Point your existing tools at OneKey's endpoint and your API key handles the rest.
Request lifecycle
Your App
OneKey Routing Engine
- Validate API key
- Identify target model
- Select provider channel
- Forward request as-is
- Stream response back
AI Provider
Your App
OneKey Routing Engine
- Validate API key
- Identify target model
- Select provider channel
- Forward request as-is
- Stream response back
AI Provider
Log metadata only: model, tokens, cost (no content stored)
Every request is stateless. Nothing is cached, queued, or stored between requests. The routing engine processes your request and forgets it.
Two-layer design
OneKey has two independent layers with separate responsibilities:
Routing Engine
Handles the actual API traffic:
- Validate your API key
- Map the requested model to the correct provider
- Forward the request body unmodified
- Stream the response back to your app
- Record metadata (model, token counts, cost)
The routing engine does not know your name, email, or account details. It only knows your API key and the request metadata.
Account Layer
Handles everything that isn't API traffic:
- Authentication (Google/GitHub OAuth, magic links)
- Billing (credit purchases, balance tracking)
- Dashboard (usage stats, key management)
- Project management (create/revoke API keys)
- AI assistant (account questions, powered by Anthropic)
The account layer never sees the content of your API requests. It only sees aggregated usage summaries (total tokens, total cost).
This separation means: the component that routes your prompts identifies you only by API key — it doesn't have your name, email, or account details. The component that has your identity doesn't see the content of your API requests.
What makes this different from direct API access
Let's be honest: using OneKey means your request passes through one additional party between your app and the AI provider. That's the tradeoff. Here's what you gain:
What you gain
- One API key for 40+ models across 4 providers
- One unified format — OpenAI-compatible, works everywhere
- One bill — prepaid credits, no surprise invoices
- Multiple payment methods — card, Apple Pay, Google Pay, or crypto
- Automatic provider routing
- No per-provider minimums or billing complexity
We believe the convenience is worth the tradeoff. But we also believe you should make that decision yourself — which is why we offer 20 free requests so you can verify the service before paying anything.
OpenAI-compatible
OneKey uses the OpenAI API format. If your app can call the OpenAI API, it can call OneKey. Two changes:
- Base URL:
https://api.1key4ai.com - API Key: Your OneKey project key
That's it. No SDK changes, no code rewrites, no adapter libraries. This works with any OpenAI SDK (Python, Node, etc.) and any app with a “custom OpenAI endpoint” setting.
Available models
40+ models across four providers (as of February 2026):
| Provider | Models |
|---|---|
| OpenAI | GPT-5.3 Codex, GPT-5.2, GPT-5.2 Pro, GPT-5.2 Codex, GPT-5.1, GPT-5.1 Codex, GPT-5, GPT-5 Mini, GPT-5 Nano, GPT-4.1, GPT-4.1 Mini, GPT-4.1 Nano, o3, o3 Pro, o3 Mini, o4 Mini |
| Anthropic | Claude Opus 4.6, Claude Opus 4.5, Claude Sonnet 4.5, Claude Sonnet 4, Claude Haiku 4.5, Claude 3.5 Haiku |
| Gemini 3 Pro, Gemini 3 Flash, Gemini 2.5 Pro, Gemini 2.5 Flash, Gemini 2.5 Flash Lite, Gemini 2.0 Flash | |
| xAI | Grok 4, Grok 4.1 Fast, Grok Code Fast, Grok 3, Grok 3 Mini |
xAI (Grok) models are currently in preview and may be temporarily unavailable while we complete provider funding.
Provider data policies
Your request content is forwarded to the provider you select. Their data handling policies apply:
| Provider | API data used for training? | Policy |
|---|---|---|
| OpenAI | No | Enterprise Privacy |
| Anthropic | No | Privacy Policy |
| Google (Gemini API) | No (paid API) | Gemini API Terms |
| xAI | No (default) | API Terms |
None of these providers train on data submitted through their paid APIs by default. Using OneKey doesn't change this — your requests are forwarded identically to a direct API call.