Prerequisites
Step 1: Get Your API Key
- Log into app.getchatads.com
- Navigate to Settings → API Keys
- Click Create API Key
- Copy your new API key (starts with
cak_)
Keep your API key secure. Never expose it in client-side code or public repositories.
Step 2: Make Your First Request
curl -X POST 'https://chatads--chatads-api-fastapiserver-serve.modal.run/v1/chatads/messages' \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_API_KEY' \
-d '{
"message": "What are the best noise-cancelling headphones?",
"country": "US"
}'
Step 3: Handle the Response
A successful response looks like this:
{
"success": true,
"data": {
"matched": true,
"filled": true,
"ad": {
"product": "Noise-Cancelling Headphones",
"link": "https://www.amazon.com/dp/B0XXXXXXXXX?tag=yourtag-20",
"message": "Block out distractions with premium ANC headphones.",
"category": "electronics"
},
"keyword": "noise-cancelling headphones"
},
"meta": {
"request_id": "d6a8f6f2-3b5a-4f0a-81ab-1b4a4c9dd5ea",
"country": "US",
"language": "en",
"extraction_method": "llm"
}
}
Response Fields
| Field | Description |
|---|
success | Whether the request was processed successfully |
data.matched | Whether a product keyword was found |
data.filled | Whether an affiliate link was resolved |
data.ad | The affiliate link details (if matched) |
data.keyword | The extracted product keyword |
meta.request_id | Unique ID for debugging and support |
Next Steps