Skip to main content

Unified API key platform SDK with category-based integrations

Project description

Onekey

Unified API Key Management for Developers
Securely store, manage, rotate, and call multiple AI/LLM API keys (OpenAI, Anthropic, Groq, Gemini, and more) from one place — with zero plaintext leaks and unified interface.

Python License: MIT CLI on PyPI

The Problem Developers Face Every Day

Juggling 10–50+ API keys across providers is painful:

  • Scattered .env files everywhere → easy to commit by mistake to Git
  • Plaintext keys on disk → security nightmare
  • Different API signatures → constant code changes when switching providers
  • No visibility into usage → surprise bills, no idea which key is burning tokens
  • Hard to rotate or expire keys → manual, error-prone process

Onekey solves all of this — one secure vault, one unified interface, beautiful CLI + web dashboard, zero vendor lock-in.

Key Features

  • AES-256 client-side encryption — keys never touch the server in plaintext
  • Deployment - Render
  • Single platform key — one unified key per user across all providers
  • Category proxy route — call providers by category (/proxy/sdk/<category>/<provider>/<slug>)
  • CLI power tool (Onekey): add, list, delete, call, usage — with Rich beautiful tables, sparklines & panels
  • Automatic provider detection (e.g. sk- → OpenAI)
  • Built-in usage tracking — tokens used, latency, status codes, errors — per key/provider
  • Flexible auth — JWT (username/password) + OAuth (GitHub / GitLab)
  • Normalized responses — consistent output across OpenAI, Groq, Anthropic, Gemini ...
  • CLI for fast development — install via pipx install Onekey-cli, works everywhere (macOS/Linux/Windows)

Architecture

Onekey/
├── backend/          # FastAPI server (auth, vault, proxy, usage)
├── frontend/         # frontend on valinna js , HTML and css
├── onekey_sdk/       # Category-based Python SDK package
├── Dockerfile        # Easy containerization
└── ... (pyproject.toml, requirements.txt, etc.)
  • Database: **NeonDB — PostgreSQL support planned
  • Encryption: AES-256 at rest (client-side)
  • Auth: Argon2 password hashing + JWT (short-lived)
  • Proxy: Normalizes requests/responses + retries + logging

Quick Start

1. CLI (recommended for daily use)

pipx install Onekey-cli    # install the pypy package

Onekey login               # OAuth or username/password
Onekey add-key             # Add your OpenAI / Groq / etc. key
Onekey ls                  # Beautiful table of all keys
Onekey call <unified_key>   # Test call using unified key
Onekey usage               # Usage overview with sparklines

2. Python SDK (category-based)

from onekey_sdk import OnekeyClient
from onekey_sdk.llm import LLMClient

base_url = "https://onekey-ciwz.onrender.com"
platform_key = "okp-<your-platform-key>"

client = OnekeyClient(base_url=base_url, platform_api_key=platform_key)
llm = LLMClient(client)

result = llm.chat(
	provider="groq",
	key_slug="my-groq-key",
	model="llama-3.3-70b-versatile",
	messages=[{"role": "user", "content": "Hello from Onekey SDK"}],
)

print(result)

Get your platform key after login from GET /keys/platform-key.

3. Full stack (fastAPI backend + interactive Vanilla JS frontend)

Default: backend on http://localhost:8000, frontend proxies to it.

Security Highlights

  • Keys encrypted client-side before ever hitting the database
  • No plaintext in logs, memory, or disk
  • Short-lived JWTs + secure OAuth flows
  • Strict input validation (Pydantic)
  • Security headers & CORS in FastAPI
  • Designed with zero-trust principles

Who Is This For?

  • ML/AI engineers juggling multiple LLM providers
  • Indie hackers & solo devs tired of .env chaos
  • Anyone who wants usage visibility in a easy way
  • One who wants to store their API keys at a single place

License

MIT License — free to use, modify, distribute.


Built with ❤️ by Anik Chand and Abhiraj Adhikary Onekey — because your keys deserve better than a .env file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

onekey-0.1.0.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

onekey-0.1.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file onekey-0.1.0.tar.gz.

File metadata

  • Download URL: onekey-0.1.0.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.17

File hashes

Hashes for onekey-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7bc818b05828b59ad3bfde0bc2afcd746052052a89c0edda83b64e8a208019e3
MD5 d1a1a724d4e19df8bfd51430066c7a97
BLAKE2b-256 07d5750d88821c0ed78b81d696e07a695c3834e97a7349fadbd1bef6afe67e68

See more details on using hashes here.

File details

Details for the file onekey-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: onekey-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.17

File hashes

Hashes for onekey-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 80253d69eb4cdbf20d98197b59598c7d5da99f4859d91006850537af791d55b4
MD5 f9f96a0bd30584f7622ecc568bfd9a63
BLAKE2b-256 8c0870bbe88117df1a4dcbe03ff2d87f743ac529f9348292f33e56d7b7023faf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page