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

> ## Agent Instructions
> Follow the content contract in AGENTS.md.
> Treat text as the canonical explanation; video and screenshots enhance it.
> Do not publish unverified product behavior or duplicate an existing canonical article.

# StefanBrain developer platform

> Choose between Agent Runs, direct tools, jobs, and MCP for your StefanBrain integration.

The StefanBrain developer platform gives your code and AI assistants access to the StefanBrain agent and its supported developer tools.

An active StefanBrain plan or trial is required. Create an API key in **Settings → Developers**, then choose the surface that matches your task.

| You want to… | Use | Start at |
| - | - | - |
| Send a message and receive finished work | **Agent Runs** | `POST /api/developers/v1/runs` |
| Call one specific capability yourself | **Tools** | `GET /api/developers/v1/tools` |
| Follow a long-running tool call to completion | **Jobs** | Use the URLs returned by an asynchronous tool |
| Use StefanBrain inside Codex, Claude, ChatGPT, Cursor, or another assistant | **MCP** | `POST /api/developers/v1/mcp` |
| Stage or download files | **Files** | [`/v1/files`](/developers/files) |
| Read stored Meta video transcripts | **Media transcripts** | [Transcript endpoints](/developers/media-transcripts) |
| Build a typed Node.js integration | **TypeScript SDK** | [`@stefanbrain/sdk`](/developers/sdk) |
| Run StefanBrain from a shell or coding agent | **CLI** | [`sb`](/developers/cli) |
| Isolate concurrent agent forks | **Parallel sessions** | [Project and session labels](/developers/parallel-sessions) |
| Report where the API got in your way and read the reply | **Feedback** | [`/v1/feedback`](/developers/feedback) |

## Choose between REST and MCP

* **MCP** is for a person working interactively inside an AI assistant. For standard member accounts, MCP usage bills the plan's monthly pool.
* **REST** is for integrations, pipelines, and automated traffic. A `stefan_sk_...` key bills the prepaid API wallet. A `stefan_oat_...` OAuth token bills the plan pool.

Contracted partner accounts can route plan-pool traffic to the wallet or use other account-specific terms. Use the billing lane reported for that account.

Agent Runs are the primary REST surface. The agent plans the work, selects tools, and returns its final response in `output`. Use direct tools when your application needs one specific capability or a raw result.

## Important behavior

* Runs accept file attachments through `multipart/form-data`.
* Run attachments accept documents and images, not audio or video files. Put a hosted video URL in `message` instead.
* Runs can constrain their final response to a JSON schema through `output_config`.
* A REST API turn returns its full assistant response in `output`; it does not write that response into an in-app canvas document.
* There is no model selector. Agent Runs execute the model that operates the StefanBrain product.
* Keep the `chat` identifier from a response and reuse it for follow-up turns in the same conversation.
* Fetch the live Tools or MCP catalog before relying on a tool name. Availability can depend on your access and the current deployment.

## Start building

<Columns cols={2}>
  <Card title="Send your first request" icon="rocket" href="/developers/quickstart">
    Create a key and start a synchronous Agent Run.
  </Card>

  <Card title="Connect through MCP" icon="plug" href="/developers/mcp">
    Add StefanBrain to Codex, Claude, ChatGPT, Cursor, or another MCP client.
  </Card>

  <Card title="Call tools and jobs" icon="wrench" href="/developers/tools-and-jobs">
    Discover live tool schemas and handle long-running work.
  </Card>

  <Card title="Stage and download files" icon="files" href="/developers/files">
    Attach local files to asks or retrieve current workspace files from a chat.
  </Card>

  <Card title="Read Meta video transcripts" icon="captions" href="/developers/media-transcripts">
    Reuse stored transcripts or request one for an accessible Meta video.
  </Card>

  <Card title="Use the TypeScript SDK" icon="braces" href="/developers/sdk">
    Add typed asks, runs, tools, jobs, and files to a Node.js application.
  </Card>

  <Card title="Use the CLI" icon="terminal" href="/developers/cli">
    Run and script StefanBrain from a shell with stable JSON output.
  </Card>

  <Card title="Run parallel agent sessions" icon="git-fork" href="/developers/parallel-sessions">
    Give concurrent forks shared project context and separate chats.
  </Card>

  <Card title="Give the docs to an agent" icon="bot" href="/developers/for-agents-and-tooling">
    Use Markdown and OpenAPI sources instead of scraping HTML.
  </Card>

  <Card title="Send agent feedback" icon="message-square" href="/developers/feedback">
    Report a failing call or a missing capability, and read the team's reply.
  </Card>
</Columns>


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