Skip to main content
POST
/
v1
/
chatads
/
messages
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",
    "message_analysis": "balanced"
  }'
{
  "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",
    "intent_score": 0.85,
    "intent_level": "high"
  },
  "meta": {
    "request_id": "d6a8f6f2-3b5a-4f0a-81ab-1b4a4c9dd5ea",
    "country": "US",
    "language": "en",
    "extraction_method": "llm",
    "message_analysis_used": "balanced",
    "fill_priority_used": "coverage",
    "min_intent_used": "low",
    "usage": {
      "monthly_requests": 250,
      "daily_requests": 20,
      "daily_limit": 100,
      "is_free_tier": true,
      "free_tier_limit": 100,
      "free_tier_remaining": 0
    }
  }
}
Analyzes a user message to extract product keywords and return relevant affiliate links.

Request Body

message
string
required
The user message to analyze. Required, 1-5000 characters.
ip
string
Client IP address for geo-detection (max 64 characters).
country
string
ISO 3166-1 alpha-2 country code for geo-targeting (e.g., “US”, “GB”, “DE”).
message_analysis
string
default:"balanced"
Controls keyword extraction method:
  • fast - NLP-only extraction (~50ms)
  • balanced - Hybrid NLP/LLM approach (~150ms)
  • thorough - Deeper LLM extraction (~300ms)
fill_priority
string
default:"coverage"
Controls URL resolution fallback:
  • speed - Skip Serper fallback (faster)
  • coverage - Full resolution chain (more matches)
min_intent
string
default:"low"
Minimum purchase intent level:
  • any - No filtering
  • low - Filter garbage queries
  • medium - Balanced quality/fill
  • high - Premium queries only
skip_message_analysis
boolean
default:"false"
When true, skips NLP/LLM extraction and uses the message content directly as the search query. This bypasses message_analysis, fill_priority, and min_intent settings.

Response

success
boolean
required
Whether the request was processed successfully.
data
object
meta
object
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",
    "message_analysis": "balanced"
  }'
{
  "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",
    "intent_score": 0.85,
    "intent_level": "high"
  },
  "meta": {
    "request_id": "d6a8f6f2-3b5a-4f0a-81ab-1b4a4c9dd5ea",
    "country": "US",
    "language": "en",
    "extraction_method": "llm",
    "message_analysis_used": "balanced",
    "fill_priority_used": "coverage",
    "min_intent_used": "low",
    "usage": {
      "monthly_requests": 250,
      "daily_requests": 20,
      "daily_limit": 100,
      "is_free_tier": true,
      "free_tier_limit": 100,
      "free_tier_remaining": 0
    }
  }
}