Guide
Virouter sits between your application and upstream providers. It validates auth, enforces rate limits, parses the model id, forwards the request, and charges Token quota based on real returned token usage.
Authorization header.model from the JSON body and reject unconfigured ids.Pass an Idempotency-Key header to make a request retry-safe. The gateway records the first body and replays the original response with x-virouter-idempotency-replay: 1 when a retry arrives with the same key and body. Sending the same key with a different body returns 409.
API key is missing, invalid, revoked, or not active.
Insufficient Token quota in the wallet for the requested call.
Idempotency key reused with a different body, or processing in progress.
Rate limit reached. Wait for the reset window before retrying.
Upstream gateway capacity is temporarily unavailable. Retry later.
Never hardcode your Virouter key in frontend code. Store it in environment variables, CI secrets, or a managed secrets provider. Share only masked key prefixes with support.