Rate limits
Every standard API key receives the same published payload and throughput limits. Nothing is silently truncated: any request exceeding a payload limit is refused before GPU execution with 422 Unprocessable Entity (or 413 Content Too Large) and is never billed.
Request and payload limits
Section titled “Request and payload limits”| Parameter | Limit | Error code when exceeded |
|---|---|---|
state length | 65,536 tokens | 422 state_too_long |
questions per request | 128 questions | 422 too_many_questions |
Options per choice question | 1,024 options | 422 too_many_options |
Levels per score question | 2 to 10 levels | 422 invalid_schema |
| HTTP request body size | 4,000,000 bytes (4 MB) | 413 request_too_large |
Calibration examples per call | 200 to 5,000 examples | 422 too_few_examples / too_many_examples |
| Labeled examples per question signature | ≥ 50 examples | Skipped in report (or 422 too_few_examples_per_question if none qualify) |
| Engine execution timeout | 10.0 seconds | 503 engine_timeout |
Throughput rate limits
Section titled “Throughput rate limits”Throughput is enforced per API key using two shared Redis token buckets: a requests-per-second (RPS) bucket with a 2× burst capacity, and an input-tokens-per-minute (TPM) bucket.
| Key kind | Requests per second | Request burst | Input tokens per minute |
|---|---|---|---|
Standard key (sk_mouse_...) | 200 RPS | 400 requests | 20,000,000 TPM |
| Console Playground key (1h TTL) | 5 RPS | 5 requests | 20,000,000 TPM |
Need higher sustained RPS or TPM for a batch workload or gateway integration? Contact sales@mouse.dev with your key prefix (sk_mouse_xxxx…) to provision reserved RPS/TPM capacity on a committed-throughput purchase order at the same $0.10 / 1M input and $0.02 / 1M cached token rate—no enterprise markup.
Rate limit headers
Section titled “Rate limit headers”Every authenticated response includes rate-limit state headers:
| Header | Description | Example |
|---|---|---|
x-ratelimit-limit-requests | Sustained requests-per-second limit for this key. | 200 |
x-ratelimit-remaining-requests | Remaining requests available in the burst bucket right now. | 399 |
x-ratelimit-reset-requests | Window reset interval in seconds (1). | 1 |
x-ratelimit-limit-tokens | Input tokens-per-minute capacity for this key. | 20000000 |
x-ratelimit-remaining-tokens | Remaining input tokens available in the 60-second bucket. | 19999926 |
x-ratelimit-reset-tokens | Window reset interval in seconds (60). | 60 |
Retry-After | Included on 429 (rate_limited, token_rate_limited) and 503 (engine_timeout) responses. Integer seconds until enough bucket capacity refills. | 1 |