Security & Limits

Rate limits, query guardrails, batch size limits, and HTTP error codes. All limits are enforced per-org based on plan tier.

Rate Limits

Token bucket algorithm, enforced at the API layer before requests hit storage or queues.

Baby MonkeyChimpMandrillSilverback
Requests / sec10251001,000
Burst501255005,000
MonkeyTasks runs / sec51050500
MonkeyBuckets uploads / min10251001,000

Rate limit response

When limits are exceeded, the API returns 429 Too Many Requests with retry headers:

http
HTTP/1.1 429 Too Many Requests
Retry-After: 2
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1708387200
Note: The SDK automatically retries 429 responses with exponential backoff (1s → 2s → 4s, max 3 retries). If retries are exhausted, a MonkeyRateLimitError is thrown.

Query Guardrails

Max limit enforcement

If you request limit: 10000, the API overrides it to limit: 100 and returns a cursor for pagination.

Scan protection

Queries with only a filter and no key are rejected with 400 Bad Request. This prevents accidental full-table scans.

Item size limit

Items exceeding 400 KB are rejected with 413 Payload Too Large.

Batch Size Limits

OperationMax per callSDK behavior
MonkeyDB save()25 itemsAuto-chunks larger batches
MonkeyDB find()100 keysAuto-chunks larger batches
MonkeyTasks run()10 tasksEnforced (no auto-chunking)

Capacity Enforcement

When an org exceeds bundled monthly usage:

PlanBehavior
Baby MonkeyHard stop on request-path usage counters
ChimpSoft limit — starter paid tier with overage billed at period end
MandrillSoft limit — overage billed per feature at period end
SilverbackSoft limit — higher bundled usage and the same per-feature overage model

File Storage Limits

Baby MonkeyChimpMandrillSilverback
Max file size50 MB250 MB500 MB5 GB
Max files / bucket1,00010,000100,000Unlimited
Total file storage500 MB5 GB25 GB500 GB

HTTP Error Codes

CodeMeaningWhen
400Bad RequestScan query without key, malformed payload
401UnauthorizedMissing API key
402Payment RequiredFree tier bundled usage exhausted
403ForbiddenInvalid API key or mk_pub_ used for write
404Not FoundItem, job, or file does not exist
409ConflictDuplicate task ID
413Payload Too LargeItem > 400KB or file > plan max size
429Too Many RequestsRate limit exceeded
500Internal Server ErrorUnexpected failure
503Service UnavailableUnderlying storage throttling (temporary)