KnoxCall AI Gateway API

Manage AI egress gateways, their agents, and capability (phantom) tokens, plus cost/token spend rollups and FinOps exports.

GitHub OpenAPI
Business capability
Agent Identity & Trust AE-100.50

Operations 49

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /ai-gateway/gateways List AI gateways · List AI gateways #
Ask an LLM
“Which AI gateways does my tenant have?”
“Can I page through my AI gateways?”
Tell an agent
List my AI gateways.
Show page {page} of AI gateways, {per_page} per page.
POST /ai-gateway/gateways Create an AI gateway · Create an AI gateway #
Ask an LLM
“How do I create a container for my agents?”
“Can I set a daily budget on a new AI gateway?”
Tell an agent
Create an AI gateway named {name} with slug {slug}.
Create gateway {name} ({slug}) with a daily budget of {daily} and monthly budget {monthly}.
GET /ai-gateway/gateways/{id} Get an AI gateway · Get an AI gateway #
Ask an LLM
“What are the details of one AI gateway?”
“Can I look up a gateway by its ID?”
Tell an agent
Show AI gateway {id}.
Get the details of gateway {id}.
PATCH /ai-gateway/gateways/{id} Update an AI gateway · Update an AI gateway #
Ask an LLM
“Can I change the daily budget on an existing gateway?”
“Is it possible to rename an AI gateway?”
Tell an agent
Rename AI gateway {id} to {name}.
Set the daily budget of gateway {id} to {daily}.
DELETE /ai-gateway/gateways/{id} Archive an AI gateway · Archive an AI gateway #
Ask an LLM
“Can I archive an AI gateway I no longer use?”
“What happens to a gateway's status when I archive it?”
Tell an agent destructive · confirm first
Archive AI gateway {id}.
Soft-delete gateway {id} and report its new status.
GET /ai-gateway/gateways/{gatewayId}/agents List the agents under a gateway · List a gateway's agents #
Ask an LLM
“Which agents live under a particular AI gateway?”
“Can I page through the agents of one gateway?”
Tell an agent
List the agents under gateway {gatewayId}.
Show page {page} of agents for gateway {gatewayId}, {per_page} per page.
POST /ai-gateway/gateways/{gatewayId}/agents Create an agent under a gateway · Create an agent #
Ask an LLM
“How do I create an agent that routes through a provider?”
“Can an agent be limited to a list of models?”
Tell an agent
Create an agent named {name} with slug {slug} under gateway {gatewayId}.
Create agent {name} ({slug}) under gateway {gatewayId} using provider {provider} and secret {secret}.
GET /ai-gateway/agents/{id} Get an agent · Get an agent #
Ask an LLM
“What are the details of a specific agent?”
“Where is an agent's data-plane URL?”
Tell an agent
Show agent {id}.
Get the details of agent {id}.
PATCH /ai-gateway/agents/{id} Update an agent · Update an agent #
Ask an LLM
“Can I change an agent's default model?”
“Is it possible to set a model allowlist on an existing agent?”
Tell an agent
Set agent {id}'s default model to {model}.
Allow only {allowlist} on agent {id}.
DELETE /ai-gateway/agents/{id} Archive an agent · Archive an agent #
Ask an LLM
“Can I archive an agent?”
“What does archiving an agent return?”
Tell an agent destructive · confirm first
Archive agent {id}.
Soft-delete agent {id} and report its new status.
GET /ai-gateway/agents/{agentId}/tokens List an agent's capability tokens · List an agent's capability tokens #
Ask an LLM
“Which capability tokens does an agent have?”
“Can I page through an agent's tokens?”
Tell an agent
List the capability tokens of agent {agentId}.
Show page {page} of tokens for agent {agentId}, {per_page} per page.
POST /ai-gateway/agents/{agentId}/tokens Mint a capability token for an agent · Mint a capability token #
Ask an LLM
“How do I mint a capability token for an agent?”
“Can a capability token be bound to a DPoP key?”
Tell an agent
Mint a capability token for agent {agentId}.
Mint a {kind} token named {name} for agent {agentId} that expires in {expires} seconds.
DELETE /ai-gateway/agents/{agentId}/tokens/{tokenId} Revoke an agent's capability token · Revoke a capability token #
Ask an LLM
“Can I revoke a capability token an agent no longer needs?”
“What happens if I revoke a token that's already been revoked?”
Tell an agent destructive · confirm first
Revoke capability token {tokenId} on agent {agentId}.
Revoke token {tokenId} for agent {agentId}.
GET /ai-gateway/gateways/{gatewayId}/tokens List every token under a gateway · List every token under a gateway #
Ask an LLM
“Which capability tokens exist under a gateway, including gateway-level ones?”
“Can I see all tokens a gateway owns?”
Tell an agent
List every token under gateway {gatewayId}.
Show page {page} of tokens for gateway {gatewayId}, {per_page} per page.
DELETE /ai-gateway/gateways/{gatewayId}/tokens/{tokenId} Revoke a token under a gateway · Revoke a token under a gateway #
Ask an LLM
“Can I revoke a gateway-level token that has no agent?”
“Which endpoint revokes a token minted by the legacy MCP token endpoint?”
Tell an agent destructive · confirm first
Revoke token {tokenId} under gateway {gatewayId}.
Revoke gateway-level token {tokenId} for gateway {gatewayId}.
GET /ai-gateway/gateways/{gatewayId}/mcp-servers List a gateway's MCP servers · List a gateway's MCP servers #
Ask an LLM
“Which MCP servers are registered under a gateway?”
“Can I page through a gateway's MCP servers?”
Tell an agent
List the MCP servers under gateway {gatewayId}.
Show page {page} of MCP servers for gateway {gatewayId}, {per_page} per page.
POST /ai-gateway/gateways/{gatewayId}/mcp-servers Register an MCP server under a gateway · Register an MCP server #
Ask an LLM
“How do I register an upstream MCP server under a gateway?”
“Can an MCP server be authenticated with a KnoxCall secret?”
Tell an agent
Register an MCP server named {name} with slug {slug} under gateway {gatewayId} at {upstream_url}.
Register MCP server {name} ({slug}) under gateway {gatewayId} using auth {auth}.
GET /ai-gateway/mcp-servers/{id} Get an MCP server · Get an MCP server #
Ask an LLM
“What are the details of one MCP server?”
“Where is an MCP server's connect URL?”
Tell an agent
Show MCP server {id}.
Get the details of MCP server {id}.
PATCH /ai-gateway/mcp-servers/{id} Update an MCP server · Update an MCP server #
Ask an LLM
“Can I change an MCP server's allowed tools?”
“Is it possible to pause an MCP server?”
Tell an agent
Set the allowed tools of MCP server {id} to {tools}.
Set MCP server {id} to {status}.
DELETE /ai-gateway/mcp-servers/{id} Archive an MCP server · Archive an MCP server #
Ask an LLM
“Can I archive an MCP server?”
“What happens to the data plane when an MCP server is archived?”
Tell an agent destructive · confirm first
Archive MCP server {id}.
Soft-delete MCP server {id} and stop its data plane.
GET /ai-gateway/mcp-servers/{id}/grants List delegated connections to an MCP server · List the delegated-OAuth connections on an MCP server #
Ask an LLM
“Which people have consented to let KnoxCall act on their behalf against an MCP server?”
“Can I see the refresh token status for each connection on an MCP server?”
Tell an agent
List the delegated-OAuth connections on MCP server {id}.
Show who has consented to server {id} and whether their connection has a refresh token.
DELETE /ai-gateway/mcp-servers/{id}/grants Revoke all connections to an MCP server · Revoke every delegated-OAuth connection on an MCP server #
Ask an LLM
“How do I offboard everyone from an MCP server at once?”
“What happens to people's tokens when I revoke every connection on an MCP server?”
Tell an agent destructive · confirm first
Revoke every delegated-OAuth connection on MCP server {id}.
Offboard all consented users from server {id} in one call.
DELETE /ai-gateway/mcp-servers/{id}/grants/{grantId} Revoke one connection to an MCP server · Revoke one person's delegated-OAuth connection #
Ask an LLM
“Can I revoke just one person's connection to an MCP server?”
“Does revoking a single connection also revoke KnoxCall's upstream authorization?”
Tell an agent destructive · confirm first
Revoke connection {grantId} on MCP server {id}.
Disconnect only the user with connection {grantId} from server {id}.
GET /ai-gateway/mcp-servers/{id}/tools List tools an MCP server exposes · List an MCP server's tool rows #
Ask an LLM
“What tools does an MCP server allow clients to call?”
“Which tool rows are defined on an MCP server?”
Tell an agent
List the tool rows on MCP server {id}.
Show which tools server {id} exposes.
POST /ai-gateway/mcp-servers/{id}/tools Add or update an MCP tool row · Upsert an MCP tool row #
Ask an LLM
“How do I add a new tool row to an MCP server?”
“Can I change the input schema of a tool row on an MCP server?”
Tell an agent
Upsert tool {tool_name} on MCP server {id}.
Create or update tool {tool_name} on server {id} with schema {input_schema}.
PATCH /ai-gateway/mcp-servers/{id}/tools/{toolId} Enable, disable or rename an MCP tool row · Enable, disable or re-describe a tool row #
Ask an LLM
“How do I disable a tool row on an MCP server?”
“Can I rename an existing tool row on an MCP server?”
Tell an agent
Set enabled to {enabled} on tool row {toolId} of MCP server {id}.
Rename tool row {toolId} on server {id} to {description}.
DELETE /ai-gateway/mcp-servers/{id}/tools/{toolId} Delete an MCP tool row · Delete a tool row #
Ask an LLM
“Can I remove a tool row from an MCP server?”
“What happens to calls that reference a tool row I delete from an MCP server?”
Tell an agent destructive · confirm first
Delete tool row {toolId} from MCP server {id}.
Remove the tool row {toolId} on server {id}.
GET /ai-gateway/usage/export Export AI gateway usage for FinOps · Export AI gateway usage (FinOps) #
Ask an LLM
“How much has each user or team spent on the AI gateway this month?”
“Can I export AI gateway usage as a CSV for billing?”
Tell an agent
Export AI gateway usage grouped by {group_by} over {period}.
Download the FinOps usage export for agent {agent_id} as {format}.
GET /ai-gateway/usage Get AI gateway cost and token totals · Get AI gateway usage #
Ask an LLM
“What has my agent spent on the AI gateway this month?”
“Can I see token counts by model for a single agent?”
Tell an agent
Show AI gateway cost and token totals for agent {agent_id} over {period}.
Get the AI gateway usage rollup for the last {period}.
GET /ai-gateway/firewall-policies List prompt-firewall policies · List prompt-firewall policies #
Ask an LLM
“Which prompt-firewall policies are available to my agents and MCP servers?”
“Can I see the action and heuristics of each firewall policy?”
Tell an agent
List all prompt-firewall policies.
Show every firewall policy with its action and heuristics.
POST /ai-gateway/firewall-policies Create a prompt-firewall policy · Create a prompt-firewall policy #
Ask an LLM
“How do I block prompt-injection attempts with a new firewall policy?”
“Can I set a firewall policy to warn instead of block?”
Tell an agent
Create a firewall policy named {name} with heuristics {heuristics}.
Create a firewall policy {name} that acts {action} on matches.
POST /ai-gateway/firewall-policies/test Dry-run firewall rules against sample text · Dry-run firewall rules against sample text #
Ask an LLM
“Can I test my firewall rules against a sample prompt before saving them?”
“Which patterns would a firewall policy match in a given text?”
Tell an agent
Dry-run firewall rules against {text}.
Test the sample text {text} against my firewall heuristics.
GET /ai-gateway/firewall-policies/{id} Get a prompt-firewall policy · Get a prompt-firewall policy #
Ask an LLM
“What heuristics and action does a particular firewall policy use?”
“Can I look up one firewall policy by id?”
Tell an agent
Get firewall policy {id}.
Show the heuristics and action of firewall policy {id}.
PATCH /ai-gateway/firewall-policies/{id} Update a prompt-firewall policy · Update a prompt-firewall policy #
Ask an LLM
“How do I change the action of an existing firewall policy?”
“Can I turn on the canary for a firewall policy?”
Tell an agent
Set the action of firewall policy {id} to {action}.
Turn on the canary for firewall policy {id} with {heuristics}.
DELETE /ai-gateway/firewall-policies/{id} Delete a prompt-firewall policy · Delete a prompt-firewall policy #
Ask an LLM
“Can I delete a firewall policy that agents still use?”
“What happens if I delete a firewall policy that is attached to an MCP server?”
Tell an agent destructive · confirm first
Delete firewall policy {id}.
Remove the firewall policy {id} that is still attached to agents.
GET /ai-gateway/pii-policies List PII redaction policies · List PII redaction policies #
Ask an LLM
“Which PII redaction policies are defined in my tenant?”
“Can I see which recognizers a PII policy uses?”
Tell an agent
List all PII redaction policies.
Show every PII policy with its default action.
POST /ai-gateway/pii-policies Create a PII redaction policy · Create a PII redaction policy #
Ask an LLM
“How do I redact credit card numbers and phone numbers in prompts?”
“Can I create a PII policy that uses only certain recognizers?”
Tell an agent
Create a PII policy named {name} with recognizers {recognizer_ids}.
Create a PII policy {name} that redacts PII with default action {default_action}.
GET /ai-gateway/pii-policies/{id} Get a PII redaction policy · Get a PII redaction policy #
Ask an LLM
“What recognizers and default action does a PII policy use?”
“Can I look up one PII policy by id?”
Tell an agent
Get PII policy {id}.
Show the recognizers and default action of PII policy {id}.
PATCH /ai-gateway/pii-policies/{id} Update a PII redaction policy · Update a PII redaction policy #
Ask an LLM
“How do I change which recognizers a PII policy uses?”
“Can I reset a PII policy to use every enabled recognizer?”
Tell an agent
Set the recognizers of PII policy {id} to {recognizer_ids}.
Change PII policy {id} to use every enabled recognizer.
DELETE /ai-gateway/pii-policies/{id} Delete a PII redaction policy · Delete a PII redaction policy #
Ask an LLM
“Can I delete a PII policy that agents still reference?”
“What happens if I delete a PII policy that is attached to an agent?”
Tell an agent destructive · confirm first
Delete PII policy {id}.
Remove the PII policy {id} that is still attached to agents.
GET /ai-gateway/pii-recognizers List custom PII recognizers · List custom PII recognizers #
Ask an LLM
“Which custom detectors have I defined for PII scanning?”
“Can I page through my tenant's PII recognizers?”
Tell an agent
List my custom PII recognizers.
Show page {page} of PII recognizers, {per_page} per page.
POST /ai-gateway/pii-recognizers Create a custom PII recognizer · Create a custom PII recognizer #
Ask an LLM
“How do I add a detector for an internal employee ID format?”
“Can I set a confidence threshold on a new PII recognizer?”
Tell an agent
Create a PII recognizer {name} of kind {kind} matching {pattern}.
Add recognizer {name} for {pattern} with confidence {confidence} and action {action}.
POST /ai-gateway/pii-recognizers/test Dry-run a PII recognizer pattern · Dry-run a recognizer pattern against sample text #
Ask an LLM
“Can I compile a new PII pattern before saving it?”
“Does the test run use the same detector builder as production?”
Tell an agent
Dry-run the {kind} pattern {pattern} against {text}.
Test recognizer {name} on sample text {text} with pattern {pattern}.
GET /ai-gateway/pii-recognizers/{id} Get a custom PII recognizer · Get a custom PII recognizer #
Ask an LLM
“What pattern and action does one of my PII recognizers use?”
“Can I look up a custom detector by its ID?”
Tell an agent
Get PII recognizer {id}.
Show the pattern and action of custom detector {id}.
PATCH /ai-gateway/pii-recognizers/{id} Update a custom PII recognizer · Update a custom PII recognizer #
Ask an LLM
“Can I change the pattern of an existing PII recognizer?”
“Is it possible to turn a custom detector on or off?”
Tell an agent
Update PII recognizer {id} to match {pattern}.
Set enabled to {enabled} on custom detector {id}.
DELETE /ai-gateway/pii-recognizers/{id} Delete a custom PII recognizer · Delete a custom PII recognizer #
Ask an LLM
“How do I remove a custom PII recognizer?”
“Why can't I delete a detector that a policy still uses?”
Tell an agent destructive · confirm first
Delete PII recognizer {id}.
Remove custom detector {id} from my PII recognizers.
POST /v1/oauth/token Exchange a CI OIDC token for a gateway token · Exchange a CI OIDC token for an AI-gateway capability token #
Ask an LLM
“How do I mint a short-lived capability token from a CI workload identity?”
“Can I narrow the exchanged token to a specific resource?”
Tell an agent
Exchange my OIDC token {subject_token} for an AI-gateway capability token.
Exchange {subject_token} for a gateway token scoped to resource {resource}.
POST /v1/ai/{agentSlug}/{upstreamPath} Call an AI provider through the gateway · Call an AI provider through the gateway #
Ask an LLM
“How do I send a chat message to an AI provider through the gateway?”
“Does the gateway screen the AI's output before it reaches me?”
Tell an agent
Call {upstreamPath} on AI agent {agentSlug} through the gateway.
Send a request to {upstreamPath} via agent {agentSlug}.
GET /v1/ai/{agentSlug}/{upstreamPath} Read from an AI provider through the gateway · Read from an AI provider through the gateway #
Ask an LLM
“Can I list models through the AI-gateway agent?”
“How do I fetch an AI batch's results through the gateway?”
Tell an agent
Read {upstreamPath} from AI agent {agentSlug} through the gateway.
Fetch the {upstreamPath} results of agent {agentSlug}.

