/api/v1/bannersCreate a banner
Creates a concept in all the sizes and locales you ask for. Responds 202 with a job; check its status or wait for the webhook.
A single request creates a concept: one banner idea delivered complete in all the sizes and locales you send. You do not need one request per size or per locale: there is a single charge, per concept, and it grows with the sizes and locales you send.
The response is immediate: a job that the AI finishes later. Check its status at statusUrl or wait for the banner.generated webhook. Requires the generate permission.
What is charged
Each request charges 1 concept, according to the sizes and locales you send. With Sonnet 5.5 it is 8 + 1.5 × sizes + 0.5 × (locales − 1) credits, with no steps: 1 size in 1 locale costs 10 credits; 4 sizes in 1 locale, 14 credits; up to 12 sizes, 26 credits. If you ask for 4 sizes in 2 locales, you get 8 pieces and pay 15 credits.
The API uses your workspace's default model (Settings), and the price depends on it: a concept with 4 sizes and 1 locale costs 7 credits with Haiku 5.5, 14 with Sonnet 5.5, 28 with Opus 5.5 and 70 with Fable 5.1. Test keys do not charge. If the job fails, the credits are returned. To know the cost before asking, use "Estimate credits" (link at the end).
Headers
AuthorizationContent-TypeIdempotency-Key200 characters. The same key with the same body returns the same response; with a different body, a 422 error.Body (JSON, maximum 256 KB)
promptstring1 to 2000 characters.sizesstring[]300x250. From 1 to 12. The concept comes out in all of them. If omitted, 300x250, 728x90, 160x600 and 320x50 are used (or those of campaignId, if you send it; or those of the reference frames).localesstring[]es-CR or en-US. From 1 to 10. The first one is the base language. The concept comes out in all of them; each locale after the first adds 0.5 credits with Sonnet 5.5. If omitted, es-CR is used (or those of campaignId, if you send it). Options: es-CR, es-MX, es-ES, en-US, en-GB, pt-BR, fr-CA, fr-FR, de-DE, it-IT.styleIdstring400 error lists the valid ids.variantinteger0 (default) to 50. With 1 or more, the AI looks for an idea different from the obvious one.campaignIdstringreferenceobjectUnknown fields are not accepted: they respond 400.
Reference composition
If you already have the design, send it in reference: source (figma, image or other) and frames, up to 12, one per size. Each frame carries its size, its background and its layers (up to 60): a box in pixels (x, y, w, h), the stacking order z, the kind (text, image, vector or shape), the role in the hierarchy (headline, cta, logo…), the literal text with its style, and the fills.
- The reference texts are the banner's texts, as they are. Images and logos are mandatory: upload them first to the library (link at the end) and send their
assetId. - Positions and hierarchy are respected per size. Sizes without a frame are adapted from the closest one.
- It does not count toward the
2000characters ofprompt; that is why the body accepts up to256KB.
Responses
—statusUrl.bad_requestassetId in the reference does not exist in your workspace.unauthorizedinsufficient_creditsforbiddenemail_unverified).not_foundcampaignId does not exist in your workspace.conflictIdempotency-Key still in progress.payload_too_large256 KB.idempotency_mismatchIdempotency-Key was already used with another request.rate_limitedRetry-After.Limit: 60 requests per minute per key. [PLACEHOLDER: confirm the value in production]. If you exceed it, the response includes Retry-After.
With a test key
With bm_test_… the response is already resolved (status: "succeeded"), includes test: true, the creativeId and a bannerUrl, and is the same for the same request. Those ids can only be read with test keys and do not exist in your workspace.