Skip to main content

TypeScript SDK

@creatads/sdk version 1.0.0 is currently a private monorepo package in services/sdk; it is not documented as a public npm release.
The optional second constructor argument overrides the default REST endpoint.

Methods

API-key management requires a Supabase session JWT:

Generation and polling

Current pollUntilDone behavior is deliberately simple: it returns as soon as listCreatives contains at least one item. It does not wait for a stable or expected final count. For multi-image batches, continue polling until your expected count is reached.

Errors

Failed requests throw CreatadsError with code, message and statusCode. Common codes are invalid_api_key, premium_required, forbidden, quota_exceeded, missing_param and not_found.