BitBabble
Documentation

API Reference

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.

Authentication

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.

Analyze Sentiment

POST/api/v1/sentiment

Send a short text (1–140 characters) and receive a sentiment classification. Each successful call costs 1 credit.

Request Body

FieldTypeDescription
textstringThe text to analyze (1–140 characters)

Example Request

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!"}'

Example Response

{
  "sentiment": "good",
  "credits_remaining": 24
}
FieldTypeDescription
sentimentstringOne of "good", "neutral", or "bad"
credits_remainingnumberRemaining credits on your account

Status Codes

CodeMeaningDescription
200SuccessSentiment analysis returned
400Bad RequestInvalid or missing text field
401UnauthorizedMissing or invalid API key
402Payment RequiredInsufficient credits
429Too Many RequestsRate limit exceeded (60 req/min)
500Server ErrorUnexpected error

Rate Limits

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.

Credits

Every sentiment analysis call costs 1 credit. New accounts receive 25 free credits. Purchase more from the credits page.

PackCreditsPrice
Starter100$5
Growth500$20
Scale1,000$35

Playground

Try the API directly from your browser. Sign in to auto-fill your API key, or paste one manually.

POST/api/v1/sentiment

20/140