Overview
ChatAds can analyze product images and return affiliate links, just like it does with text messages. Pass an image URL or a base64-encoded image file, and ChatAds will identify the product and find matching affiliate offers.How It Works
- You send a request with
input_typeset toimage_urlorimage_file - The
messagefield contains the image URL (forimage_url) or the base64-encoded image data (forimage_file) - ChatAds processes the image to identify the product
- Matching affiliate offers are returned in the standard response format
Input Types
| Value | Description | message contains |
|---|---|---|
text | Default. Analyze a text message for product mentions | User message text |
image_url | Analyze a product image from a URL | A publicly accessible image URL |
image_file | Analyze an uploaded product image | Base64-encoded image data |
Usage
Image URL
Pass a publicly accessible image URL in themessage field. The API automatically normalizes URLs — if no scheme is provided (e.g., example.com/photo.jpg), https:// is prepended. Invalid or malformed URLs return a 400 INVALID_INPUT error.
Image File (Base64)
Value must be a base64-encoded JPEG/PNG/WebP, max 10MB. Auto-resized if longest dimension exceeds 1500px. Don’t recommend using API explorer for this. Pass the raw base64-encoded image data in themessage field:
Response
The response format is identical to text-based requests. In verbose mode, theinput_type field is included in data:
Billing
Image requests are tracked separately in your usage dashboard. They count toward your monthly request quota the same as text requests. However, image requests do cost more money. They effectively count as 3 standard requests for billing (not for API limits). In other words, if the standard cost is 2.70 for 1k image requests. For instance, your bill could be: 10k text requests = 27 Total: $36Limitations
- Image URL must be publicly accessible (no authentication required)
- Image file payloads can be large (base64 encoding increases size ~33%) — the standard message length limit is relaxed for
image_filerequests. Value must be a base64-encoded JPEG/PNG/WebP, max 10MB. Auto-resized if longest dimension exceeds 1500px. Don’t recommend using API explorer for this. - Text-based keyword filtering and language checks are skipped for image inputs since there is no text to analyze
- Country and IP-based targeting still apply normally