Models
List models for Codex
The models your key can use, in the format Codex reads for its /model picker: name, reasoning levels and context of each one. Save it as ~/.codex/libremodel-models.json, point model_catalog_json in ~/.codex/config.toml to it, and every model shows up in Codex. Step by step: Codex.
/ v1 / codex / modelsAuthorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is your API key.
Response
The models, in the order of /model.
modelsobject[]requiredOne object per model.
Show child attributesHide child attributes
slugstringrequiredThe model ID: the value of
modelinconfig.toml.Example:
"deepseek-v4.1-flash-1017"display_namestringrequiredThe name
/modelshows.supported_reasoning_levelsobject[]requiredThe effort levels you can pick, each with
effortanddescription. Empty if the model does not reason.default_reasoning_levelstringThe level it uses if you pick none.
Allowed values:
"low""high""max""off"context_windowintegerContext window, in tokens.
Example:
1048576input_modalitiesstring[]requiredtext, andimageif it takes images.base_instructionsstringrequiredThe system prompt Codex uses with the model: Codex’s own default one. If you set yours with
model_instructions_file, yours wins.shell_typestringrequiredAlways
"shell_command".visibility,supported_in_api,priority,support_verbosity,truncation_policyandexperimental_supported_toolsare the other fields Codex requires, with the values it uses for any model.
The key is missing, wrong, revoked or expired.
errorobjectrequiredThe error.
Show child attributesHide child attributes
messagestringrequiredWhat went wrong, for a person to read.
typestringrequiredThe error family, as in the OpenAI API.
Example:
"authentication_error"codestringrequiredThe exact cause. Branch on this one. All codes: Limits and errors.
Example:
"invalid_api_key"paramnullrequiredAlways
null.