API keys and permissions
Create project-scoped keys, restrict model access, and set budgets and request limits before calling CHUA ONE.
How access is scoped
- A workspace contains the people, funding, projects, keys, and request records for one customer account.
- A project separates an application or environment and has its own budget.
- Each key belongs to one project and has its own model allowlist, budget, requests-per-minute limit, and expiry.
A request must pass every applicable workspace, project, key, model, budget, and service-availability check.
Create a project and key
- Open API Keys in the console.
- Create a project, give it a clear environment-specific name, and set its spending budget.
- Create a key under that project. Select at least one published model, then set the key budget, requests per minute, and expiry.
- Copy the secret when it is displayed and store it in a server-side secret manager or environment variable.
The plaintext secret is shown only when creation or rotation completes. CHUA ONE cannot display it again. If the result completed but the secret was not received, revoke that key and create a replacement.
Store and send the key
Keep keys out of browser code, mobile applications, logs, screenshots, and source control. Send requests from your server and use a different key for each environment.
export CHUA_API_KEY='YOUR_KEY'Most endpoints accept the project key as a Bearer token. The Anthropic-compatible Messages endpoint also accepts it in x-api-key as documented in the text API guide. Read the authentication example.
Verify model access without running inference
curl 'https://chuaone.si/v1/models' \
-H "Authorization: Bearer $CHUA_API_KEY"GET /v1/models returns the published models visible to this key. It does not generate content or create a paid inference request. If a model is missing, review the key allowlist and the current published catalog before sending a request.
Budgets and request limits
- Project budget
- Shared by the keys in that project. Spent and reserved amounts both consume current capacity.
- Key budget
- Limits spending through that key independently of the project budget.
- Requests per minute
- Applies to the individual key. A RATE_LIMIT response includes retry guidance when it is safe to retry.
- Expiry
- The key stops accepting new requests after its expiry.
Rotate or revoke a key
Rotation creates the replacement and revokes the old key in one transaction, so plan a brief credential update window. If both keys must work during a gradual rollout, create a second key, deploy and verify it, then revoke the old key. Revoke immediately if a key may have been exposed.
Revocation blocks new requests. Existing reservations remain until their requests are settled, so review request records after revoking a key. Handle interrupted and uncertain operations.
Who can manage access
- Owner or administrator
- Can manage workspace settings, projects, and keys.
- Developer
- Can work with projects and keys, but cannot change workspace settings.
- Billing or viewer
- Cannot issue keys. Billing roles can view billing pages; all workspace roles can view usage.