Skip to content

Authentication

Send your secret key as a bearer token in the Authorization header of every request:

Authorization: Bearer aide_sk_live_...

Requests without a valid key, or with one that is revoked or expired, get 401, with the header WWW-Authenticate: Bearer. Requests over plain http:// are refused, not redirected, so a misconfigured client fails at once instead of sending its key unencrypted on every call. A key that was ever sent over http:// must be treated as exposed.

  • Sign up to get test keys at once, then issue, name, roll and revoke keys yourself in the developer dashboard. Each new key is shown once.
  • A new account can issue live keys from the start. Where live mode is switched off for an account, the dashboard issues test keys only, and any live key gets 403 live_mode_not_enabled.
  • If we suspend your account, its keys get 403 account_suspended, and nothing on it can be changed in the dashboard (no key, webhook or team change, and no one can join it) until we reinstate it. You can still read it there, and you can always revoke a key.
  • If we set your account up for you, we issue your keys and deliver each one through a one-time secure link. Ask us wherever this section says to issue one.
  • We store only a hash of each key. We cannot show a key again; if you lose one, roll it with no overlap, which keeps its name, scopes and IP allowlist.
  • Everyone on your team manages keys and webhooks and sees usage. Owners also invite people from the dashboard’s Team section, by email, as owners or members, and change or remove who is on the team. An invite’s link works for 7 days, and owners can resend it for a fresh one. A team holds up to 25 people, counting invites not yet accepted or withdrawn, expired ones too. A person can be on one developer team, and an email that already has another kind of AIDE AI account can’t join.
  • Treat keys as opaque strings: only the prefix is fixed, and the length can change.
  • You can have up to 20 working keys per mode, for example one per server. A rolled key counts until its overlap ends, and rolling is never refused for this.
  • Give a key a name, such as the server or service that uses it, when you issue it or later in the dashboard. A name is up to 64 characters on one line. It’s a label for you and for us when you ask for help, so never put a key in it: a name that contains one is refused.
  • To rotate a key without downtime, roll it.

Rolling replaces a key without downtime. In the developer dashboard, choose Roll on the key and pick how long the old key keeps working alongside the new one: no time (it stops at once), 1 hour, 24 hours (the default), 3 days or 7 days.

  • You get a new key with the same mode, scopes, IP allowlist and name, shown once like any new key.
  • Deploy the new key before the overlap ends. Until then both keys work, and the dashboard shows when the old one expires.
  • Once the overlap ends, the old key gets 401 api_key_expired. It can’t be brought back: use the key that replaced it.
  • A key can be rolled once. Next time, roll its replacement.
  • Rolling doesn’t revoke. If a key may have been exposed, revoke it at once rather than waiting for the overlap to end.
  • A live key can be rolled only while live mode is on for your account, and no key can be rolled while the account is suspended.
  • If we manage your keys, ask us to roll one: the new key comes to you through a one-time secure link.

If a key may have been exposed, revoke it yourself at once. Call this endpoint with the key you want to revoke:

POST /v1/api_key/revoke

The key stops working immediately, and the response is 200 with { "object": "api_key", "revoked": true }. Then issue a replacement in the developer dashboard, or ask us if we manage your keys.

By default a key can call every endpoint. When you issue a key in the developer dashboard you can restrict it instead:

  • Read-only: the four :read scopes (papers:read, submissions:read, billing:read and events:read), for example for a reporting service. It can’t create, change or delete anything, beyond revoking itself.
  • Only these scopes: the scopes you tick from the table below.

A restricted key that calls an endpoint outside its scopes gets 403 insufficient_scope. A key’s scopes can’t be changed once it is issued, and rolling it keeps them: to change them, issue a new key and revoke the old one.

Scope Endpoints
papers:read GET /v1/subjects, GET /v1/papers, GET /v1/papers/{id}, GET /v1/papers/{id}/questions, GET /v1/files/{id}
papers:write POST /v1/files, POST /v1/papers, PATCH /v1/papers/{id}, DELETE /v1/papers/{id}, POST /v1/papers/{id}/approve, POST /v1/papers/{id}/review_links, POST /v1/papers/{id}/review_links/revoke
submissions:read GET /v1/submissions, GET /v1/submissions/{id}, GET /v1/submissions/{id}/result, GET /v1/submissions/{id}/report, GET /v1/submissions/{id}/marked_script, GET /v1/files/{id}
submissions:write POST /v1/files, POST /v1/submissions, PATCH /v1/submissions/{id}, POST /v1/submissions/{id}/cancel, POST /v1/submissions/{id}/release, DELETE /v1/submissions/{id}

A submission that carries its paper makes a paper, so its key needs papers:write as well as submissions:write. | billing:read | GET /v1/account, GET /v1/balance, GET /v1/credit_transactions | | webhooks:manage | Every /v1/webhook_endpoints endpoint | | events:read | GET /v1/events, GET /v1/events/{id} |

Every key, restricted or not, can revoke itself.

When you issue a key in the developer dashboard you can limit it to IP addresses or ranges, or ask us to: up to 50 per key, each an IPv4 or IPv6 address or a CIDR range, and never every address (/0). A request from anywhere else gets 403 ip_not_allowed.

  • Use keys only on your servers. Never put them in a browser, a mobile app, a URL or source control.
  • Store them in a secrets manager or encrypted environment variables, and keep them out of logs.
  • Treat a key as exposed if it was ever sent over http://, pasted into a chat or ticket, or committed anywhere. Revoke it.