Skip to main content
Cogito authenticates with bearer tokens — the same shape OpenAI uses, so any OpenAI-compatible SDK works without modification.

Creating keys

  1. Sign in at cogito.decart.ai.
  2. Open Dashboard → API keys.
  3. Click Create, name the key (we recommend naming it after the environment — production-api, local-dev), and copy the secret immediately. The full secret is shown once.

Best practices

  • One key per environment. Local dev, staging, and production should each have their own key.
  • Rotate on schedule. We surface last_used_at on every key — keys that haven’t been used in 30 days are good rotation candidates.
  • Revoke instantly. Compromised keys can be revoked from the dashboard; revocation propagates within seconds.
  • Revoke from anywhere. Any party holding a key can disable it through the revocation endpoint below — a platform that stores your key on your behalf (for example OpenRouter BYOK), a secret scanner, or your own CI. We disable it immediately, mark it in your dashboard, and email your organization’s owners and admins.
  • Don’t commit keys. Use environment variables (COGITO_API_KEY) or your platform’s secret manager.

Revoking a key programmatically

A key is its own credential for revocation: whoever holds it may disable it, and only it. No dashboard session or other secret is needed. The request is the GitHub secret-scanning partner payload, so a scanner that already speaks that format can point at this endpoint unchanged.
Only token is required. The response is one object per item, in order, in GitHub’s feedback shape plus our outcome:
true_positive means the token was a live key of ours and is now disabled (outcome is revoked, or already_disabled on a repeat). false_positive means it is not one of our keys (not_found) or was not a usable token (invalid). Tokens are never echoed back. Up to 500 items per call. Disabling is immediate on our side; requests with the key fail with 401 within 30 seconds. reporter is a label we keep for our audit trail (letters, digits, ., _, -; up to 64 characters). A disabled key stays listed in the dashboard, marked with the date it was reported, until you delete it.

Scopes

Model access is scoped with projects. A project belongs to your organization, selects which models it allows, and owns its own API keys:
  1. Open Dashboard → Projects and create a project (org owners and admins only).
  2. Pick All models or Selected models only on the project page.
  3. Create keys inside the project. Those keys can call only the project’s models — everything else returns the same 404 model_not_found as a model that doesn’t exist, on /v1/chat/completions, /v1/completions, /v1/models, and /v1/metrics alike.
Keys created from Dashboard → API keys (outside any project) keep full access to every model your organization can use. Deleting a project permanently revokes its keys. Other per-key scoping (read-only, monthly budget) ships in a later release.

Errors

A request without a valid key returns:
Always log the request_id — we trace it through every layer of the gateway and inference cluster, so support can find your request immediately.