Skip to main content
Creates a new API key for an organization. The key type (test or production) depends on your current environment mode. The key is displayed once — save it immediately.
agent-cards-admin keys create

Key types

ModeKey prefixRequirement
Test (default)sk_test_*None
Productionsk_live_*Active subscription
Use agent-cards-admin env to switch between modes.

Example (test mode)

$ agent-cards-admin keys create

  TEST MODE — API keys will be test keys (sk_test_*)

? Select organization: Acme Inc (billing@acme.com)
? Key name (e.g. "production", "ci-pipeline"): dev-key
? Create test API key "dev-key" for this org? Yes
✓ API key created

  WARNING: Save this key now. You will not see it again.

  Key    sk_test_a1b2c3d4e5f6...
  ID     key_abc123
  Prefix sk_test_a1b2
  Name   dev-key

  This key has been set as your active API key.

Example (production)

$ agent-cards-admin keys create

  PRODUCTION MODE — API keys will be production keys (sk_live_*)

? Select organization: Acme Inc (billing@acme.com)
? Key name (e.g. "production", "ci-pipeline"): live-key
? Create production API key "live-key" for this org? Yes
✓ API key created

  WARNING: Save this key now. You will not see it again.

  Key    sk_live_x9y8z7w6v5u4...
  ID     key_def456
  Prefix sk_live_x9y8
  Name   live-key

  This key has been set as your active API key.
The created key is automatically stored locally and set as your active API key. You can switch keys later with keys set. You can also pass options to skip the prompts:
agent-cards-admin keys create --org org_abc123 --name "dev-key"