Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/sagar-grv/ayush-synapse/llms.txt

Use this file to discover all available pages before exploring further.

Rate limiting is handled by Flask-Limiter, keyed by the client’s remote IP address. Limits are applied globally to all endpoints, with stricter per-route overrides on computationally intensive operations.

Default Limits

ScopeLimit
All endpoints (global default)200 requests / day
All endpoints (global default)50 requests / hour
GET /icd11/search/{term}30 requests / minute
POST /translate30 requests / minute
POST /bundle20 requests / minute
Global limits and per-route limits are evaluated independently. A single request to POST /translate counts against the 30/minute route limit and the 200/day / 50/hour global limits simultaneously.

Rate Limit Headers

Flask-Limiter attaches the following headers to every response so clients can track their current standing:
HeaderDescription
X-RateLimit-LimitThe maximum number of requests permitted in the current window
X-RateLimit-RemainingThe number of requests remaining before the limit resets
X-RateLimit-ResetUnix timestamp (UTC) at which the current window resets

When a Limit Is Exceeded

When a client surpasses any limit, the API responds with:
HTTP/1.1 429 Too Many Requests
{
  "error": "Too Many Requests"
}
The response still includes the X-RateLimit-* headers so the client knows when it can retry.

Configuring Limits

Rate limit storage is controlled by the RATELIMIT_STORAGE_URL environment variable.
ValueBehaviour
memory:// (default)Counters are stored in process memory. Limits reset on every server restart. Each worker process maintains independent counters — not suitable for multi-worker deployments.
redis://host:port/dbCounters are stored in Redis and shared across all processes and replicas. Recommended for production.
Set the variable in your .env file or deployment environment:
# Development (default)
RATELIMIT_STORAGE_URL=memory://

# Production — shared Redis instance
RATELIMIT_STORAGE_URL=redis://redis-host:6379/0
During local development and unit testing, the in-memory backend is sufficient and requires no additional infrastructure. Rate limits are rarely hit in a single-developer workflow.For load testing or high-volume integration scenarios — for example, bulk code translation or repeated FHIR Bundle ingestion — configure a Redis backend and coordinate request pacing with your deployment team to avoid unintended 429 responses.

Build docs developers (and LLMs) love