AdPrompt x402 API

AdPrompt allows small businesses and agencies to plan, create, and launch local marketing campaigns in minutes. Our platform does the heavy lifting so you can focus on helping customers.

If you're a tech savvy lean marketing team, then you can leverage the AdPrompt API endpoints and pay using x402 for only what you need.

How it works

AdPrompt exposes three core API endpoints that implement the x402 payment protocol. Eachrequest follows a simple flow

Having SMART (Specific, Measurable, Achievable, Relevant, Time-bound) goals ensures your campaign stays focused and aligned with your broader business objectives.

1

Request

Call any endpoint with your payload

2

Payment required

Receive HTTP 402 with payment details

3

Pay & execute

Include payment proof in headers, get results

All endpoints return both a polished business-ready report and raw JSON for downstream tools and agents

Endpoint 1: Brand scan

POST /brand-scan

Analyze any brand from just a website URL. Returns a comprehensive brand profile including positioning, target audience, tone & voice, and visual identity.

Brand positioning & market category
Target audience segments
Tone & voice guidelines
Key messages & trust signals
Strengths, risks & opportunities
Actionable next steps
Brand color palette

Input

Analyze any brand from just a website URL. Returns a comprehensive brand profile including positioning, target audience, tone & voice, and visual identity.

Parameter
Required
Description
Website
Yes
The brand's website URL
[ Example Request]
1curl -X POST "https://x402.adprompt.io/brand-scan" \
2 -H "Content-Type: application/json" \
3 -d '{
4 "website": "https://example.com"
5 }'

Output Location: result.final_result

Contains: scrape, brand_kit, compressed_profile, embedded_profile, plus payment and artifacts metadata

Endpoint 2: Creative generation

POST /creative-generation

Generate publishable image or video creatives for any social platform. Assets are automatically formatted for the selected channel.

What you get

On-brand creative assets (image or video)
Auto-formatted for platform dimensions
Caption copy with hashtags & CTAs
Multi-platform support

Supported platforms

Instagram, TikTok, Facebook, YouTube, Pinterest, X, LinkedIn, Discord, Snapchat, Reddit, Twitch, WeChat, and more

Input

Parameter
Required
Description
business summary
Yes
Brief description of the business
platform
Yes
Target platform (Instagram, TikTok)
media_type
Yes
image or video
description
No
Creative direction or concept
render_size
No
Preset size option
custom_size
No
Custom dimensions
[ Example Request]
1curl -X POST "https://api.adprompt.ai/creative-generation" \
2 -H "Content-Type: application/json" \
3 -d '{
4 "business_summary": "Bark n Purr Boise is a locally-owned pet store.",
5 "platform": "instagram",
6 "media_type": "image"
7 }'

Output Location: result.final_result

Contains: kind, platform, and items[] where each item includes media_type, url, caption, hashtags,cta.

Endpoint 3: Ad strategy builder

POST /ad-strategy

Generate a complete ad strategy with budget allocation, platform recommendations, and KPIs. Works with or without a specified budget.

What you get

Clear objective & approach
Platform-specific recommendations
Budget allocation (daily/monthly)
Targeting inputs & KPIs
Multiple spend tier options

Two modes

Mode
When
What you get
Ladder mode
No budget provided
Multiple spend tiers showing how allocation scales
Allocation
mode
Budget provided
Specific platform allocation for your budget

Supported platforms

Google (Search, Display, Shopping), Facebook, Instagram, YouTube, TikTok, LinkedIn, Pinterest, Snapchat, Reddit, X, Amazon Ads, Spotify, and 15+ more.

Parameter
Required
Description
business_summary
Yes
Brief description of the business
location_country
Yes
Target country (e.g., "United States")
budget_usd
Yes
Monthly budget in USD (null for ladder)
[No Budget]
1curl -X POST "https://x402.adprompt.io/ad-strategy" \
2 -H "Content-Type: application/json" \
3 -d '{
4 "business_summary": "Bark n Purr Boise is a locally-owned pet 
5store.",
6 "location_country": "United States",
7 "budget_usd": null
8 }'
[With Budget]
1curl -X POST "https://x402.adprompt.io/ad-strategy" \
2 -H "Content-Type: application/json" \
3 -d '{
4 "business_summary": "Bark n Purr Boise is a locally-owned pet 
5store.",
6 "location_country": "United States",
7 "budget_usd": 600
8 }'

How payment works

All AdPrompt endpoints implement the x402 payment protocol for pay-per-use pricing.

1

Send your request to any endpoint

2

Receive HTTP 402 Payment Required

3

Pay and add proof in next headers.

4

Receive HTTP 200 with your results

Payment headers

Include payment proof using one of these headers (in order of preference)

Header
Priority
Payment-signature
Preferred
x-payment
Compatible
x402-proof
Optional

Response headers

Header
Priority
Payment-signature
Payment details (on 402 response)
x-payment
Payment confirmation
x402-txid
Transaction ID for successful payments

Quick reference

Base URL: https://api.adprompt.ai

All endpoints

Endpoint
Method
Description
/brand-scan
Post
Analyze a brand from website
/creative-generation
Post
Generate image/video creatives
/ad-strategy
Post
Build ad strategy & budget plan

Billing

Action
Billable Unit
Brand scan
1 scan run
Creative generation
1 asset run
Ad strategy
1 plan (regardless of tiers)