AI Gateway

Add multiple models to an AI Gateway provider

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

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

Request

Path parameters

provider_idinteger required

Provider ID.

Request body

Example request

{
  "data": {
    "attributes": {
      "models": [
        {
          "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.