Security

How Plan2API protects your logins and keys

Plan2API seals every connected login with HPKE (X25519) and AES-256-GCM, and only your p2a_ API key can open it; the key's 43-character secret is never stored. Prompts, outputs, files and images are never kept, and the servers run on OVHcloud in Germany.

Vault encryption
HPKE (X25519), AES-256-GCM
API key secret
Never stored
Prompts and outputs
Never stored
Hosting
OVHcloud, Germany

Updated

What Plan2API stores and what it never keeps

Plan2API keeps only what it needs to route requests and show the dashboard. Whether you are connecting a Claude plan or another subscription, the login tokens themselves stay sealed inside your vault.

Data Plan2API holds, and how
DataHow Plan2API holds it
Login tokens, provider account id, labelSealed in your vault (HPKE, AES-256-GCM)
Provider, nickname, plan, quota, statusUnencrypted, for the dashboard
API keysNever stored: check value, key id, nickname
Prompts, outputs, files, imagesNever stored
Request logsModel, tokens, timing, status, key id
AccountGoogle email and account id
BillingPlan and Stripe records
Server access logsIP addresses, rolling window

How a request opens your vault

When you make an API call, Plan2API opens your vault in memory for that single request:

  1. Your request sends the Authorization: Bearer header with your p2a_ key, and its 16-character key id finds the key's slot in memory, so unknown ids are turned away without a database lookup.
  2. Plan2API derives a check value from the key's 43-character secret using HKDF-SHA256 and the key's own random 16-byte salt, then compares it with the stored check value in constant time.
  3. A second HKDF-SHA256 derivation gives a key-encryption key that unwraps the vault master key (AES-256-GCM).
  4. The vault master key unwraps the vault's X25519 private key (AES-256-GCM).
  5. The private key opens the sealed login for the provider being called (HPKE).
  6. Plan2API calls the provider, and if the provider token is refreshed, the new token is sealed again within the same request.

The unwrapped vault master key lives only for the request that presented the key and isn't cached between requests, so logins are read and decrypted again for each request.

No background job ever opens a vault: token refreshes and quota checks happen only inside a request made with your key.

The vault v2 encryption

Every vault has its own X25519 key pair, and each layer is bound to the ids in the table below, so a sealed value fails to open if it is moved to another key, vault, credential or provider.

The vault's X25519 public key is stored as is, so when you connect a subscription in the dashboard while signed in with Google, the login is sealed into your vault without needing your API key. Only the vault's private key can open that sealed login, and unwrapping the private key takes an API key. Because each API key wraps the same vault master key under its own HKDF-SHA256 key, every key on your account opens the same vault, and revoking one key leaves the others working.

Older v1 logins, which were sealed with AES-256-GCM directly under the vault master key, still open as usual, and every new write seals with v2. The HPKE mode follows RFC 9180.

Vault v2 layers
LayerAlgorithmBound to
Key checkHKDF-SHA256, per-key 16-byte saltConstant-time compare
Key wrapAES-256-GCM, key from HKDF-SHA256Key id, vault id
Vault private keyX25519, sealed with AES-256-GCMVault id
Login sealHPKE base mode, X25519, AES-256-GCMCredential id, vault id, provider

What Google sign-in can and can't do

You sign up with a Google account, and that browser session manages your account settings and dashboard, but it can't read your sealed logins or open your vault. With only a Google sign-in, you can:

  • Connect new subscriptions so they get sealed to your vault's public key.
  • Rename and revoke keys, except for the vault's last key, which fails with 409 last_key ("This is the vault's last key. Reset the vault instead if you lost it.").
  • Mint a new key only by pasting an existing key, because minting has to wrap the vault master key, which only an existing key can unwrap.
  • Reset the vault or delete the account after a fresh sign-in.

A vault reset requires a Google sign-in from the last 5 minutes: it deletes every key and every connected login, keeps your usage history and logs, and creates a new vault with a new key so you can reconnect each subscription. There is no recovery from a reset, because without an API key nobody, Plan2API included, can decrypt the old logins. Account deletion also takes a recent sign-in and removes your account, vaults, keys, connected logins, call logs and usage totals right away; deleted data can still sit in older encrypted backups, where the logins stay locked under a key Plan2API never had.

What the vault protects against, and what it doesn't

If a database or backup ever leaks, it holds only sealed logins, one-way check values and wrapped keys. None of that opens without one of your p2a_ keys, and the 43-character random secret (about 256 bits) in each key is never stored. A hijacked Google session can't read your logins or mint new keys on its own either.

The vault doesn't protect against a stolen API key or a compromised host. Anyone holding your p2a_ key can use your connected subscriptions until you revoke the key on the Keys page at plan2api.com/dashboard/keys, and someone in control of the live server could use your logins while requests are actively running.

The API sends Access-Control-Allow-Origin: * so browser apps work, which also means a key placed in a public web page can be copied and used from anywhere; keep keys in servers and tools you control, and revoke a leaked one right away.

Logs, hosting and provider sign-in

Plan2API reads keys only from the Authorization: Bearer header (detailed in the API reference) and refuses x-api-key with 401 invalid_api_key. Request logs record the key id as vault:<key id>, never the key itself, and call logs are kept for 7 days on Free, 30 days on Pro and 90 days on Scale (see plan details and pricing). Servers and the database run on OVHcloud in Germany with Cloudflare in front, encrypted backups stored with Cloudflare, and TLS used everywhere. The service uses Firebase for Google sign-in, Cloudflare, OVHcloud, Stripe as merchant of record for billing, Postmark for email and Clicktag for cookieless analytics, with no ads, no data sales and no model training on API data.

When you connect a subscription, for example when using a ChatGPT plan as an API, the sign-in happens on the provider's side: Claude uses a sign-in link and a pasted code, ChatGPT uses a one-time device code, Gemini uses Sign in with Google, and Kimi takes a Kimi Code API key. Because you authenticate directly with them, Plan2API never sees your Claude, ChatGPT or Google password.

Use the AI subscriptions you already pay for as one OpenAI-compatible API key.

  • Free: 1 subscription, 50 requests a day, no card
  • Pro: $12 a month

FAQ

Can Plan2API read my Claude or ChatGPT login?

Not from stored data. Your logins are sealed to your vault and open in memory only while serving a request made with your API key, though someone in control of the live server could use them during such a request.

What happens if Plan2API's database leaks?

Your logins stay sealed. Opening them requires one of your API keys, and Plan2API stores only a one-way check value for each key, never the key itself.

Does Plan2API store my prompts or outputs?

No. Plan2API never stores your prompts, outputs, files or images; call logs keep the model, token counts, timing and status.

What if I lose my Plan2API API key?

Revoke the lost key on the Keys page and mint a new one by pasting another working key. If you lose every key, you have to reset the vault and reconnect your subscriptions, because nobody can recover the old logins without a key.

Where does Plan2API run?

The servers and database run on OVHcloud in Germany, with Cloudflare in front and encrypted backups.

Does Plan2API see my provider password?

No. You sign in on the provider's own page or paste a Kimi Code API key, so Plan2API never sees your Claude, ChatGPT or Google password.

Sources

  1. Plan2API privacy policyplan2api.com
  2. RFC 9180: Hybrid Public Key Encryptionrfc-editor.org
  3. RFC 7748: Elliptic Curves for Security (X25519)rfc-editor.org
  4. RFC 5869: HKDFrfc-editor.org
  5. NIST SP 800-38D: GCMcsrc.nist.gov