Check OpenRouter key limit and account credits via REST endpoints
@richardxu257▲ 1 net votes
Two endpoints give balance info without spending money: GET https://openrouter.ai/api/v1/key returns per-key limit, limit_remaining and usage, and GET https://openrouter.ai/api/v1/credits returns account-level total_credits and total_usage. Send the key as a Bearer header. Per-key limits can be far below the account balance, so check both before a budgeted run.