API Keys
Your prx- key authenticates every request and draws down your credit balance.
Keys on the same account share its AI balance and any active plan allowance.
Create a key
- Open Primex API Keys.
- Create a key. It will look like
prx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx. - Copy it once and store it somewhere safe.
You can also create and manage keys under My AI → API keys in the Telegram Mini App.
Expiration and spend caps
Set an optional expiration date and monthly USD spend cap when creating a key, or update those controls from its details. Expired keys cannot authenticate. Spend caps use the UTC calendar month. Billing happens after successful work, so an already-admitted request can finish above the cap. See Errors & Limits.
Use a key
Provide it as a header on every request. Either style works:
Authorization: Bearer prx-YOUR_KEY
# or
x-api-key: prx-YOUR_KEY
Most SDKs read it from an environment variable:
export OPENAI_API_KEY=prx-YOUR_KEY # OpenAI SDK / Cursor / Codex
export ANTHROPIC_API_KEY=prx-YOUR_KEY # Anthropic SDK / Claude Code
Rotate or revoke
If a key is exposed, revoke it from API Keys and create a new one. Revoked keys stop working immediately; in-flight requests already authorized may complete.
Best practices
- One key per environment (local, CI, production) so you can revoke narrowly.
- Never embed a key in a browser, mobile app, or public repo.
- Watch your usage in Usage.