Models API
/ API docs← API quickstartView as Markdown
GET https://api.opencheese.dev/v1/models lists the models your API key can use right now, in
the OpenAI list shape. What it contains depends on your plan, the key's model restrictions and
the models you switched off on the Prices page, so read it instead of copying model IDs
from examples.
Request
curl https://api.opencheese.dev/v1/models \
-H "Authorization: Bearer $OPENCHEESE_API_KEY"
x-api-key works too. An invalid key answers 401 with a JSON error.
Response
A text model (the values are examples):
{
"object": "list",
"data": [
{
"id": "MODEL_ID",
"object": "model",
"created": 0,
"owned_by": "opencheese",
"displayName": "Example Model",
"name": "Example Model",
"capabilities": { "streaming": true, "tools": true },
"pricing": { "inputRate": 0.5, "outputRate": 2, "cacheReadRate": 0.05, "cacheWriteRate": 0.6, "cacheWrite1hRate": 0 },
"modalities": { "input": ["text", "image"], "output": ["text"] },
"reasoning": true,
"reasoningEfforts": { "max": "max", "medium": "medium", "low": "low" },
"supported_reasoning_levels": ["max", "medium", "low"],
"efforts": ["max", "medium", "low"],
"default_reasoning_level": "max",
"context_window": 1000000,
"contextWindow": 1000000,
"max_output_tokens": 131000,
"maxTokens": 131000,
"maxOutputTokens": 131000
}
]
}
Fields
| Field | Meaning |
|---|---|
id |
The ID to send as model. |
displayName, name |
The model's name as the dashboard shows it. |
capabilities |
Whether the model streams and calls tools. |
pricing |
Your rates in credits (USD) per million tokens: input, output, cached input read, cache write and the longer-lived cache write. Free models show zeros, and so do models priced per image. |
pricing.cacheWrite1hRate |
The longer-lived cache write: on Claude models the one-hour cache a request asks for with "cache_control": { "type": "ephemeral", "ttl": "1h" }, on GPT models the twelve-hour cache. cacheWriteRate is the default write (five minutes on Claude, 30 minutes on GPT). 0 means the model has no price of its own, and those writes cost cacheWriteRate. |
cacheWriteTtls |
The cache lifetimes the two write rates are for, shortest first: ["5m", "1h"] on Claude models, ["30m", "12h"] on GPT models. Left out where the model's price names none. |
imagePricing |
Only for a model priced per image: your price in credits (USD) for one image (perImage) and for each source image an edit sends (perSourceImage), per output resolution (resolution), and per quality where the quality changes the price. |
modalities |
What the model reads (input) and produces (output): text, image, video, audio, pdf. |
supported_reasoning_levels |
The effort levels you may send, strongest first. efforts and the keys of reasoningEfforts repeat them for clients that read those names. |
default_reasoning_level |
The first, strongest level of that list. |
context_window |
The most tokens the model reads in one request, prompt included. contextWindow is the same number. |
max_output_tokens |
The longest answer the model writes. maxTokens and maxOutputTokens are the same number. |
A field is left out when it does not apply: a model with no selectable effort has no level
fields, and a model without a known limit has no limit fields. Send the effort only with a
level from supported_reasoning_levels; Chat Completions,
Responses and Messages show where it goes.
Image models
Models whose modalities.output is ["image"] generate pictures. They carry only the basic
fields above; their parameters (sizes, aspect ratios, quality, how many images a request may
return) come from GET /v1/images/capabilities, described in the
Image API.
A model priced per image also carries imagePricing (the values are examples):
{
"imagePricing": [
{ "resolution": "1K", "perImage": 0.04, "perSourceImage": 0.003 },
{ "resolution": "2K", "perImage": 0.08, "perSourceImage": 0.003 }
]
}
An image costs the price of the resolution it is delivered at: 768, 1K, 1.5K, 2K or 4K.
A resolution without its own entry costs the price of the nearest one below it, or of the lowest
entry when it is below all of them. A model priced by the token has no imagePricing: its
pricing rates are its price.
Filter the list
All text models with jq:
curl -s https://api.opencheese.dev/v1/models \
-H "Authorization: Bearer $OPENCHEESE_API_KEY" \
| jq -r '.data[] | select(.modalities.output | index("text")) | .id'
Free models:
curl -s https://api.opencheese.dev/v1/models \
-H "Authorization: Bearer $OPENCHEESE_API_KEY" \
| jq -r '.data[] | select(.pricing.inputRate == 0 and .pricing.outputRate == 0 and .imagePricing == null) | .id'
Free models still need a small minimum balance on your account; see the FAQ.
With an SDK
from openai import OpenAI
client = OpenAI(base_url="https://api.opencheese.dev/v1", api_key="YOUR_OPENCHEESE_API_KEY")
for model in client.models.list():
print(model.id)
There is no GET /v1/models/{id}: read the model from the list.