Kgateway · Schema

kgateway AIBackend

AIBackend configures AI provider backends with support for LLM providers such as OpenAI, Azure OpenAI, Gemini, and Mistral, including priority-based routing groups.

Gateways

Properties

Name Type Description
apiVersion string API version for the AIBackend resource.
kind string Resource kind.
metadata object Standard Kubernetes object metadata.
spec object AIBackendSpec defines the desired state of an AIBackend.
View JSON Schema on GitHub

JSON Schema

ai-backend.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/api-evangelist/kgateway/blob/main/json-schema/ai-backend.json",
  "title": "kgateway AIBackend",
  "description": "AIBackend configures AI provider backends with support for LLM providers such as OpenAI, Azure OpenAI, Gemini, and Mistral, including priority-based routing groups.",
  "type": "object",
  "properties": {
    "apiVersion": {
      "type": "string",
      "const": "gateway.kgateway.dev/v1alpha1",
      "description": "API version for the AIBackend resource."
    },
    "kind": {
      "type": "string",
      "const": "AIBackend",
      "description": "Resource kind."
    },
    "metadata": {
      "type": "object",
      "description": "Standard Kubernetes object metadata.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the AIBackend resource."
        },
        "namespace": {
          "type": "string",
          "description": "Namespace of the AIBackend resource."
        },
        "labels": {
          "type": "object",
          "additionalProperties": { "type": "string" }
        },
        "annotations": {
          "type": "object",
          "additionalProperties": { "type": "string" }
        }
      },
      "required": ["name"]
    },
    "spec": {
      "type": "object",
      "description": "AIBackendSpec defines the desired state of an AIBackend.",
      "properties": {
        "provider": {
          "type": "object",
          "description": "Configuration for the LLM provider.",
          "properties": {
            "type": {
              "type": "string",
              "description": "The type of LLM provider.",
              "enum": ["openai", "azure", "gemini", "mistral"]
            },
            "openai": {
              "type": "object",
              "properties": {
                "model": {
                  "type": "string",
                  "description": "Model name to use."
                },
                "authToken": { "$ref": "#/$defs/AuthToken" }
              }
            },
            "azure": {
              "type": "object",
              "properties": {
                "endpoint": { "type": "string" },
                "deploymentName": { "type": "string" },
                "apiVersion": { "type": "string" },
                "authToken": { "$ref": "#/$defs/AuthToken" }
              }
            },
            "gemini": {
              "type": "object",
              "properties": {
                "model": { "type": "string" },
                "authToken": { "$ref": "#/$defs/AuthToken" }
              }
            }
          }
        },
        "groups": {
          "type": "array",
          "description": "List of groups in priority order where each group defines a set of LLM providers.",
          "items": {
            "type": "object",
            "properties": {
              "priority": {
                "type": "integer",
                "description": "Priority of this group (lower is higher priority)."
              },
              "backends": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "backendRef": {
                      "type": "object",
                      "properties": {
                        "name": { "type": "string" },
                        "namespace": { "type": "string" }
                      }
                    },
                    "weight": {
                      "type": "integer",
                      "description": "Weight for load balancing within the group."
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "$defs": {
    "AuthToken": {
      "type": "object",
      "properties": {
        "secretRef": {
          "type": "object",
          "properties": {
            "name": { "type": "string" },
            "namespace": { "type": "string" }
          }
        }
      }
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/ai-backend"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.