AI Gateway

Add a model to an AI Gateway provider

Requires ai_gateway_config_write and provider Edit. Models and pricing inherit provider access. Add a manually managed model catalog entry to a provider. Manually managed entries are not modified by automatic catalog synchronization.

post/api/v2/providers/{provider_id}/models

Request

Path parameters

provider_idinteger required

Provider ID.

Request body

Example request

{
  "data": {
    "attributes": {
      "model_id_canonical": "gpt-5.2-codex",
      "model_id_wire": "gpt-5.2-codex-20260801",
      "supported_operations": [
        "OPENAI_CHAT_COMPLETIONS"
      ]
    },
    "type": "model-catalog-entries"
  }
}

Response

Created

Example response

{
  "data": {
    "attributes": {
      "created_at": "2026-08-24T12:00:00Z",
      "enabled": true,
      "metadata": {
        "limits": {
          "context_window_tokens": 400000,
          "max_output_tokens": 128000
        },
        "modalities": {
          "input": [
            "text"
          ],
          "output": [
            "text"
          ]
        },
        "reasoning": {
          "controls": [
            {
              "effort_levels": [
                "high"
              ],
              "type": "effort"
            }
          ]
        },
        "reference_pricing": [
          {
            "amount": "2.5",
            "component": "input",
            "context_max_tokens": 272000,
            "currency": "USD",
            "mode": "standard",
            "service_tier": "priority",
            "unit": "million_tokens"
          }
        ],
        "source": {
          "matched_by": "wire_id",
          "model_id": "gpt-5.2-codex",
          "name": "models.dev",
          "provider": "openai"
        },
        "status": "available"
      },
      "model_id_canonical": "gpt-5.2-codex",
      "model_id_wire": "gpt-5.2-codex-20260801",
      "provider_id": 42,
      "source": "discovered",
      "supported_operations": [
        "OPENAI_CHAT_COMPLETIONS"
      ],
      "updated_at": "2026-08-24T12:00:00Z"
    },
    "id": "101",
    "type": "model-catalog-entries"
  }
}

Changes

Changes to this operation have not been checked yet.