OpenRouter Key Usage

Check your OpenRouter API key's usage, remaining credits, and spending limits directly from Yukkai. No configuration required.

What is it?

The OpenRouter Key Usage tool lets you instantly check how much of your OpenRouter API budget you've used. It returns a detailed breakdown of your current spending, remaining credits, and any rate limits applied to your active API key — all without leaving Yukkai.

OpenRouter is the AI model provider that powers many of Yukkai's features (text generation, image generation, etc.). Each API key has an associated credit balance and optional spending limits. This tool gives you full visibility into that usage so you can manage your budget effectively.

How it works

The tool makes a direct call to OpenRouter's API using your active API key (the one stored securely in Yukkai's vault). It retrieves raw JSON data containing:

  • Total usage — how much credit you've spent so far in the current period
  • Remaining credits — how much budget is left
  • Spending limits — any caps you've configured on the OpenRouter dashboard
  • Usage periods — breakdowns by time window
No parameters are needed. The tool automatically uses whichever OpenRouter key is currently active in your vault.

How to use it

Simply ask Yukkai something like:

  • "Check my OpenRouter usage"
  • "How much credit do I have left on OpenRouter?"
  • "Show me my API spending"
Yukkai will call the tool and present the results in a readable format.

Examples

Basic usage check

Ask Yukkai:

Check my OpenRouter key usage.

Yukkai will respond with something like:

Usage: $12.45 / $50.00
Remaining: $37.55
Period: 2024-06-01 to 2024-06-30

Understanding the raw output

Behind the scenes, the tool returns a JSON object similar to:

{
  "usage": 12.45,
  "limit": 50.00,
  "remaining": 37.55,
  "period": {
    "start": "2024-06-01",
    "end": "2024-06-30"
  }
}

The exact fields may vary depending on your OpenRouter account settings and whether you've configured spending limits.

Tips & best practices

  • Monitor regularly — if you use AI generation features heavily, checking your usage periodically helps avoid unexpected interruptions.
  • Set spending limits — you can configure spending caps directly on the OpenRouter dashboard. Once set, this tool will show them so you always know your ceiling.
  • Multiple keys — if you have more than one OpenRouter key stored, the tool uses whichever key is currently marked as active in your vault. Switch keys there before calling this tool to check a different account.
  • Raw JSON — this tool returns raw, unformatted JSON. If you prefer a more polished summary, you can also use the Yukkai Cloud tool with the openrouter_key_usage action, which goes through Yukkai's cloud backend and may format the response more cleanly.
  • Troubleshooting — if the tool returns an error, it usually means the active API key is invalid, expired, or has no remaining credits. Verify your key in the vault or on the OpenRouter dashboard.
  • Credits vs. tokens — this tool reports credit spending in dollar amounts, not token counts. For token-level details, check the OpenRouter dashboard's model-specific usage logs.