
1. Authenticate
For server-side automations, open your account settings and generate an API key. Store it asBLOOM_API_KEY in your environment or secret manager before running the examples below. Treat it as a secret — never commit it or expose it client-side.
App integrations can use Bloom OAuth instead and call the API with Authorization: Bearer <access_token>. See API authentication for the OAuth endpoints and PKCE requirements.
2. Get a Brand ID
Pick an existing brand or create one from your sources. Its Brand ID is thebrandSessionId used in the requests below.
- Existing brand
- Create a brand
List your brands and copy any Pick a brand whose
id:status is ready. Its id is the brandSessionId you’ll use next. If the brand is still analyzing, continue to step 3.3. Wait for the brand
Passwait=true to wait for the current brand analysis:
status: "analyzing", call the same endpoint again with the same Brand ID. Continue only when the brand is ready.
If the brand is failed, show failure.message and follow Handle failures for retries.
4. Request a Brief
Describe what you want to make:data.id to retrieve the Brief:
pending or processing. Once completed, use data.guidance and relevant data.assets to prepare the model input. The Brand ID scopes a generation; it does not add context automatically. See Request a Brief for details and failure handling.
5. Make your first generation
Find an image model, then read its input schema. This example usesopenai/gpt-image-1.5:
input according to the returned inputSchema. Replace the example prompt below with your task and the Brief’s guidance; include relevant assets where the model supports them.
Generations run asynchronously and can return multiple outputs. The initial response contains a generation ID.
data.id to retrieve the result:
6. Retrieve the result
CallGET /generations/{id} with wait=true to wait for the result:
data.status is completed, each entry in data.outputs contains a file’s url and mimeType. If the status is still pending or generating, repeat the same read. If it is failed, read data.failure before retrying.
The API reference defines the complete request and response contracts.