SDKs and OpenAPI
TypeScript and Python clients, the OpenAPI 3.1 specification and the API's llms.txt.
There are two minimal, dependency-free clients: one for TypeScript and one for Python. They wait for jobs over SSE, retry on their own (429, 5xx and network cuts) with an automatic Idempotency-Key, walk through the pages and verify webhook signatures.
Package@bannermotion/sdk (Node 18+, Deno, Bun and workers)bannermotion (Python 3.9+, standard library only)StatusWhat they cover
Both cover every route in the OpenAPI specification: banners, jobs, campaigns, exports, assets, estimate, paginate and verifyWebhook / verify_webhook. With a bm_test_ key everything responds with sample data and spends no credits.
- Idempotency: every
POSTthat creates work carriesIdempotency-Key(yours or a new one), so retries never charge twice. - Errors: they throw
BannerMotionErrorwithstatus,code,messageanddetails. jobs.waitdoes not throw if the job failed: it returns the job withstatus: "failed"anderror.
OpenAPI and llms.txt
The complete, always up-to-date reference is the OpenAPI 3.1 specification: https://app.bannermotion.com/api/v1/openapi.json. Every route, schema, error and webhook is there; use it to generate a client in another language or import it into Postman. https://app.bannermotion.com/api/v1/llms.txt is a Markdown summary for AI assistants. Both are public and need no key.