API Configuration
Control how ReviewSense communicates with the AdvikLabs API — model selection, language, rate limits, and error handling.
Authentication
Every request to the ReviewSense API must include your API key in the Authorization header using the Bearer scheme.
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
API keys are scoped to your AdvikLabs account. You can generate separate keys for staging and production from Dashboard → Licenses → Manage API Keys. Never expose your key in client-side code.
Base URL & Versioning
All ReviewSense API endpoints are available under the following base URL:
https://api.adviklabs.com/reviewsense/v1
The version segment (v1) is included in every endpoint path. When a new major version is released, the previous version remains available for at least 12 months. Breaking changes are never introduced within the same major version.
The WordPress plugin handles the API base URL automatically. You only need this section if you are calling the API directly from your own application.
Analyse a Review
Submit review text for sentiment analysis with a single POST request:
{
"text": "Absolutely loved this product! Fast shipping and great quality.",
"language": "en",
"model": "standard",
"generate_response": true,
"metadata": {
"review_id": "wc_rev_1042",
"product_id": 588
}
}
| Field | Type | Required | Description |
|---|---|---|---|
| text | string | Yes | The review content to analyse. Max 5,000 characters. |
| language | string | No | BCP 47 language code (e.g. "en", "fr", "de"). Defaults to auto-detect. |
| model | string | No | "standard" (default) or "pro". See Model Selection. |
| generate_response | boolean | No | If true, returns an AI-drafted reply. Default: false. |
| metadata | object | No | Arbitrary key-value pairs echoed back in the response for correlation. |
Response Object
A successful 200 OK response returns the following JSON object:
{
"id": "rs_ana_01JXXXXXXXXXXXXX",
"sentiment": "positive",
"score": 87,
"confidence": 0.94,
"topics": ["shipping", "quality"],
"response_draft": "Thank you for your kind words! We're delighted...",
"language_detected": "en",
"model_used": "standard",
"metadata": { "review_id": "wc_rev_1042", "product_id": 588 },
"created_at": "2026-04-24T14:23:00Z"
}
| Field | Description |
|---|---|
| sentiment | "positive", "neutral", or "negative". |
| score | Integer 0–100. Higher = more positive. |
| confidence | Float 0–1 indicating model certainty. |
| topics | Array of detected topic strings (e.g. "shipping", "support"). |
| response_draft | AI-generated reply. Null if generate_response was false. |
| language_detected | BCP 47 code of the detected review language. |
Model Selection
ReviewSense offers two analysis models. Choose based on your accuracy needs and monthly quota:
standardDefaultFast, cost-efficient analysis. Suitable for most stores. Uses 1 credit per request.
- ~200 ms response time
- Supports 30+ languages
- 1 credit / request
proHigher AccuracyEnhanced model with topic extraction and nuanced emotion detection. Best for high-volume stores that rely on actionable insights.
- ~600 ms response time
- Emotion tags (joy, frustration…)
- 3 credits / request
Rate Limits & Quotas
Each plan includes a monthly credit allocation and a per-second rate limit. Exceeding the rate limit returns a 429 Too Many Requests response.
| Plan | Monthly Credits | Requests/sec | Overage |
|---|---|---|---|
| Free | 500 | 2 | Blocked (no overage) |
| Starter | 5,000 | 10 | $0.002 / credit |
| Growth | 25,000 | 30 | $0.0015 / credit |
| Enterprise | Custom | Custom | Negotiated |
Every response includes X-RateLimit-Remaining and X-RateLimit-Reset headers so you can monitor usage programmatically. The WordPress plugin automatically backs off and retries on 429.
Error Codes
All errors follow a consistent JSON shape with a machine-readable code and a human-readable message:
{
"error": {
"code": "text_too_long",
"message": "Review text exceeds the 5,000 character limit.",
"status": 422
}
}
| HTTP Status | Code | Description |
|---|---|---|
| 401 | unauthorized | Missing or invalid API key. |
| 403 | forbidden | API key does not have permission for this action. |
| 422 | text_too_long | Review text exceeds 5,000 characters. |
| 422 | invalid_language | Supplied language code is not supported. |
| 429 | rate_limited | Requests per second limit exceeded. Retry after X-RateLimit-Reset. |
| 429 | quota_exceeded | Monthly credit quota exhausted. |
| 500 | internal_error | Unexpected server error. Retry with exponential back-off. |
For persistent 5xx errors, check the AdvikLabs status page or open a support ticket from your dashboard.