Skip to content

Include CLI command for seeing your rate limit #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
simonw opened this issue Mar 10, 2025 · 1 comment
Closed

Include CLI command for seeing your rate limit #24

simonw opened this issue Mar 10, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@simonw
Copy link
Owner

simonw commented Mar 10, 2025

https://openrouter.ai/docs/api-reference/limits

const response = await fetch('https://openrouter.ai/api/v1/auth/key', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer <OPENROUTER_API_KEY>',
  },
});

I'll build this as llm openrouter key-info.

@simonw simonw added the enhancement New feature or request label Mar 10, 2025
@simonw
Copy link
Owner Author

simonw commented Mar 10, 2025

Got this working:

llm openrouter key-info
{
  "label": "sk-or-v1-0fa...240",
  "limit": null,
  "usage": 0.65017511,
  "limit_remaining": null,
  "is_free_tier": false,
  "rate_limit": {
    "requests": 40,
    "interval": "10s"
  }
}

@simonw simonw closed this as completed in 17d55ce Mar 10, 2025
simonw added a commit that referenced this issue Mar 10, 2025
Refs #16, #17, #23, #24, #25, #26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant