Jump to content

Query OpenRouter Credit / Available Models


Recommended Posts

Query OpenRouter Credit / Available Models

Download Here

 

Query your credit usage, models available and their prices on OpenRouter, right in Alfred

image.thumb.png.f6f271aa4cb21bc37687895c3bb2e3d5.png

List available models, with their prices, context length:

image.thumb.png.20ff5cc16630587e18fc23e839d9cfba.png

Normally you will have to go to the API Keys page and Docs page to view these info:

image.thumb.png.d3f8af4662741b971bdb1aaedc9ef5df.pngimage.thumb.png.3307dd3e01ff0554fba9e642d235b1bd.png

 

Setup

Download the workflow from the Release page. Double click to install it in Alfred. 

 

You can skip this Setup if you just want to use the ‘List available models’ feature.

 

Fill the OpenRouter API Keys field with the keys and names of them you want to query. Seperate each name and key with :, seperate keys with ;. Like this: 

Key Name 1:Your Key 1;Key Name 2:Your Key 2
 

Click ‘Install’ or ‘Save’. 

Usage

Query API credit usage

Invoke the aiusageopenrouter keyword (configurable behind the ‘Configure workflow…’ button with the ‘Keyword for Querying Usage’ field), wait a few seconds and you should see your Credit usage by API key.

image.thumb.png.ef8038bcada1d8815a7040403f06a9e9.png

List / search available models

Search for available models hosted by OpenRouter by invoking the listopenrouter keyword (configurable behind the ‘Configure workflow…’ button with the ‘Keyword for Listing Models’ field) and type the keyword.

image.thumb.png.b4b31f433604addef261b44b6d937805.png

Or leave empty for all models:

image.thumb.png.49316cdabc9f2ec94ce3c9b7dc025e87.png

Press return to copy model name. 

image.png.1a0867ea0dca4a55f447584e58a7955e.png

Requirements and dependencies

This workflows requires Python 3 and the requests package (included in workflow) to work.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...