- Developer (account) level — used by every project you own that does not have its own key.
- Project level — used only for a single project. Overrides the developer-level key.
When to use BYOK
- You are on the Free plan and want to use AI features without hitting the platform session cap. Free accounts must add a personal Groq key to keep using AI once the platform cap is reached.
- You are on the Pro plan and have hit (or expect to hit) the 20 AI sessions per month platform cap.
- You want to bill AI usage directly to your own Groq account and control your own model quota.
Resolution order
For each AI request, urBackend picks the Groq key using this order:- Project-level BYOK key (if set on the project handling the request).
- Developer-level BYOK key (if set on your account).
- urBackend platform key — falls back to the shared platform key, subject to your plan’s monthly session cap.
Plan-tier behavior
The monthly counter resets on the first of each calendar month (UTC).
Once your plan’s platform-key cap is reached, further AI requests return
403 Forbidden until either the counter resets or you configure a BYOK key.
Get a Groq API key
- Sign in at console.groq.com.
- Open API Keys and create a new key.
- Copy the key. Groq keys start with
gsk_.
Set a developer-level key
Use this when you want a single key to cover every project on your account.- Open the urBackend dashboard and go to Settings.
- Find the AI Integration (BYOK) section.
- Paste your Groq API key (must start with
gsk_) into Groq API Key. - Click Save Key.
gsk_••••••••) and a Configured badge. The raw key is never returned by the API after it is stored.
To remove the key, click Clear. Your account will fall back to the platform key (subject to the monthly session cap).
Set a project-level key
Use this when a single project needs its own key — for example, when it belongs to a different Groq billing account, or when only that project should have unlimited AI usage.- Open the project in the dashboard.
- Go to Settings → Integrations.
- In the AI Services section, find Groq API (BYOK).
- Paste your Groq API key and click Save Key.
API
You can also manage BYOK keys programmatically.Set or clear the developer-level key
Endpoint:PUT /api/user/me/byok
Requires a logged-in dashboard session.
Set or clear a project-level key
Endpoint:PUT /api/projects/:projectId/byok
Requires the project admin role.
"groqKey": null to clear the project’s key.
Validation and errors
How the key is stored
- Keys are encrypted at rest with AES-256-GCM before being written to the database.
- The dashboard and API never return the raw key. Responses only include a
hasGroqKeyboolean. - When an AI request runs, urBackend decrypts the key in memory, re-encrypts it for transit to the internal AI service, and never logs it.
