curl. Everything here is also available in the console; the API just makes each step explicit.
A campaign commits its entire budget the moment you create it. Top up your balance first — see Deposits — and use a small budget while you are finding your feet.
Before you start
1
Get an API key
In the console, open Settings → API keys and create one. The full key is shown once, at creation. It looks like
sk-af-v1- followed by 32 hex characters. See API keys.2
Export it
1. Upload a logo
A project needs a logo. Uploads are two calls: reserve a slot, then send the bytes.sizeBytes and contentType are checked against the actual bytes you send, so they have to be right. Limits are in Media.
2. Create a project
Let Aflux read your site first — it drafts the name, description and brand colours for you.3. Write and validate the ad copy
4. Find channels
filters shows how your sentence was read — 20K+ subscribers comes back as minSubscribers: 20000. If it read you wrong, correct the prompt and search again. See Finding channels.
5. Ask for a budget spread
recommendation of AI_BEST, NORMAL or LOW_TRAFFIC.
6. Create the campaign
{channel}and{campaign}indestinationUrlare substituted per placement, so your own analytics can tell channels apart. See Campaigns.idempotencyKeymakes a retried request safe. Reuse the same UUID when you retry; use a fresh one for a genuinely new campaign.
7. Approve the deals
The agent now contacts channel owners. Poll the placements:PENDING_APPROVAL, read what was agreed and approve it:
8. Read the results
Next
Concepts
The vocabulary — projects, campaigns, placements, balance.
MCP server
Do all of the above from your own AI agent instead.