> For the complete documentation index, see [llms.txt](https://docs.computesdk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.computesdk.com/platform/authentication.md). Agents can also search and read this documentation through its [MCP server](https://docs.computesdk.com/~gitbook/mcp).

# Accounts and authentication

Every hosted sandbox, provider credential, API key and Actions run belongs to an organization. Start at [platform.computesdk.com](https://platform.computesdk.com). Owners and admins manage keys and provider credentials in Settings.

## CLI browser login

```bash
compute login
compute whoami
compute org list
compute org use <slug>
```

Login opens your browser and saves your session locally. Expired access tokens are refreshed automatically. `compute logout` clears local credentials. `--no-browser` prints a URL and code for manual sign-in.

`compute org use` changes the active organization associated with the login. For one invocation, pass `--org <slug>` or set `COMPUTE_ORG`. Organization API keys always act on their own org; an org override does not change their scope.

## API keys for applications and CI

Create an organization key in **Settings → API keys**, then export it:

```bash
export COMPUTE_API_KEY="your_org_api_key"
```

Use `COMPUTE_API_KEY` for applications and CI. In the CLI, an explicit `--api-key` or `COMPUTE_API_KEY` takes precedence over a browser login.

The TypeScript SDK reads `COMPUTE_API_KEY` automatically.

## API URL

The default ComputeSDK API URL is `https://platform.computesdk.com`. Override it with `COMPUTE_PLATFORM_URL`, the CLI's `--base-url`, or the SDK's `baseUrl`.

Credentials are restricted to computesdk.com and loopback hosts by default. Explicit keys can opt into another HTTPS host with `--allow-untrusted-host` or `allowUntrustedHost: true`. Stored login credentials are never resolved for an untrusted host. Plain HTTP is accepted only for loopback.

For scripts without a browser, see [CLI automation](https://docs.computesdk.com/interfaces/quick-start/automation.md). For assistant authorization, see [MCP](https://docs.computesdk.com/platform/mcp.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.computesdk.com/platform/authentication.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
