Skip to main content

Overview

Scira implements rate limiting to ensure fair usage and system stability. Rate limits vary based on authentication status and subscription tier.

Rate Limit Tiers

Unauthenticated Users

Limits:
  • 3 searches per 7 days
  • Basic models only
  • No access to premium features
Rate Limiting Method: Unauthenticated users are rate-limited by IP address using Upstash Redis:
Identifier Extraction: The system uses the following header priority to identify clients:
  1. x-forwarded-for (first IP if multiple)
  2. x-real-ip
  3. Falls back to "unknown" if neither present

Authenticated Users (Free)

Limits:
  • 100 searches per day
  • Access to most models
  • Limited extreme search usage
  • No access to code interpreter
  • No access to memory features
Rate Limiting Method: Authenticated users are tracked by user ID with daily reset:
Bypass Conditions: Certain models bypass rate limits for free users:

Pro Users

Limits:
  • Unlimited searches
  • Unlimited extreme search
  • All premium models
  • No rate limits
  • Priority processing
Subscription Validation: Pro status is determined by active subscription through either Polar or Dodo Payments:

Rate Limit Headers

Scira does not currently expose rate limit information in response headers, but this may be added in future versions. Potential headers (not yet implemented):

Rate Limit Implementation

Upstash Rate Limiting

Scira uses Upstash Rate Limiting with Redis for distributed rate limiting: Features:
  • Sliding window algorithm
  • Sub-millisecond latency
  • Distributed across edge locations
  • Analytics support
  • Custom prefixes for different limit types
Configuration:
Usage Check:

Authentication Rate Limiting

The authentication system itself also has rate limiting:
This prevents authentication abuse (100 auth requests per minute).

Extreme Search Quotas

Extreme Search has separate usage tracking: Free Users:
  • Limited extreme search calls
  • Tracked separately from regular searches
  • Counter increments per extreme_search tool use
Pro Users:
  • Unlimited extreme search
  • Usage still tracked for analytics
Implementation:

Handling Rate Limit Errors

Error Response Format

JavaScript Example

Python Example

Best Practices

When you hit rate limits, implement exponential backoff:
Reduce API calls by caching search results:
  • Cache common queries
  • Use time-based cache invalidation
  • Store responses in localStorage or IndexedDB
  • Share cache across tabs/sessions when appropriate
Track your API usage to avoid hitting limits:
  • Count requests client-side
  • Display usage to users
  • Warn before approaching limits
  • Prompt for upgrade when limit reached
Instead of multiple individual searches:
  • Combine related queries
  • Use conversation context effectively
  • Leverage multi-turn conversations
Provide good UX when rate limits are hit:
  • Show clear error messages
  • Display time until reset
  • Offer upgrade options
  • Allow users to queue requests
For the best experience:
  • Encourage users to sign in
  • Highlight benefits of authentication (100 vs 3 searches)
  • Make signup/signin easy
  • Consider SSO options

Quota Management

Daily Reset

Authenticated user quotas reset daily at midnight UTC:

Usage Tracking

Usage is tracked in the database: Message Usage:
Extreme Search Usage:

Bypass Mechanisms

Certain conditions bypass rate limits:
  1. Pro Subscription: All limits bypassed
  2. Specific Models: Some low-cost models bypass free tier limits
  3. Internal Tools: System-generated requests may bypass limits

Upgrade Path

When users hit rate limits: Unauthenticated → Authenticated:
  • From 3/7 days to 100/day (33x increase)
  • Sign up with email, GitHub, Google, Twitter, or Microsoft
Authenticated → Pro:
  • From 100/day to unlimited
  • Access to premium models
  • Extreme search unlimited
  • Code interpreter
  • Memory features
  • Lookout (scheduled searches)
  • Priority support

Monitoring and Analytics

Upstash Rate Limit includes analytics:
  • Request patterns
  • Limit hit frequency
  • Geographic distribution
  • User behavior insights
This data helps optimize limits and improve service quality.

Next Steps

Authentication

Learn how to authenticate for higher limits

Search API

Start making search requests