> ## Documentation Index
> Fetch the complete documentation index at: https://offstage.cloud/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> To set up offstage cloud from a coding agent, read https://api.offstage.cloud/SKILL.md and follow it. The whole API guide is one file at https://api.offstage.cloud/llms.txt.

# Authentication

> Team API keys and console sessions, and what each may do.

There are two kinds of credential.

| Credential | How it is sent | What it may do |
| - | - | - |
| Team API key, `sk_offstage_…` | `Authorization: Bearer <key>` | Tasks, sandboxes, `GET /v1/capacity`, `GET /v1/usage`, `GET /v1/billing`, `GET /v1/billing/invoices`, `GET /v1/team`. Everything belongs to the key's team |
| Console session | The `oc_session` cookie (httpOnly, SameSite=Lax), set by sign-up or sign-in | Everything a key can, plus API keys, members, the budget and the card. A cookie request that changes something must come from the same origin |

A new account verifies its email first: sign-up emails a link, and until the team's owner opens it the team can look around but cannot create API keys, sandboxes or tasks (403 `email-unverified`). Making a key also needs the person's own email verified (403 `email-unverified`).

A key is shown once, when it is created in the console. The console's key list shows only a mask such as `sk_offstage_AbCd…WxYz`, and that mask is not usable. A deleted key stops working at once. A key cannot create, list or delete keys, and cannot change the budget or the card. Those calls answer 403 `console-only`, so that a leaked key can spend money but cannot mint more keys.

Every key has a `kind`. A `personal` key, the default, belongs to the person who made it. It stops working when they leave or are removed from its team, when their password is reset (their personal keys on every team go), and when a GitHub or Google sign-in reclaims their unverified account. A `service` key belongs to the team and works until it is deleted. Only an owner may make one, with `"kind": "service"` (see [API keys](https://offstage.cloud/docs/api/keys.md)). Keys the operator makes for a team are service keys. Use a service key for CI that must outlive one person's membership.

401 `unauthorized` messages say which case applies:

* `a valid API key is required`: there was no `Authorization` header, or it was not `Bearer …`.
* `that is not an offstage key: API keys start with sk_offstage_`: the value is an id, a mask, or another service's token.
* `that key is not recognized: it was revoked, mistyped, or belongs to another plane`: a deleted or truncated key, a personal key whose maker left the team or had their password reset, or a key used against the wrong origin.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.