EN ▾
Get API key

OpenRouter Model List API: Using GET /v1/models

An OpenRouter model list API call is a plain GET request that returns the models you can use, and the OpenAI-compatible format makes the same call work against other endpoints too. Here is how to run it against this API, what comes back, and how it differs from an aggregator's long catalog.

Last updated

Wall of many drawers versus one glowing drawer, showing an aggregator model list next to a single-model list

Summary

  • Call GET /v1/models with a Bearer key to list available models.
  • This API serves one model, so the list holds one entry: uncensored.
  • Aggregators return a large, changing list; a single-model API does not.
  • Hard-code the model id in production instead of reading it at runtime.

The request

The OpenAI-style model list is a GET request to /v1/models. Send your key in the Authorization header. Against this API:

curl https://api.openrouterabliteratedmodels.com/v1/models \
  -H "Authorization: Bearer YOUR_KEY"

# the list contains one model: uncensored

The response is a JSON object in the OpenAI list shape: a data array where each item carries an id. Here the array holds the one model you can call, with the id uncensored. That id goes into the model field of every chat request.

Other endpoints on the same base URL are POST /v1/chat/completions and POST /v1/responses. The docs list the parameters of each.

Listing models from code

Python

from openai import OpenAI

client = OpenAI(
    base_url="https://api.openrouterabliteratedmodels.com/v1",
    api_key="YOUR_KEY",
)

for m in client.models.list():
    print(m.id)  # uncensored

Node

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.openrouterabliteratedmodels.com/v1",
  apiKey: process.env.UNC_KEY,
});

const page = await client.models.list();
for (const m of page.data) console.log(m.id); // uncensored

Both print uncensored. Because the SDKs handle the response shape, you do not parse JSON by hand. If you do want raw JSON, pipe the curl output through jq '.data[].id'.

Aggregator list versus single-model list

When people search for a model list API they often mean the catalog endpoint of an aggregator, which exposes a long, changing set of models from many providers, each with its own metadata such as pricing and context length. Fields and contents there are set by the aggregator, so read their current API reference before you code against them.

Aggregator catalogThis API
Entries returnedMany, changes over timeOne
Need to choose a model?Yes, by idNo, always uncensored
Same model across requests?Depends on routingYes
Typical use of the listBuild a model picker, filter by priceConnection test, client dropdown

This is not an aggregator and does not route across vendors. It runs one open-weight model, hosted by an independent provider and tuned to answer without content refusals for lawful adult use. The OpenRouter API troubleshooting guide on this site covers the aggregator side if you are comparing the two.

Using the list in common clients

Many chat front ends call the model list when you add a connection, then show a dropdown. Typical steps:

  1. Add a new connection of the "OpenAI" or "custom OpenAI-compatible" type. Open WebUI and SillyTavern both offer this.
  2. Enter the base URL https://api.openrouterabliteratedmodels.com/v1 and your key.
  3. Press the verify or refresh button. The client calls GET /v1/models and fills the dropdown.
  4. Select uncensored.

If verification fails, test the same call with curl to see which half is broken. A 200 in curl but a failure in the client points at the client's settings, such as a pasted trailing path. A 401 or 403 in both points at the key.

Sorting and filtering

On an aggregator you filter the catalog by price, context length or provider. Here there is nothing to filter, and that is the point: the choice was made when you decided to use a single-model service. Price ($0.15 per 1M input tokens and $0.50 per 1M output tokens) and context (100,000 tokens) are the same for every call.

What the list call is good for

  1. A connection test. If GET /v1/models returns your model, the URL, the /v1 path and your key are all correct. A 401 or 403 points at the key; a 404 points at the URL.
  2. Filling a client dropdown. Chat front ends often call the list endpoint to show you choices. With one model, you see one choice. Pick it and move on.
  3. A health probe. A scheduled call from your monitoring tells you when the endpoint stops answering, without spending completion tokens.

Do not make your application depend on the list at runtime. Since the model id does not change between requests, put uncensored in your config and keep the list call for diagnostics. If a client refuses to start without a model in its dropdown, type the id in by hand where the client allows it.

Checking balance in the same session

Alongside the model list you can check what is left of your credit. Use GET /v1/dashboard/billing/credit_grants for the OpenAI-style format or GET /v1/balance. Every response also carries the X-Balance-USD header, so you can log it without an extra call.

curl https://api.openrouterabliteratedmodels.com/v1/balance \
  -H "Authorization: Bearer YOUR_KEY"

# or read the header from any response (model: uncensored)
curl -s -D - -o /dev/null https://api.openrouterabliteratedmodels.com/v1/models \
  -H "Authorization: Bearer YOUR_KEY" | grep -i x-balance-usd

Other headers you will see are X-Request-Id, which helps when you contact support, and X-RateLimit-Limit-Requests and X-RateLimit-Limit-Concurrency. A full key is limited to 8 concurrent requests and 300 per minute; a trial key to 2 and 60. Pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens, set out on the pricing page.

Errors on the list call

The list endpoint fails in the same few ways as every other call, which is handy for diagnosis:

  • 401 or 403. The key is missing, mistyped or was regenerated. On the key page you can regenerate it yourself, and the old key stops working at once.
  • 404. The URL is wrong. The path must be /v1/models under the host; a base URL with an extra segment will miss it.
  • 429. You hit a limit: rate_limited for requests per minute, concurrency for simultaneous requests. A health probe that runs every second would eat into the 60 requests per minute of a trial key, so poll every 30 to 60 seconds instead.

Failed or refused requests are not charged. Keep the X-Request-Id header of a failing call; it is the quickest way to point support at the exact request.

Getting a key to try it

Sign up on the API key page with Google or with email and password. After sign-up, one click claims $0.50 of trial credit, valid for 7 days, one per person, with no payment needed. That is plenty for a handful of list calls and a few hundred chat requests. Top-ups later start at $20 and are paid in crypto.

If the key later stops working, you can regenerate it yourself on the same page. The old key stops working at once, so update your environment variable as soon as you do.

Common questions

What does GET /v1/models return here?

A list in the OpenAI format with a single entry, uncensored. That is the model ID you send in chat requests.

Can I list models without a key?

Plan on sending your Bearer key with this call, as with every other endpoint on this API.

Why is the list so short compared with an aggregator?

The API serves one open-weight model rather than routing across many vendors, so there is only one model to list.

Does calling the list endpoint use credit?

Listing models does not generate tokens. Token billing applies to completions at $0.15 and $0.50 per 1M tokens.

Get your API key

Sign up, copy your key, update the base URL. Simple integration.

Begin with trial balance

Enter email and password; key displays immediately.