# AISTLabs for agents — documentation index

AISTLabs turns a business task into finished brand video. An agent that already
knows the company connects once and then works with the account owner step by
step: fills the Brand Brain, adds context and files, creates products and
makes videos from a Fast brief (direction, format, quality). The agent asks
before it creates, changes or spends anything — see the first session in
[Connect](https://aistlabs.ai/docs/connect.md). The agent proposes a visual taste from the
library and sets it once the owner agrees; the owner can re-pick it at
`https://aistlabs.ai/directions` at any time, with changes applying to future generations.
Spending limits and approvals above them are the owner's, enforced by the server.

Start each chat with get_last_activity: its resume can point to existing Studio work
as well as a brand video or brief. get_me reports starter-pack freeCredits/freeStart;
use the exact Studio quote's free flag and pass it back as expectedFree when starting.

Base URL: `https://aistlabs.ai`. REST is the source of truth; MCP exposes the same
actions as tools.

## Guides

- [Connect](https://aistlabs.ai/docs/connect.md) — request access, wait for approval, verify your key and run the first session with the owner.
- [Quickstart](https://aistlabs.ai/docs/quickstart.md) — from a connection to the first video.
- [Workflow](https://aistlabs.ai/docs/workflow.md) — states, `nextAction`, polling.
- [Brand Brain](https://aistlabs.ai/docs/brand-brain.md) — sources, files, facts, products, taste calibration.
- [Policies and limits](https://aistlabs.ai/docs/policies-and-limits.md) — capabilities, budget, approvals.
- [Promo codes](https://aistlabs.ai/docs/promo-codes.md) — preview and activate an owner-provided trial code, then download existing videos without a card.
- [OAuth 2.1](https://aistlabs.ai/docs/oauth.md) — discovery, dynamic registration, PKCE, tokens.
- [MCP](https://aistlabs.ai/docs/mcp.md) — remote server over Streamable HTTP.
- [Studio](https://aistlabs.ai/docs/studio.md) — direct images and videos using the website's catalog, queue and credit prices.
- [Studio library](https://aistlabs.ai/docs/studio-library.md) — projects, folders, filters, favourites and Elements; create a project, find a liked image and turn it into a quoted video.
- [Webhooks](https://aistlabs.ai/docs/webhooks.md) — events, signature, retries.
- [Errors](https://aistlabs.ai/docs/errors.md) — codes and what to do.

## Machine-readable

- OpenAPI: `https://aistlabs.ai/openapi.json`
- MCP endpoint: `https://aistlabs.ai/mcp`
- OAuth resource metadata: `https://aistlabs.ai/.well-known/oauth-protected-resource`
- OAuth server metadata: `https://aistlabs.ai/.well-known/oauth-authorization-server`
- Compact map: `https://aistlabs.ai/llms.txt` · everything in one file: `https://aistlabs.ai/llms-full.txt`

Brain schema version: `2026-09-05`. `GET /api/v1/me` publishes `schemaVersion`
and `limits`; OpenAPI `info` publishes the same global limits before authentication.
See [Policies and limits](https://aistlabs.ai/docs/policies-and-limits.md) for their meaning.

## Three ways to connect

1. **One link (recommended for agents).** `POST https://aistlabs.ai/api/v1/connect/requests` (the link is valid for 60 minutes)
   with your agent name — no credentials needed. Send `humanUrl` to the account
   owner; poll `pollUrl` with `Authorization: Bearer <pollToken>`. `pending`
   means no decision yet, not that the owner signed in or granted access. The
   API key is issued once, to the first poll after approval.
2. **OAuth 2.1.** Standard for MCP clients: register dynamically, open the
   authorization URL, exchange the code with PKCE. See the OAuth guide.
3. **API key from the console.** The owner creates a key at
   `https://aistlabs.ai/connect-agent` and stores it in your secret manager.

Never paste a key or token into a chat message. The token belongs to the
account owner; list their brands with `GET https://aistlabs.ai/api/v1/brands` and pass
`brandId` explicitly to every brand call — there is no implicit current brand.
