Skip to content

Credits and limits

Each charged operation costs one credit. BiomAI, BiomAI-BYOK, BiomJSON and Retrieve have independent rolling 24-hour buckets. Public callers use IP identity; authenticated callers use their configured user quotas.

Operation When charged
BiomAI PDF/image Before extraction, including failures and timeouts
BiomAI BYOK Before extraction in its separate daily bucket
BiomJSON After successful local validation
Retrieve Before PIN validation/decryption, including unsuccessful attempts

Provider retries are part of one extraction and consume no extra BiomAPI credits. Providers may bill multiple HTTP/provider attempts. Assigned OpenRouter funding does not consume shared global capacity; server-default extraction also reserves applicable global/public-global daily limits. Check your allowances with GET /api/v1/biom/usage; its used, limit, and resets_in_seconds fields remain.

Server-default BiomAI uses a bounded waiting queue for shared extraction capacity. By default, at most three reports can wait for an attempt start, including reports being preprocessed. Within that shared bound, each caller can use available start tokens and HTTP slots plus one blocked report. When capacity is occupied or a provider cooldown applies, each caller can hold only one blocked report. Public callers use IP identity; authenticated callers use their actual BiomAPI key. Shared hospital IPs therefore share the caller allowance; keys sharing a user ID have separate places but shared daily credits.

Waiting callers take turns when their reports are ready. An idle caller can keep using spare capacity within the shared provider budget; there is no fixed caller RPM ceiling. Browser batch concurrency is separate and does not multiply server capacity. JSON, BYOK and assigned OpenRouter credentials are exempt from this admission limit, but the same effective provider key still shares start tokens, concurrent slots and cooldowns.

BiomAPI reserves a queue place before it charges a daily credit or prepares the file. A full queue or an existing blocked report from that caller once spare capacity is occupied produces an uncharged rejection. If the daily quota is exhausted, BiomAPI releases the place. The place is released when the attempt starts, or when the request fails or is cancelled. Charged retries wait to rejoin the bounded queue and consume the same provider capacity.

{"error": {"code": "biomai_queue_full", "message": "Processing is busy. Try again in 5 seconds."}}

HTTP 429 includes integer Retry-After, based on the next token opportunity and current provider cooldown. It is a suggested retry delay, not a reserved start or a guarantee of availability. The web batch uploader keeps the file pending and waits; JSON remains eligible, and the user can cancel. API callers control resubmission. Daily quota and upstream provider failures have different codes and do not trigger browser resubmission.

Opted-in authenticated keys first reserve a place in a separate Vertex queue, then one caller biomai credit. Vertex capacity is shared by project, location, and model, with the same default queue, start-rate, and concurrency limits. Vertex successes do not consume the OpenRouter global allowance.

One Vertex HTTP attempt has 8 seconds to first nonempty answer text, excluding preprocessing and scheduling. After output starts, the full attempt limit applies. Timeouts, connection interruptions, and HTTP 408/429/500/502/503/504 can transition to OpenRouter. Invalid credentials, permanent errors, refusals, invalid completed output, cancellation, and an exhausted workflow deadline do not.

At fallback, BiomAPI reserves OpenRouter queue capacity and then its global daily allowance. The caller is never charged twice. Fallback and any OpenRouter retry share the original workflow deadline; the full report is resent using the same prepared media. Closing the local Vertex stream does not guarantee that upstream processing or billing stops.

Fallback rejection HTTP status Caller credit
biomai_fallback_unavailable 503 Already consumed
biomai_fallback_quota_exceeded 429 Already consumed

These are final outcomes, distinct from uncharged biomai_queue_full. The CLI and web batch uploader do not automatically resubmit them.

Processing capacity is shared by requests using the same OpenRouter key. Default limits allow 12 attempt starts per minute, two immediate starts after idle, and three HTTP attempts in flight. Tokens refill continuously; unused capacity is capped at two. Requests can start close together when tokens and a slot are available. Retries and health probes use the same budget. These controls protect the interactive experience. They are not a claim about OpenRouter’s paid-model RPM limit.

Separate keys can still share upstream provider capacity. Defaults allow one additional HTTP attempt, 60 seconds per attempt and 140 seconds for the workflow. Queueing consumes that deadline.

Do not automatically resubmit processing after ambiguous network errors, timeouts, 503s or provider failures; another POST can consume another credit.