Overview
The Run endpoint allows you to track and monitor what AI providers say about your brand, products, or any topic across various regions. This endpoint processes your prompts through AI models and returns their responses for analysis.Example Response
Here’s an example response when asking about the best electric vehicles:- Markdown format: Complete response with formatting preserved, including headings, bold text, lists, and links
- HTML format: Fully formatted HTML with data attributes for position tracking and proper styling
- Links array: All extracted links with their positions, labels, and URLs for easy reference
Error Responses
The API returns standard HTTP status codes to indicate the success or failure of requests. All error responses follow a consistent format with an error object containing a code, message, details, and timestamp.Status Codes
200
- Success400
- Bad Request (validation error)401
- Unauthorized (authentication error)403
- Forbidden (insufficient permissions or credits)404
- Not Found (route not found)409
- Conflict (resource conflict)429
- Too Many Requests (concurrency limit exceeded)499
- Client Closed Request (request was canceled)500
- Internal Server Error502
- Bad Gateway (external service error)
Error Response Format
All error responses follow this structure:Common Error Responses
400 Bad Request - Validation Error
prompt
: “Prompt cannot be empty” (min 1 character)prompt
: “Prompt is too long (max 10,000 characters)”model
: “Invalid enum value” (must be “CHATGPT”)country
: “Invalid country code” (must be valid ISO 3166-1 alpha-2 code)
401 Unauthorized - Authentication Errors
Missing API Key
Invalid API Key Format
Invalid or Expired API Key
403 Forbidden - Permission or Credits Error
Insufficient Permissions
Insufficient Credits
404 Not Found - Route Error
429 Too Many Requests - Concurrent Limit Exceeded
499 Client Closed Request
500 Internal Server Error
Maximum Retries Exceeded
Generic Internal Error
502 Bad Gateway - External Service Error
Concurrency Limiting
This endpoint enforces concurrent request limits to ensure optimal performance:- 10 concurrent requests per user
X-Concurrent-Limit
: Maximum number of concurrent requests allowedX-Concurrent-Current
: Current number of concurrent requestsX-Concurrent-Remaining
: Number of remaining concurrent slots available
Credits System
This endpoint uses a credit-based billing system:- Maximum credits: 10,000 per account
- Cost: 1 credit per successful request (200 status only)
X-Credits-Remaining
: Number of credits remaining in your account (out of 10,000)X-Credits-Charged
: Number of credits charged for this request (always 1 for successful requests)
Supported Country Codes
The API accepts ISO 3166-1 alpha-2 country codes for thecountry
parameter. All 254 standard country codes are supported.
Common Examples:
US
- United StatesGB
- United KingdomCA
- CanadaAU
- AustraliaDE
- GermanyFR
- FranceJP
- JapanCN
- ChinaIN
- IndiaBR
- Brazil
Best Practices
- Craft Specific Prompts: Be specific about what you want to monitor for more accurate tracking
- Monitor Consistently: Set up regular monitoring intervals to track changes over time
- Compare Providers: Monitor the same prompt across different AI providers to identify variations
- Track Regions: Monitor responses across different regions to understand geographical variations
- Implement Caching: Cache responses when appropriate to reduce API calls and costs
- Error Handling: Implement robust error handling and retry logic for failed requests
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Request parameters for monitoring AI responses
The prompt to send to the AI model
Required string length:
1 - 10000
Example:
"What do you know about Acme Corp?"
The AI provider to monitor
Available options:
CHATGPT
Example:
"CHATGPT"
Optional country/region code for localized monitoring
Example:
"US"