Skip to content
Get API key

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.

ParameterLimitError code when exceeded
state length16,384 tokens422 state_too_long
questions per request128 questions422 too_many_questions
One question with the state (instructions, options, framing)18,432 tokens422 question_too_long
state tokens × questions64,000 (e.g. a 3,500-token state with 16 questions, or 400 tokens with 128; question and option text count too)422 too_much_work
Options per choice question255 options422 too_many_options
images per request8 still images (PNG, JPEG or WebP as base64 data URLs)422 too_many_images / 422 invalid_image
One image16,000,000 pixels, aspect ratio at most 200:1; resized to 0.07–1.6 MP before the model reads it422 invalid_image
Levels per score question2 to 10 levels422 invalid_schema
HTTP request body size4,000,000 bytes (4 MB), after decompression, base64 images included413 request_too_large
Calibration examples per call200 to 400 examples422 too_few_examples / too_many_examples
Labeled examples per question signature≥ 50 examplesSkipped in report (or 422 too_few_examples_per_question if none qualify)
Engine execution timeout30 seconds503 engine_timeout

mouse-1 reads the whole state and every image once for each question, so the work in a request is (state tokens + image tokens) × questions (plus one more pass per multi-option choice question with order_invariant). You are billed for the state once; the cap keeps any single request from holding the GPU.

After an idle period the model takes a few minutes to start. Requests during that window return 503 engine_timeout with Retry-After; retry and they succeed once it is up.

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 kindRequests per secondRequest burstInput tokens per minute
Standard key (sk_mouse_...)10 RPS20 requests1,000,000 TPM
Console Playground key (1h TTL)5 RPS20 requests1,000,000 TPM

Each account also has a model-work budget of 300,000 tokens per minute, counted as state tokens × questions across all of its keys. Over it, requests return 429 work_rate_limited with Retry-After.

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 token rate—no enterprise markup.

POST /v1/tunings checks every example against the payload limits above, then the job as a whole:

ParameterLimitError code when exceeded
Examples per readout job200 to 5,000422 too_few_examples / too_many_examples
Examples per lora job1,000 to 20,000422 too_few_examples / too_many_examples
Training tokens per lora job (both epochs)8,000,000422 too_much_work
Example tokens per job30,000,000422 too_much_work
Cost per job (fee plus estimated GPU)$250422 too_much_work
Jobs in flight per account1 (queued or running)409 tune_in_progress
Labeled examples per question signature≥ 50 to be fitted and gated on its ownFlagged with warning in the quote; evaluated but not fitted
suffix1 to 24 of [a-z0-9-]422 invalid_schema
Stored decisions per account (unexpired)100,000422 too_many_stored
Stored decision retention30 daysDeleted automatically; 404 decision_not_found after
episodeUp to 128 characters422 invalid_schema

A quote (dry_run: true) runs the same checks and is never billed. Requests to a tuned model count against the same key and account limits as mouse-1.

Every authenticated response includes rate-limit state headers:

HeaderDescriptionExample
x-ratelimit-limit-requestsSustained requests-per-second limit for this key.10
x-ratelimit-remaining-requestsRemaining requests available in the burst bucket right now.19
x-ratelimit-reset-requestsWindow reset interval in seconds (1).1
x-ratelimit-limit-tokensInput tokens-per-minute capacity for this key.1000000
x-ratelimit-remaining-tokensRemaining input tokens available in the 60-second bucket.999926
x-ratelimit-reset-tokensWindow reset interval in seconds (60).60
Retry-AfterIncluded on every 429 and on 503 (engine_timeout) responses. Integer seconds to wait: until enough bucket capacity refills, or 60 for auth_rate_limited.1