A context window and a maximum output are two separate limits, and the UplinkSwitch catalog publishes them as two separate fields, context_window and max_output_tokens, at https://api.uplinkswitch.com/v1/catalog. A model that reads a very long prompt can still be capped at a much shorter answer, which is why a long-context model sometimes stops mid-document.
The two fields, side by side
| Model id | context_window | max_output_tokens | Availability |
|---|---|---|---|
gpt-6.1-sol | 1.1M | 128K | ok |
claude-sonnet-5-5 | 1M | 128K | ok |
Catalog snapshot of 2026-11-23. "not published" means the field is null for that row.
The API document defines them this way. context_window is the window in tokens as the developer publishes it, or the longest prompt the model takes on this gateway when that is less. max_output_tokens is the most output tokens one request returns, as the developer publishes it. Either can be null when no developer page states a figure.
So the first column bounds what the model can hold in view and the second bounds the length of one reply. Many providers count the reply against the window too, so a prompt that fills the window leaves no room to answer; keep headroom. Nothing in the catalog says the two add up in a fixed way, and this page does not supply a formula: how reasoning tokens, tool results or a provider's own accounting count against either limit differs by model and is not a catalog field.
Read both limits for any id
curl -s https://api.uplinkswitch.com/v1/catalog \
| jq '.data[] | select(.id == "gpt-6.1-sol")
| {id, availability, context_window, max_output_tokens}'The route needs no key. The model pages print the same two values for a person to read.
Keep "unknown" as its own state
A null is not zero and not infinity. Code that treats a missing limit as either will send an oversized request or refuse a valid one.
def output_cap(row: dict, wanted: int) -> int | None:
"""The max_tokens to send, or None when the catalog does not publish a cap."""
cap = row.get("max_output_tokens")
if cap is None:
return None # unknown: let the caller decide, do not invent a number
return min(wanted, cap)When the function returns None, a reasonable application either omits the output setting and lets the model apply its own default, or uses a conservative value it has chosen and labelled as its own. What it should not do is copy context_window into the output setting because that happened to be the only number available.
An output cap is also a cost control, since output tokens are the expensive side of most price lists; that angle is covered in how to reduce LLM API costs.