Maak mijn eerste campagne
Menu van de documentatie
API

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.

Let op. They are not published on npm or PyPI yet. Ask us for the code at soporte@bannermotion.com. [PLACEHOLDER: install channel and publication date]
TypeScriptPython
Package
@bannermotion/sdk (Node 18+, Deno, Bun and workers)
bannermotion (Python 3.9+, standard library only)
Status
Not published
Not published

What 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 POST that creates work carries Idempotency-Key (yours or a new one), so retries never charge twice.
  • Errors: they throw BannerMotionError with status, code, message and details.
  • jobs.wait does not throw if the job failed: it returns the job with status: "failed" and error.

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.

Tip. A server test requires every API route to be in the specification and the fields of each body to match their validation.
Was deze pagina nuttig?