API reference
List models
GET /v1/models returns the IDs you can send in model, in the OpenAI list format, with the fields OpenRouter adds: name, context, input types, parameters and price. client.models.list() in the OpenAI SDKs works as is. It needs your key, like every endpoint, and lists only the models that key can use.
curl https://api.libremodel.ai/v1/models \
-H "Authorization: Bearer $LIBREMODEL_API_KEY"import os
from openai import OpenAI
client = OpenAI(base_url="https://api.libremodel.ai/v1", api_key=os.environ["LIBREMODEL_API_KEY"])
for model in client.models.list():
pricing = model.model_extra.get("pricing", {})
print(model.id, pricing.get("prompt"), pricing.get("completion")){
"object": "list",
"data": [
{
"id": "kimi-k3.1-pro-uncensored",
"object": "model",
"created": 0,
"name": "Kimi K3.1 Pro Uncensored",
"architecture": { "input_modalities": ["text","image"], "output_modalities": ["text"] },
"supported_parameters": ["max_tokens","temperature","top_p","stop","tools","reasoning","reasoning_effort"],
"pricing": {
"prompt": "0.000003",
"completion": "0.000009",
"input_cache_read": "0.0000003",
"request": "0",
"image": "0.0001",
"web_search": "0",
"internal_reasoning": "0"
}
}
]
}Fields
| Field | Description |
|---|---|
id | The value to send in model. |
object | Always "model". |
created | Always 0. |
name | The name of the model. |
context_length | Context window, in tokens. |
architecture | input_modalities (text, image) and output_modalities (text). |
supported_parameters | The request parameters the model takes, such as tools or reasoning. |
pricing | Dollars per token, as text: prompt (input), completion (output, reasoning included) and input_cache_read (cached input). image is the price of each image in the request. request and internal_reasoning are "0". web_search is the price of each web search in dollars, apart from the tokens, and "0" on Uncensored models, which don't have it. |
top_provider | context_length, and max_completion_tokens when there is an output limit. |
They are «from» prices: the cheapest way to serve the model, the same as on Models. What each request actually cost comes in its response, in usage.cost.