Analyze the sentiment of short text with a single API call. Get started in minutes with your API key and a few lines of code.
All API requests require a valid API key sent in the Authorization header as a Bearer token. You can create and manage keys from your dashboard.
Authorization: Bearer bb_your_api_key_here
Keep your API keys secret. Do not expose them in client-side code or public repositories.
Send a short text (1–140 characters) and receive a sentiment classification. Each successful call costs 1 credit.
| Field | Type | Description |
|---|---|---|
text | string | The text to analyze (1–140 characters) |
curl -X POST https://bitbabble.dev/api/v1/sentiment \
-H "Content-Type: application/json" \
-H "Authorization: Bearer bb_your_api_key_here" \
-d '{"text": "I love this product!"}'{
"sentiment": "good",
"credits_remaining": 24
}| Field | Type | Description |
|---|---|---|
sentiment | string | One of "good", "neutral", or "bad" |
credits_remaining | number | Remaining credits on your account |
| Code | Meaning | Description |
|---|---|---|
200 | Success | Sentiment analysis returned |
400 | Bad Request | Invalid or missing text field |
401 | Unauthorized | Missing or invalid API key |
402 | Payment Required | Insufficient credits |
429 | Too Many Requests | Rate limit exceeded (60 req/min) |
500 | Server Error | Unexpected error |
Each API key is limited to 60 requests per minute. If you exceed this limit, you'll receive a 429 response. Wait a moment before retrying.
Every sentiment analysis call costs 1 credit. New accounts receive 25 free credits. Purchase more from the credits page.
| Pack | Credits | Price |
|---|---|---|
| Starter | 100 | $5 |
| Growth | 500 | $20 |
| Scale | 1,000 | $35 |
Try the API directly from your browser. Sign in to auto-fill your API key, or paste one manually.
20/140