Skip to main content

Prerequisites

Step 1: Get Your API Key

  1. Log into app.getchatads.com
  2. Navigate to SettingsAPI Keys
  3. Click Create API Key
  4. 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

FieldDescription
successWhether the request was processed successfully
data.matchedWhether a product keyword was found
data.filledWhether an affiliate link was resolved
data.adThe affiliate link details (if matched)
data.keywordThe extracted product keyword
meta.request_idUnique ID for debugging and support

Next Steps