Rate Limits, Credits & Atomic Billing
Understand request concurrency limits, HTTP 429 backoff strategies, and our atomic pre-authorization credit lock architecture.
Direct System Definition: Rate Limits & Credits
RSFlowHub operates on a high-throughput, Pay-As-You-Go (PAYG) credit model with no restrictive subscription lock-in. Default accounts are allocated 60 requests per minute per endpoint key. Billing is governed by atomic pre-authorization locks: the gateway verifies base credits before invoking AI models, ensuring zero charges if a request fails parameter validation (422) or malformed syntax (400).
Rate Limits & Concurrency Thresholds
To keep the platform fair for all users, rate limits are enforced per minute: a plan-wide limit across all endpoints plus a per-endpoint limit. When a limit is reached the API returns HTTP 429 with a retry_after_seconds value.
| Account Tier | Standard Rate Limit | Burst Concurrency | Over-Limit Behavior |
|---|---|---|---|
| Developer / Standard | 60 requests / minute (per endpoint) | 10 concurrent requests | Returns HTTP 429 rate_limit_exceeded |
| High-Volume / Enterprise | Custom (e.g., 500 to 2,000+ RPM) | Dedicated worker pool | Custom SLA + Priority Queue |
Handling 429 Responses with Exponential Backoff & Jitter
When rate limits are exceeded, RSFlowHub returns an HTTP 429 status with a Retry-After response header indicating the mandatory wait time in seconds. In high-throughput distributed architectures, retries must include randomized jitter to prevent the "thundering herd" problem:
import time
import random
import requests
def call_rsflowhub_with_retry(url, headers, payload, max_retries=4, base_delay=1.0, max_delay=16.0):
for attempt in range(max_retries):
response = requests.post(url, headers=headers, json=payload, timeout=5.0)
if response.status_code != 429:
return response
# Inspect Retry-After header or calculate exponential backoff with full jitter
retry_after = response.headers.get("Retry-After")
if retry_after and retry_after.isdigit():
sleep_duration = float(retry_after)
else:
# Full jitter formula: random.uniform(0, min(max_delay, base_delay * 2 ** attempt))
sleep_duration = random.uniform(0, min(max_delay, base_delay * (2 ** attempt)))
time.sleep(sleep_duration)
raise Exception("Max retries exceeded for RSFlowHub API")
Atomic Credit Pre-Authorization & Billing Flow
RSFlowHub uses an atomic 3-Phase Pre-Authorization Lock lifecycle to guarantee that developers are charged only for valid computations down to the exact token count:
1. Pre-Flight Lock
Before model invocation, the gateway checks that your wallet contains at least the base_credits for that endpoint. If balance < base, an immediate 402 insufficient_credits is returned.
2. Model Processing
The specialized neural network or LLM processes the input payload. If schema validation fails (422) or upstream connection drops (500), the pre-auth lock is released with zero deductions.
3. Atomic Deduction
Upon generation completion, the total charge is calculated (Base Credit + Character Processing Credit) and settled via an atomic decrement. Your live balance updates in real-time.
4. No Charge for Failures
Credits are reserved before the AI call and settled only when it succeeds. If the provider fails or the request errors, the reservation is released and nothing is charged.
Freemium Utility API Quotas (Per Plan)
Selected utility endpoints (e.g. Sentiment Analysis, PII Redaction, Spam Detection, Intent Detection) are available completely free without deducting credits from your balance, up to a monthly global quota determined by your active plan:
| Subscription Plan | Global Freemium Limit (per month) |
|---|---|
| Free | 1,000 requests across all free endpoints |
| Starter | 2,000 requests across all free endpoints |
| Growth | 5,000 requests across all free endpoints |
| Pro | 10,000 requests across all free endpoints |
Your plan's freemium utility quota is shared across all endpoints marked as "Freemium" in our documentation. Free calls cover inputs up to 2,000 characters; larger inputs are billed in credits. Once the limit is reached, standard credit rates apply. The quota resets on the 1st of every calendar month (UTC).
Processing Cost Calculation
Because heavier natural language processing requires increased compute power, an incremental Processing Cost is added based on input character volume:
| Input Character Length | Processing Tier | Additional Credits Charged |
|---|---|---|
| Up to 500 characters | Small | +1 Credit |
| 501 to 2,000 characters | Medium | +2 Credits |
| 2,001 to 5,000 characters | Large | +4 Credits |
| 5,001+ characters | Extra Large | +4 Credits plus +1 Credit per 1,000 additional characters |
If you invoke an endpoint with a Base Credit of 2 and send a prompt of 1,400 characters (Medium tier):
Total Deducted = Base (2) + Processing (2) = 4 Credits.
Endpoint Base Credits Reference
| Category | API Endpoint | Base Credits (Pre-Flight) |
|---|---|---|
| Text & Language | /api/v1/ai/intent-detection |
1 Credit |
| Text & Language | /api/v1/ai/translation |
1 Credit |
| Conversational AI | /api/v1/ai/chat |
1 Credit |
/api/v1/ai/email-reply |
2 Credits | |
| Content Generation | /api/v1/ai/content-generation |
2 Credits |
| Image & Vision | /api/v1/ai/image-generation |
5 Credits |
| Account & Usage | /api/v1/account/usage |
0 Credit |
| Account & Usage | /api/v1/account/usage-summary |
0 Credit |
| Account & Usage | /api/v1/account/api-key/current |
0 Credit |
| Data & Extraction | /api/v1/ai/json-extractor |
2 Credits |
/api/v1/ai/email-analyze |
2 Credits | |
/api/v1/ai/email-workflow |
2 Credits | |
| Text & Language | /api/v1/ai/sentiment-analysis |
1 Credit |
| Safety & Moderation | /api/v1/ai/spam-detection |
2 Credits |
| Text & Language | /api/v1/ai/text-summarize |
1 Credit |
| Text & Language | /api/v1/ai/grammar-fix |
1 Credit |
| Safety & Moderation | /api/v1/ai/pii-redaction |
1 Credit |
| FAQ & Knowledge Base | /api/v1/ai/faq-collections |
0 Credit |
| FAQ & Knowledge Base | /api/v1/ai/faq-match |
2 Credits |
| Reviews | /api/v1/ai/review-analyze |
3 Credits |
| Reviews | /api/v1/ai/review-summary |
3 Credits |
| Reviews | /api/v1/ai/review-reply |
2 Credits |
| Reviews | /api/v1/ai/review-insights |
4 Credits |
| Social & Comments | /api/v1/ai/comment-analyze |
2 Credits |
| Social & Comments | /api/v1/ai/comment-reply |
2 Credits |
| Social & Comments | /api/v1/ai/comment-moderate |
3 Credits |
| Customer Support | /api/v1/ai/ticket-analyze |
3 Credits |
| Customer Support | /api/v1/ai/ticket-reply |
2 Credits |
| Customer Support | /api/v1/ai/ticket-workflow |
3 Credits |
| Data & Extraction | /api/v1/ai/search-query-parse |
3 Credits |
| Conversational AI | /api/v1/knowledge-bases |
1 Credit |
| Conversational AI | /api/v1/chatbots |
4 Credits |