Orqen Docs

API Reference

API keys

Orqen API keys authenticate agents calling /v1/chat/completionsand account API requests such as listing, creating, and revoking keys. The /v1/account/keys paths are the documented account API; the shorter /v1/keys paths are supported aliases.

Endpoints

GET/v1/account/keysList API keys for the current account. Full key secrets are never returned.
POST/v1/account/keysCreate a new API key. The secret is returned once.
DELETE/v1/account/keys/{key_id}Revoke an API key.
GET/v1/keysShort alias for listing keys.
POST/v1/keysShort alias for creating keys.
DELETE/v1/keys/{key_id}Short alias for revoking keys.

Create a key

curl https://api.orqen.app/v1/account/keys \
  -X POST \
  -H "Authorization: Bearer sk-orq-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "production-agent",
    "rate_limit_rpm": 120,
    "daily_token_budget": 75000,
    "weekly_token_budget": 500000,
    "k_target_override": null,
    "expires_at": null
  }'

List keys

curl https://api.orqen.app/v1/account/keys \
  -H "Authorization: Bearer sk-orq-YOUR_KEY"

Revoke a key

curl https://api.orqen.app/v1/account/keys/5f6d8c2a-... \
  -X DELETE \
  -H "Authorization: Bearer sk-orq-YOUR_KEY"

Use the key

curl https://api.orqen.app/v1/chat/completions \
  -H "Authorization: Bearer sk-orq-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [{ "role": "user", "content": "Hello" }]
  }'

Key controls

rate_limit_rpm controls request rate. daily_token_budget and weekly_token_budget control per-key saved-token budgets.k_target_override can force a wider or narrower tool window for a specific agent key.