{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["tabs","tab"]},"type":"markdown"},"seo":{"title":"Self-host Fibo 2","description":"Generate and edit images and video with Bria's Fibo models through a REST API, Python and TypeScript SDKs, MCP server and agent skills. Licensed training data, controllable output, provenance on every result.","siteUrl":"https://docs.bria.ai","image":"/assets/bria-social-card.5f3c59395e7b5efa776984c64ef9cb0956b1d651f45b7ebf9502122a66054f35.db81178d.png","llmstxt":{"hide":false,"title":"Bria API documentation","description":"Bria's developer platform: controllable, commercially safe visual generative AI (images and video) as a REST API, Python and TypeScript SDKs, MCP server and agent skills.","details":{"path":"_llmstxt-details.md"},"sections":[{"title":"Getting started","description":"First call, authentication, async jobs and webhooks, rate limits, inputs.","includeFiles":["index.md","whats-new/fibo-2.md","getting-started/quickstart.md","getting-started/authentication.md","getting-started/async-requests.md","status.yaml","getting-started/rate-limits-and-errors.md","getting-started/working-with-images.md","getting-started/asset-retention.md"]},{"title":"Integrate","description":"Python SDK, TypeScript SDK, MCP server, agent skills, and machine-readable docs for agents.","includeFiles":["integration-methods/python-sdk.md","integration-methods/typescript-sdk.md","MCP-authentication.md","integration-methods/bria-skill.md","integration-methods/for-ai-agents.md"]},{"title":"Concepts","description":"Platform map, VGL and the Fibo models, safety, best practices.","includeFiles":["products-overview.md","VGL.md","safety.md","best-practices-overview.md","image-generation-best-practices.md","image-editing-best-practices.md","product-shots-best-practices.md"]},{"title":"Image Generation","description":"Generate images from text, reference images or structured (VGL) prompts with Fibo 2.","includeFiles":["image-generation-overview.md","image-generation.yaml"]},{"title":"Image Editing","description":"Instruction-based editing plus specialized endpoints for backgrounds, erasing, fill, expansion, upscaling and style.","includeFiles":["image-editing-overview.md","image-editing.yaml"]},{"title":"Product Shot Editing","description":"Cutouts, packshots, shadows, lifestyle scenes, product integration, holding, virtual try-on, automotive.","includeFiles":["product-shot-overview.md","product-shot-editing.yaml"]},{"title":"Video Editing","description":"Background removal (REST or real-time streaming), erasing, upscaling and masks for video; local video upload.","includeFiles":["video-editing-overview.md","local-video-upload-service.md","streaming-rmbg.md","video-editing.yaml"]},{"title":"Ads","description":"Finished ads as input. Ad Delayer turns one into editable layers (the guide holds the layer document contract); Ad Resize produces it at other sizes with the layout redone.","includeFiles":["ads-overview.md","ads.yaml"]},{"title":"Trust and provenance","description":"Public verification of Bria provenance, and attribution of outputs to licensed training data.","includeFiles":["trust-and-provenance-overview.md","visual-verification-overview.md","visual-verification.yaml","enterprise/attribution.md","bria-attribution-service.yaml"]},{"title":"Self-hosting","description":"Run licensed Bria models on your own GPUs. Buy a per-model license, install with Bria Studio or the Python library, run, and handle license errors.","includeFiles":["self-hosted/quickstart.md","self-hosted/overview.md","self-hosted/best-practices.md","self-hosted/fibo-2.md","self-hosted/rmbg-2.md"]},{"title":"Enterprise","description":"Run Bria in your own cloud or on-premises.","includeFiles":["enterprise/deployment-options.md"]}],"excludeFiles":["_llmstxt-details.md","README.md"]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"self-host-fibo-2","__idx":0},"children":["Self-host Fibo 2"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Run ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/vgl"},"children":["Fibo 2"]}," image generation and editing on your own hardware with a self-hosted license. One license covers both generating and editing images. This guide installs the model, downloads its weights from Bria, and runs a first generation."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"requirements","__idx":1},"children":["Requirements"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["An active ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Fibo 2"]}," self-hosted license (",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://platform.bria.ai/licensing/pricing"},"children":["pricing"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["One of your organization's ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/getting-started/authentication"},"children":["API keys"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A machine with an NVIDIA GPU and Python 3.10 or newer (the weights are about 26 GB)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Google Vertex AI"]}," project — Fibo 2 expands your prompt into a structured ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/vgl"},"children":["VGL"]}," prompt on Gemini through your own Vertex AI, so it needs ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["VERTEXAI_PROJECT"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["VERTEXAI_LOCATION"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GOOGLE_APPLICATION_CREDENTIALS"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["For the manual install: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["curl"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jq"]},", and network access to the Bria Engine, AWS CodeArtifact and Bria's weights CDN (no Hugging Face account)"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"1-get-a-license","__idx":2},"children":["1. Get a license"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Buy a Fibo 2 license on the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://platform.bria.ai/licensing/pricing"},"children":["pricing page"]},". You manage it, and see the installation steps, on the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://platform.bria.ai/organization-management/licensing"},"children":["Licenses tab"]}," in the Console."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"2-install","__idx":3},"children":["2. Install"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Bria Studio (recommended)","disable":false},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/self-hosted/quickstart"},"children":["Bria Studio"]}," installs the package, downloads the weights, and runs a test for you:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"npx @bria-ai/studio\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Pick ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["FIBO 2"]}," when Studio lists your licensed models. It installs ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fibo_2"]}," into a virtual environment at ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["~/.bria/venvs/fibo-2"]},", downloads the weights, and runs a first generation to confirm the setup."]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Manual (Docker, CI)","disable":false},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Exchange your API key for a short-lived registry credential, then install the package:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"export BRIA_API_TOKEN=\"<your-bria-api-token>\"\n\nCA=$(curl -s \"https://engine.prod.bria-api.com/v2/outpost/access/code_artifact?repository=bria-fibo-2\" \\\n      -H \"api_token: $BRIA_API_TOKEN\" | jq -r '.result.authorization_token')\n\npip install --upgrade \"fibo_2\" \\\n  --extra-index-url \"https://aws:$CA@bria-300465780738.d.codeartifact.us-east-1.amazonaws.com/pypi/bria-fibo-2/simple/\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Weights download on first load (",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#3-run-it"},"children":["step 3"]},"). In Docker, mount ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["~/.bria"]}," to cache them."]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Set your Vertex AI credentials so Fibo 2 can expand prompts:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"export VERTEXAI_PROJECT=\"<your-gcp-project>\"\nexport VERTEXAI_LOCATION=\"<region>\"            # e.g. us-central1\nexport GOOGLE_APPLICATION_CREDENTIALS=\"/path/to/service-account.json\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"3-run-it","__idx":4},"children":["3. Run it"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Run from the environment the model is installed in. If you used Studio, activate the venv it created:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"source ~/.bria/venvs/fibo-2/bin/activate\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Then load the model with your API key and generate an image. On first load ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["setup()"]}," checks your license and downloads the weights to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["~/.bria/models"]},"; later runs reuse them."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import os\nfrom fibo_2 import Fibo2Config, Fibo2Input, Fibo2Pipeline\n\n# Reads BRIA_API_TOKEN; checks the license and downloads ~26 GB of weights on first load.\npipeline = Fibo2Pipeline(config=Fibo2Config(api_token=os.environ[\"BRIA_API_TOKEN\"]))\npipeline.setup()\n\n# Generate from a prompt.\nresult = pipeline.execute(Fibo2Input(prompt=\"A red bicycle leaning against a white brick wall\", seed=42))\nresult.image.save(\"output.png\")\n\n# Edit: pass the image back in with an instruction.\nedited = pipeline.execute(Fibo2Input(images=[result.image], prompt=\"Make the bicycle blue\", seed=42))\nedited.image.save(\"edited.png\")\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Fibo2Input"]}," takes a free-form ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["prompt"]}," (expanded to ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/vgl"},"children":["VGL"]}," on your Vertex AI), plus optional ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["images"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["style"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["seed"]},". Inputs and outputs stay on your machine — only a small ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/enterprise/attribution"},"children":["attribution"]}," vector is sent to Bria."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"errors-and-troubleshooting","__idx":5},"children":["Errors and troubleshooting"]},{"$$mdtype":"Tag","name":"details","attributes":{},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["No license for FIBO 2"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Your account holds no active Fibo 2 license, so the install stops before anything downloads. Buy or renew it on the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://platform.bria.ai/organization-management/licensing"},"children":["Licenses tab"]},"."]}]},{"$$mdtype":"Tag","name":"details","attributes":{},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LicenseError"]}," when the model starts"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The license was cancelled or ended. Open the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://platform.bria.ai/organization-management/licensing"},"children":["Licenses tab"]}," — the error links straight to it. A card retry (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["past_due"]},") stays active."]}]},{"$$mdtype":"Tag","name":"details","attributes":{},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["The model won't load and asks for an API token"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["No ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BRIA_API_TOKEN"]}," is set. Set it, or pass ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Fibo2Config(api_token=\"...\")"]},"."]}]},{"$$mdtype":"Tag","name":"details","attributes":{},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Prompt expansion asks for Google credentials"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["VERTEXAI_PROJECT"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["VERTEXAI_LOCATION"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GOOGLE_APPLICATION_CREDENTIALS"]}," (see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"#requirements"},"children":["Requirements"]},")."]}]},{"$$mdtype":"Tag","name":"details","attributes":{},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WeightsError"]}," during download"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The download was interrupted. Run again — it resumes where it stopped."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"usage-and-billing","__idx":6},"children":["Usage and billing"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Self-hosted runs are counted against your Fibo 2 license and shown in ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Usage & billing"]}," in the Console, tagged as self-hosted. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/self-hosted/overview#licensing-and-usage"},"children":["Self-hosted models"]}," for how licensing and billing work across models."]}]},"headings":[{"value":"Self-host Fibo 2","id":"self-host-fibo-2","depth":1},{"value":"Requirements","id":"requirements","depth":2},{"value":"1. Get a license","id":"1-get-a-license","depth":2},{"value":"2. Install","id":"2-install","depth":2},{"value":"3. Run it","id":"3-run-it","depth":2},{"value":"Errors and troubleshooting","id":"errors-and-troubleshooting","depth":2},{"value":"Usage and billing","id":"usage-and-billing","depth":2}],"frontmatter":{"title":"Self-host Fibo 2","description":"Run Bria's Fibo 2 image generation and editing on your own GPUs with a self-hosted license. Install with Bria Studio or manually (Docker, CI), run a first generation, and handle license errors.","seo":{"title":"Self-host Fibo 2"}},"lastModified":"2026-10-20T15:06:45.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/self-hosted/fibo-2","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}