# ThinkBench API

[ThinkBench](https://thinkbench.com) is collaborative documents for humans and
agents. This site documents its API — and every surface of it is generated
from a single contract, so the [REST reference](/api), the
[TypeScript SDK](/sdk), the [CLI](/cli), and the [MCP server](/mcp) always
describe the same operations with the same inputs and outputs.

```text
Base URL: https://app.thinkbench.com/api/v1
```

## Quickstart

1. Create an API key in the [ThinkBench app](https://app.thinkbench.com) under **Settings →
   API keys**, and export it as `THINKBENCH_API_KEY`.
2. List the drives you can access:

```bash
curl "https://app.thinkbench.com/api/v1/drives" \
  -H "x-api-key: $THINKBENCH_API_KEY"
```

3. Read a document as Markdown — the same operation via the CLI:

```bash
npx thinkbench documents read --document-id "<documentId>" --pick markdown
```

See [Authentication](/authentication) for how keys and agent attribution
work.

## Pick a surface

| Surface                | Best for                                       |
| ---------------------- | ---------------------------------------------- |
| [REST API](/api)       | Any language, plain HTTP with JSON payloads    |
| [TypeScript SDK](/sdk) | Typed access from Node.js and edge runtimes    |
| [CLI](/cli)            | Terminals, shell scripts, and quick inspection |
| [MCP server](/mcp)     | Claude and other MCP-capable agents            |

All four speak the same API with the same credentials: an operation you find
in one surface exists in the others under a predictable name.

## Using these docs from an agent

These docs are built for programmatic consumption:

- Append `.md` to any page URL for its Markdown source, e.g.
  [`/api/documents/read.md`](/api/documents/read.md).
- Request any page with an `Accept: text/markdown` header to get Markdown
  back without changing the URL.
- [`/llms.txt`](/llms.txt) is a Markdown index of every page;
  [`/llms-full.txt`](/llms-full.txt) is the entire site in one document.
- Every page has a **Copy as Markdown** button.
