Skip to content
Docs

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.

GET / v1 / codex / models
GET / v1 / codex / 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.

Authorizations

Authorizationstring<bearer>required

Bearer authentication header of the form Bearer <token>, where <token> is your API key.

Your key stays in this page and is only sent with this request. Get an API key

List models for Codex
curl --request GET \
  --url https://api.libremodel.ai/v1/codex/models \
  --header 'Authorization: Bearer YOUR_API_KEY'
{
  "models": [
    {
      "slug": "deepseek-v4.1-flash-1017",
      "display_name": "DeepSeek V4.1 Flash",
      "description": null,
      "supported_reasoning_levels": [
        {
          "effort": "none",
          "description": "Answers without thinking first"
        },
        {
          "effort": "low",
          "description": "Fast answers with light reasoning"
        },
        {
          "effort": "high",
          "description": "Deeper reasoning for complex tasks"
        },
        {
          "effort": "max",
          "description": "Maximum reasoning depth, slower"
        }
      ],
      "default_reasoning_level": "high",
      "shell_type": "shell_command",
      "visibility": "list",
      "supported_in_api": true,
      "priority": 0,
      "base_instructions": "You are a coding agent running in the Codex CLI, a terminal-based coding assistant. …",
      "support_verbosity": false,
      "truncation_policy": {
        "mode": "bytes",
        "limit": 10000
      },
      "experimental_supported_tools": [],
      "input_modalities": [
        "text",
        "image"
      ],
      "context_window": 1048576,
      "max_context_window": 1048576
    }
  ]
}

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your API key.

Response

application/json

The models, in the order of /model.

  • modelsobject[]required

    One object per model.

    Show child attributes
    • slugstringrequired

      The model ID: the value of model in config.toml.

      Example: "deepseek-v4.1-flash-1017"

    • display_namestringrequired

      The name /model shows.

    • supported_reasoning_levelsobject[]required

      The effort levels you can pick, each with effort and description. Empty if the model does not reason.

    • default_reasoning_levelstring

      The level it uses if you pick none.

      Allowed values:"low""high""max""off"

    • context_windowinteger

      Context window, in tokens.

      Example: 1048576

    • input_modalitiesstring[]required

      text, and image if it takes images.

    • base_instructionsstringrequired

      The system prompt Codex uses with the model: Codex’s own default one. If you set yours with model_instructions_file, yours wins.

    • shell_typestringrequired

      Always "shell_command". visibility, supported_in_api, priority, support_verbosity, truncation_policy and experimental_supported_tools are the other fields Codex requires, with the values it uses for any model.