Skip to content
Last updated

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

SurfaceURLUse it for
Index for LLMshttps://docs.bria.ai/llms.txtA curated list of every page with one-line descriptions, plus the key facts about auth, async jobs and limits.
Markdown for every pageAppend .md to any page URL, for example /webhooks.md or /image-editing/v2-endpoints/blur-bg.mdClean page content without navigation. Requests that send Accept: text/markdown or a known agent user agent receive Markdown automatically.
Docs MCP serverhttps://docs.bria.ai/mcpSearch 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 descriptionsDownload button on each API reference page (for example Image Editing)The full OpenAPI 3.0 description of each API for code generation and validation.
Sandboxplatform.bria.aiTry any endpoint interactively with your token.

Connect the docs MCP server in Claude Code:

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

Call Bria from an agent

PathBest forSetup
Bria MCP serverClaude, Cursor, VS Code, ChatGPT, the Anthropic and OpenAI APIs, custom agentshttps://mcp.prod.bria-api.com/mcp with the api_token header, or uvx bria-mcp locally
Agent skillsClaude Code, Cursor, Codex, Cline and other coding agentsnpx skills add bria-ai/bria-skill, key in BRIA_API_KEY
Python SDKAgents that write and run Pythonpip install bria-client, key in BRIA_API_TOKEN
JavaScript / TypeScriptAgents that write Node or edge codefetch against the REST API with the api_token header; see the Quickstart
REST API (cURL, any language)Anything elseapi_token header; see the 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; 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

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, Python when a language is not specified, and the status endpoint for anything asynchronous.