What you need before you start
- A Bloom API key. Create one and keep it nearby — you’ll paste it into your tool’s credential vault. App integrations can use Bloom OAuth instead.
- A brand session ID. Every image you generate is scoped to a brand:
- If you already have brands, hit
GET /brandsand copy anyid. - If you don’t, create one in the Bloom app by onboarding from a URL, or via
POST /brandsfrom your workflow.
- If you already have brands, hit
- An HTTP tool in your workflow — every automation platform has one (sometimes called “HTTP request”, “API call”, or similar). That’s the only primitive you need.
The three-call pattern
- Start a generation. Returns
202 Acceptedimmediately with an image ID — the actual generation runs in the background. - Get the image. Either pass
?wait=trueand let Bloom hold the connection open until it’s ready, or poll on a short interval if your tool can’t keep a connection alive. - Use the URL. The completed image’s CDN URL is in the response — pipe it into Slack, a Google Sheet, Drive, Webflow, whatever.
When your workflow creates the brand
Brand creation is also asynchronous. Add this sequence before the image-generation pattern:POST /brandsvalidates the request, creates a provisional brand, durably queues initialization, and returns202 Acceptedwithstatus: "analyzing".GET /brands/{id}?wait=truewaits through the website or Instagram analysis and visual DNA extraction.- Continue only when
statusisready. Handlelogo_requiredby providing a logo, and handlefailedby showingfailure.messageor submitting a new brand request.
analyzing resource rather than an error. Fields such as logoUrl and summary can be null until initialization finishes.
collectImages: false on POST /brands skips only background image-library collection. Bloom still crawls the source and builds the brand’s visual DNA.
Authentication
For most automation tools, send your API key as thex-api-key header:
Authorization: Bearer bloom_sk_... for API keys and Authorization: Bearer <bloom_oauth_access_token> for app integrations using Bloom OAuth access tokens.
Step 1 — Start a generation
POST https://www.trybloom.ai/api/v1/images/generations
brandSessionId, prompt. Everything else is optional.
Common optional fields:
Response (
202 Accepted):
data.imageIds[0] — that’s what the next step needs.
Step 2 — Get the image
You have two ways to retrieve the finished image. Pick based on your tool’s request timeout.Option A — wait=true (recommended)
GET https://www.trybloom.ai/api/v1/images/{id}?wait=true
Holds the connection open until the generation reaches a terminal state. One call, no polling loop, no scheduling. Returns the same shape whether the image was already done or just finished.
Option B — Polling
GET https://www.trybloom.ai/api/v1/images/{id}
If your tool has a hard per-step timeout (Zapier in particular), fire the GET on a loop with a short delay until status is terminal.
Step 3 — Use the URL
A completed image response includes the CDN URL inside thedata envelope:
data.imageUrl and pipe it into whatever downstream step the workflow needs — upload to Drive, post to Slack, write into a Sheet cell, attach to an email.
Batching
If you fire many generations at once (e.g. one per row in a spreadsheet), you don’t have to poll each ID individually. The list endpoint acceptsids=id1,id2,...&wait=true and holds open until every referenced image reaches a terminal state. One call collects the whole batch.
Errors
Failed responses use a consistent envelope:code, not on message. Common codes you’ll see while integrating: