AI Gateway Model Providers

Create an AI Gateway Model Provider

Changed on

Registers a new model provider for the AI Gateway.

post/v1/ai-gateways/{gatewayId}/model-providers

Request

  • Base URL
    https://global.api.konghq.com
  • Auth
    • HTTP bearer
    • or HTTP bearer
    • or HTTP bearer
    • or HTTP bearer

Path parameters

gatewayId, string uuid required

Contains a unique identifier used for this resource.

Example:5f9fd312-a987-4628-b4c5-bb4f4fddd5f7

The unique ID of the AI Gateway.

Request body

union required
AIGatewayModelProviderAnthropic required

Configuration for an upstream model provider.

OR
AIGatewayModelProviderAzure required

Config for Azure model provider.

OR
AIGatewayModelProviderBaseten required

Configuration for an upstream model provider.

OR
AIGatewayModelProviderBedrock required

Config for AWS model provider.

OR
AIGatewayModelProviderCerebras required

Configuration for an upstream model provider.

OR
AIGatewayModelProviderCohere required

Configuration for an upstream model provider.

OR
AIGatewayModelProviderDashscope required

Configuration for an upstream model provider.

OR
AIGatewayModelProviderDatabricks required

Configuration for an upstream model provider.

OR
AIGatewayModelProviderDeepseek required

Configuration for an upstream model provider.

OR
AIGatewayModelProviderGemini required

Config for GCP model provider.

OR
AIGatewayModelProviderHuggingface required

Configuration for an upstream model provider.

OR
AIGatewayModelProviderKimi required

Configuration for an upstream model provider.

OR
AIGatewayModelProviderLlama2 required

Configuration for an upstream llama2 model provider.

Deprecated: the llama2 provider is deprecated and will be removed in 3.0. Migrate each target by its format value: ollama maps to the ollama provider, openai maps to the openai provider with upstream_url set on the target, or to the vllm provider; raw has no replacement provider.

OR
AIGatewayModelProviderMistral required

Configuration for an upstream model provider.

OR
AIGatewayModelProviderOllama required

Configuration for an upstream model provider.

OR
AIGatewayModelProviderOpenai required

Configuration for an upstream model provider.

OR
AIGatewayModelProviderVercel required

Configuration for an upstream model provider.

OR
AIGatewayModelProviderVllm required

Configuration for an upstream model provider.

OR
AIGatewayModelProviderXai required

Configuration for an upstream model provider.

OR
AIGatewayModelProviderSagemaker required

Config for Sagemaker model provider.

OR
AIGatewayModelProviderTypesafe required

Configuration for an upstream model provider.

Example request

{
  "display_name": "Azure AI SE",
  "name": "azure-ai-se",
  "labels": {
    "category": "finance"
  },
  "managed_by": {
    "owner": "terraform"
  },
  "datastores": [
    {
      "name": "vault-konnect-prod"
    }
  ],
  "token_vault": {
    "provider": "my-upstream-provider",
    "subject_token_type": "access_token",
    "credential": {
      "inbound": {
        "location": "header",
        "name": "Authorization",
        "prefix": "Bearer "
      }
    },
    "cache": {
      "redis": {
        "host": "redis.internal",
        "port": 6379
      }
    }
  }
}

Response

Model provider created successfully.

union required
intersection required
OR
intersection required
OR
intersection required
OR
intersection required
OR
intersection required
OR
intersection required
OR
intersection required
OR
intersection required
OR
intersection required
OR
intersection required
OR
intersection required
OR
intersection required
OR
intersection required
OR
intersection required
OR
intersection required
OR
intersection required
OR
intersection required
OR
intersection required
OR
intersection required
OR
intersection required
OR
intersection required

Example response

{
  "id": "5f9fd312-a987-4628-b4c5-bb4f4fddd5f7",
  "created_at": "2022-11-04T20:10:06.927Z",
  "updated_at": "2022-11-04T20:10:06.927Z",
  "display_name": "Azure AI SE",
  "name": "azure-ai-se",
  "labels": {
    "category": "finance"
  },
  "managed_by": {
    "owner": "terraform"
  },
  "datastores": [
    {
      "name": "vault-konnect-prod"
    }
  ],
  "token_vault": {
    "provider": "my-upstream-provider",
    "subject_token_type": "access_token",
    "credential": {
      "inbound": {
        "location": "header",
        "name": "Authorization",
        "prefix": "Bearer "
      }
    },
    "cache": {
      "redis": {
        "host": "redis.internal",
        "port": 6379
      }
    }
  }
}

Changes

    • info

      request property oneOf[#/components/schemas/AIGatewayModelProviderLlama2] deprecated

    • info

      response property oneOf[AIGatewayModelProviderLlama2]/ deprecated

    • breaking

      the oneOf[#/components/schemas/AIGatewayModelProviderAnthropic]/config/auth/headers/items/name request property's minLength was increased from 0 to 1

    210 more changes in this revision