Guide

A self-hosted OpenAI proxy with a key for every person.

Sharing one OpenAI key across a company means no per-person usage, no way to revoke one person, and a secret that ends up in scripts and chat messages. A proxy keeps the real key in one place and gives everyone their own.

In short

  • Run a self-hosted gateway that holds the company OpenAI, Anthropic, Gemini or Azure OpenAI key.
  • Each person creates their own revocable key (Doorman keys start with dk_) and uses it with the official SDK by changing only the base URL.
  • Every request is tied to a person, so you get usage by person, per-person limits, and one-click revocation.

Connect

Change the base URL, keep the SDK.

Doorman speaks each provider's own API. Code keeps using the official OpenAI, Anthropic and Gemini SDKs, and provider errors keep their native format.

Python
import os
from openai import OpenAI

# Before: OpenAI(api_key=os.environ["OPENAI_API_KEY"])
client = OpenAI(
    base_url="https://gw.example.com/api/ai/corp-openai/v1/v1",
    api_key=os.environ["DOORMAN_AI_KEY"],  # your own dk_ key
)

Any tool

Works anywhere you can set a base URL.

Environment variables, Python, Node.js, curl, and tools that accept an OpenAI-compatible endpoint. My AI shows each person copy-paste setup with their URL filled in.

curl
curl https://gw.example.com/api/ai/corp-openai/v1/v1/chat/completions \
  -H "Authorization: Bearer $DOORMAN_AI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"Hello"}]}'

Keys

What a personal key gives you.

Who creates it
The employee, on My AI; admins can manage anyone's keys
Shown
Once, at creation; only a hash is stored
Expiry
Optional, from 1 to 365 days
Revoking
Affects only that key
Models
Allow lists with exact IDs or a trailing *, plus aliases
Company key
Encrypted in the gateway, never shown to employees

Reliability

Backups when a provider fails.

Configure backup keys or servers. Doorman moves a request to a backup on a 502, 503 or 504, a first-byte timeout, or an unreachable provider, but only before anything has been sent to the caller. A 429 is returned to the caller and never moved to a backup.

Read the AI gateway docs

FAQ

Common questions.

Can't find your answer? The documentation covers setup, operations, and the AI gateway in detail.

Read the documentation
Can I use this with the Anthropic or Gemini SDK too?

Yes. Doorman supports OpenAI, Anthropic, Gemini, Azure OpenAI and OpenAI-compatible providers, each through its own API, so each SDK works with a changed base URL.

Does the proxy see my prompts?

It passes them to the provider. By default only metadata is logged. Full prompt logging is optional, encrypted, and requires a notice every user sees.

Can ChatGPT Plus or Claude Pro subscriptions go through it?

No. Doorman works with provider API accounts. Consumer subscriptions are not supported.

Retire the shared key this week.

Run the demo, connect one provider, and let one team create their own keys.