# Bria for AI agents

Bria is built to be used by agents as much as by people. This page lists the machine-readable surfaces of the documentation and the shortest paths from an agent to a working call. If you are an agent reading this: everything you need is linked from here.

## Read the docs programmatically

| Surface | URL | Use it for |
|  --- | --- | --- |
| Index for LLMs | [`https://docs.bria.ai/llms.txt`](https://docs.bria.ai/llms.txt) | A curated list of every page with one-line descriptions, plus the key facts about auth, async jobs and limits. |
| Markdown for every page | Append `.md` to any page URL, for example `/webhooks.md` or `/image-editing/v2-endpoints/blur-bg.md` | Clean page content without navigation. Requests that send `Accept: text/markdown` or a known agent user agent receive Markdown automatically. |
| Docs MCP server | `https://docs.bria.ai/mcp` | Search the docs, list APIs and endpoints, and fetch endpoint schemas and security schemes as tools. Connect it from Cursor, VS Code or Claude Code, or use the "Connect" actions at the top of any page. |
| OpenAPI descriptions | Download button on each API reference page (for example [Image Editing](/image-editing)) | The full OpenAPI 3.0 description of each API for code generation and validation. |
| Sandbox | [platform.bria.ai](https://platform.bria.ai/console) | Try any endpoint interactively with your token. |


Connect the docs MCP server in Claude Code:

```bash
claude mcp add --transport http bria-docs https://docs.bria.ai/mcp
```

## Call Bria from an agent

| Path | Best for | Setup |
|  --- | --- | --- |
| [Bria MCP server](/mcp-authentication) | Claude, Cursor, VS Code, ChatGPT, the Anthropic and OpenAI APIs, custom agents | `https://mcp.prod.bria-api.com/mcp` with the `api_token` header, or `uvx bria-mcp` locally |
| [Agent skills](/integration-methods/bria-skill) | Claude Code, Cursor, Codex, Cline and other coding agents | `npx skills add bria-ai/bria-skill`, key in `BRIA_API_KEY` |
| [Python SDK](/integration-methods/python-sdk) | Agents that write and run Python | `pip install bria-client`, key in `BRIA_API_TOKEN` |
| [TypeScript SDK](/integration-methods/typescript-sdk) | Agents that write TypeScript or JavaScript for Node.js | `npm install @bria-ai/client`, key in `BRIA_API_TOKEN` |
| REST API (cURL, any language) | Anything else | `api_token` header; see the [Quickstart](/getting-started/quickstart) |


## Facts every agent should know

- Base URL `https://engine.prod.bria-api.com`. Authenticate with the `api_token` header; only `/v2/image/verify` and `/v2/video/verify` are public.
- v2 endpoints are asynchronous: they return `202` with `request_id` and `status_url`. Poll `GET /v2/status/{request_id}` every 1 to 2 seconds until `status` is `COMPLETED`, `ERROR` or `UNKNOWN`, or pass `webhook_url`. `sync: true` blocks and returns the result, except for async-only options such as `resolution: "4MP"`.
- Images are a public URL or a raw base64 string (no `data:` prefix). JPEG, PNG and WEBP.
- Do not send optional parameters you do not need. Defaults are tuned for quality.
- For a transparent background or a cutout of a single image, use `/v2/image/edit/remove_background`. For live video use [Streaming Background Removal](/streaming-rmbg); for files use `/v2/video/edit/remove_background`.
- Generation returns a `structured_prompt` and a `seed`. Store both: sending them back reproduces the image, and adding a `prompt` refines it without changing the composition.
- Rate limits are per organization and endpoint: Free 10, Pay-as-you-go 60, Enterprise 1000 requests per minute. On `429`, back off exponentially.
- Please send `User-Agent: BriaPlatform/APIdocs/LLMsAgent` on API calls made on behalf of an agent, so Bria can support agent traffic well.


## A brief you can paste into a system prompt

```text
You can generate and edit images and video with Bria (https://docs.bria.ai). Authenticate with the
api_token header. Prefer v2 endpoints under https://engine.prod.bria-api.com/v2. Requests are async:
POST returns request_id and status_url; poll GET /v2/status/{request_id} until status is COMPLETED,
then download result.image_url or result.video_url. Pass images as public URLs or raw base64. Use
/image/generate for new images, /image/edit for instruction edits, /image/edit/remove_background for
cutouts, /image/edit/expand for outpainting, /image/edit/increase_resolution for upscaling, and
/image/edit/product/* for product photography. Read https://docs.bria.ai/llms.txt for the full index.
```

## Ask the docs

The **Ask AI** button in the header answers questions from these docs only, with code where it helps. It follows the same conventions as this page: REST by default, the Python SDK when a language is not specified, the TypeScript SDK when asked for JavaScript or TypeScript, and the status endpoint for anything asynchronous.