Skip to content
Adwright API

Build with Adwright in one prompt

Hand your coding agent one prompt and an API key. It writes the client, the retries and the webhooks; you describe the feature.

1

Send the prompt to your agent

Claude Code, Cursor, Codex or any other

# Task: build on the Adwright API

Adwright researches a product and its market, then makes ads for it: researched image ads, video ads in styles from claymation to talking heads, and verdicts from its Ad Council. It also serves the image and video models it uses (GPT Image, Nano Banana, Seedream, Flux, Kling, Seedance, Wan and more) behind one REST API.

## Connect
- Base URL: https://api.adwright.co/v1/platform
- Auth: every request sends `Authorization: Bearer <key>`. Keys start with `adw_live_` and are made at https://developer.adwright.co/keys. Read the key from the environment variable ADWRIGHT_API_KEY; never hard-code it or send it to a browser.
- JSON in and out, snake_case fields.
- Everything that makes something is asynchronous: it answers 202 with an id and a status (queued, running, succeeded, failed). Poll the GET for that id every few seconds, or pass `webhook_url` and wait for a signed POST.
- Send an `Idempotency-Key` header (a UUID) with every POST, so a retry never pays twice.

## Endpoints
- GET /models: every model and workflow with its price (`price_from.usd`).
- POST /generations { model, prompt, aspect?, inputs?, count?, webhook_url? } then GET /generations/{id}: `output.url` when it succeeded.
- POST /generations/quote: the price of a generation before making it.
- POST /uploads (multipart, field `file`): a picture or clip to make from; put its id in `inputs.images`, `inputs.start` or `inputs.videos`.
- POST /projects { url, brief?, platforms?, language?, research? } then GET /projects/{id}: the research (product, audience, angles) and its image ads.
- POST /projects/{id}/ads { count?, platform?, angle?, instruction? }: more image ads; follow GET /jobs/{job_id}.
- GET /video-styles, then POST /projects/{id}/videos { style, seconds?, count?, aspect? }; GET /videos/{id}, POST /videos/{id}/render for one MP4.
- POST /council { question, project_id?, options? } then GET /council/{id}: a verdict with next steps.
- GET /balance: the dollars left.

## Errors
Failures are application/problem+json with a stable `code`: invalid_request, unauthorized, not_found, insufficient_balance (402: top up at https://developer.adwright.co/billing), rate_limited and concurrency_limited (429: wait for Retry-After, then retry), idempotency_conflict, unavailable. Show the `title` to people; log `request_id`.

## Webhooks
Verify `Adwright-Signature: t=<unix>,v1=<hex>`: v1 is HMAC-SHA256 of "<t>.<raw body>" with the webhook secret from https://developer.adwright.co/keys. Reject anything older than five minutes. The event's `data` names the job and what it made; fetch the full result with GET.

## Build
Write a small typed client for these endpoints with retries on 429 and 5xx (exponential backoff, honour Retry-After), then the feature I describe next. Full reference: https://developer.adwright.co/docs
2

Create an API key

Put it in your environment as ADWRIGHT_API_KEY

Create API key
export ADWRIGHT_API_KEY=adw_live_•••• 3f9a
3

Make your first call

Start a project from a link: research, angles and the first image ads, in a few minutes

curl https://api.adwright.co/v1/platform/projects \
  -H "Authorization: Bearer $ADWRIGHT_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{ "url": "https://example.com/products/serum", "platforms": ["meta", "tiktok"] }'

It answers 202 with the project’s id. Poll GET /projects/{id}, or pass a webhook_url and we’ll POST when it’s ready.

Explore models & workflows

Discover what you can make