OpenRouter migration
BiomAI now uses OpenRouter for PDF and image extraction. Gemini remains the underlying model. JSON, clinical data, exports, public metadata and BiomPIN contracts are unchanged.
Client changes
Section titled “Client changes”-
Replace
X-Gemini-API-KeywithX-OpenRouter-API-Keyand provide an OpenRouter key. Processing explicitly rejects the retired header to stop unintended shared funding. -
Remove
service_tierand CLI--service-tier. Every extraction costs one whole credit. During a grace period, the API accepts and ignoresservice_tier, regardless of its value. Responses include anX-BiomAPI-Warningheader explaining that the parameter is deprecated, has no effect, and will cause requests to be rejected in a future release. Remove it now; no rejection date has been set. The header is not exposed through CORS, so cross-origin browser JavaScript cannot read it. -
CLI BYOK uses
--openrouter-keyandOPENROUTER_API_KEY. Stored Google keys are not reused. Browser legacy BYOK values are invalidated. -
Handle
biomai_queue_fullseparately from daily quota or provider failure. It is an uncharged admission rejection withRetry-After. The web batch uploader waits automatically. API clients should choose their own admission resubmission policy. -
Do not automatically repeat processing after ambiguous 503/network/timeout outcomes. Another POST can incur another extraction and charge.
-
Read
/usagekey status fromkeys.openrouter;keys.geminiwas removed. Validation outages returnvalid: nullandvalidation_error(timeoutorunavailable), while confirmed invalid keys returnvalid: false. -
Read the configured model from
openrouter_modelin/statusand/health;gemini_llmwas removed./healthusesopenrouter_api_connectedinstead ofgemini_api_connectedfor its cached inference check.
Saved historical model provenance remains valid.
Selected BiomAPI keys can temporarily retain assigned direct Vertex access through
the operator’s vertex_first policy, with transient fallback to server-default
OpenRouter. This does not restore Google BYOK headers or the previous tier/recovery
settings. See authentication.
