Start here

Quickstart

Three steps: vault a provider key, create a virtual key, point your SDK at KeyC.

1. Vault a provider key

Sign in to the dashboard, open your org, and add your real OpenAI or Anthropic API key. Keys are stored with AES-256-GCM encryption and never returned by any API.

2. Create a virtual key

Mint a virtual key per project, developer, or client. Set a monthly budget, optional RPM limit, and model allowlist. The raw key is shown once as kc-…

Store it securely

KeyC only keeps a hash. If you lose the raw key, revoke and create a new one.

3. Send a request

Use your existing OpenAI-compatible client. Change the API key and base URL:

Minimal example
from openai import OpenAI

client = OpenAI(
    api_key="kc-your-virtual-key",
    base_url="https://api.keyc.ai/v1",
)

print(client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Hello from KeyC"}],
))

More languages and Anthropic examples: SDKs & examples.

What happens next

  • Spend is metered per virtual key and flushed to your usage reports.
  • Hitting budget returns 402 budget_exceeded.
  • Streaming works — pass stream: true as usual.