Work with this as data

Every API 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 apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • 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 API
curl "https://apis.io/api/v1/apis/knoxcall:knoxcall-ai-gateway-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

knoxcall-ai-gateway-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: KnoxCall Client Management AI Gateway API
  version: '1.0'
  description: 'The KnoxCall Client Management API provides programmatic access to manage your API gateway

    resources including routes, secrets, clients, environments, webhooks, and API keys. ## Authentication


    All requests must include an OAuth 2.1 access token **or** a legacy API key. The

    recommended path for new integrations is the first-party SDKs, which mint, cache, and

    refresh OAuth tokens for you (start with `knoxcall login` on a developer machine, or

    `KNOXCALL_CLIENT_ID` / `KNOXCALL_CLIENT_SECRET` in CI). You can authenticate using any of:


    - **Authorization header (OAuth 2.1 bearer token — recommended)**: `Authorization: Bearer `

    - **Authorization header (legacy API key)**: `Authorization: Bearer tk_xxx_yyy`

    - **x-api-key header (legacy API key)**: `x-api-key: tk_xxx_yyy`


    OAuth 2.1 access tokens (`kc_` prefix) are minted at the root-host token endpoint

    `https://api.knoxcall.com/oauth/token` (not under `/v1`) using the `client_credentials`

    or `authorization_code` grant. See the `OAuth2` security scheme and the `/oauth/*`

    endpoints. Some resources that are managed exclusively through OAuth reject API-key auth

    with a `403 use_oauth` error. Long-lived API keys remain fully supported. They come in three types:

    - **Standard keys** (`tk_` prefix) are used on the production API (`api.knoxcall.com`). - **Test keys** (`tk_` prefix, type=test) are used on the sandbox API (`sandbox.knoxcall.com`). - **Enterprise Access Keys** (`AKE` prefix) follow the format `AKE[16chars]:[40chars]`. Using a test key on the production API (or vice versa) will return a `403 wrong_key_type` error. ## Request IDs


    Every response — success or error — includes an `X-Request-Id` response header (a UUID). Its value is identical to the `request_id` field in the response body (`meta.request_id`

    on success, `error.request_id` on error). Quote it when contacting support. ## API Versioning


    The API is versioned on two axes:


    - **Major version — the `/v1` path prefix.** Breaking changes ship under a new major

    (`/v2`). `/v1` never receives a breaking change. - **Minor version — the `KnoxCall-Version` header (dated, `YYYY-MM-DD`).** Send

    `KnoxCall-Version: 2026-08-05` to pin the behaviour of a specific dated release. Omit

    the header to get the newest minor version. Every response echoes the resolved version

    back in a `KnoxCall-Version` response header. Within a major version, **additive changes are not breaking** and may appear without a new

    dated version: new endpoints, new optional request fields, new response fields, new

    `error.type` values, and new enum members. Clients must tolerate unknown response fields

    and unknown `error.type` values (see the `ErrorResponse` schema). An **unknown or malformed** `KnoxCall-Version` value returns `400` with

    `error.type: invalid_api_version`. ## Rate Limiting


    API keys can have optional rate limits configured. When a limit is configured, the

    following headers are emitted on **every** response (not only `429`s):

    - `X-RateLimit-Limit` -- maximum requests allowed per window

    - `X-RateLimit-Remaining` -- remaining requests in the current window

    - `X-RateLimit-Reset` -- epoch seconds at which the window resets


    When the limit is exceeded the API returns `429` (`rate_limit_exceeded` / `rate_limited`)

    and additionally sets `Retry-After` (seconds until the window resets). ## DPoP sender-constrained tokens, and the server nonce


    A token minted with a `cnf.jkt` binding (DPoP, RFC 9449) requires a `DPoP` proof header

    on every request, signed over the request''s method and canonical public URL. **Every response to a request that carried a `DPoP` header also carries a

    `DPoP-Nonce` response header** -- mints, refusals and successful calls alike, on

    `POST /oauth/token`, `/v1`, the tenant data plane, the self-hosted proxy and the AI

    gateway. The value is stateless and changes every minute; the server accepts the current

    and the previous minute''s, so a nonce is good for 60-120 seconds.'
  contact:
    name: KnoxCall Support
    url: https://knoxcall.com
    email: support@knoxcall.com
  license:
    name: Proprietary
    url: https://knoxcall.com/terms
servers:
- url: https://api.knoxcall.com/v1
  description: Production
- url: https://sandbox.knoxcall.com/v1
  description: Sandbox (test keys only)
security:
- OAuth2: []
- BearerAuth: []
- ApiKeyAuth: []
tags:


# --- truncated at 32 KB (170 KB total) ---
# Full source: https://artifacts.apis.io/knoxcall/openapi/knoxcall-ai-gateway-api-openapi.yml