Create agent
admin.knoxcall.com). Authenticate with a session JWT, send the X-Tenant-ID header, and use an owner or admin account — it is not an api.knoxcall.com API-key endpoint.
Request body
| Field | Type | Description |
|---|---|---|
name | string | Required. Display name for the agent. |
slug | string | Required. URL slug; the agent is served at /v1/ai/{slug}. |
provider | anthropic | openai | Required. Upstream provider. Determines the upstream URL and auth header template. |
upstream_secret_id | string (uuid) | Required. ID of a secret in this tenant holding the provider API key. The gateway auto-creates an upstream route (ai-gateway-{slug}) wired to this secret. |
description | string | Optional free-text description. |
default_model | string | Optional. Defaults to the provider default (claude-sonnet-4-6 for Anthropic, gpt-4o for OpenAI). |
budget_daily_usd | number | Optional daily spend cap. |
budget_monthly_usd | number | Optional monthly spend cap. |
streaming_enabled | boolean | Optional. Defaults to true. |
The primary route is derived automatically from
provider + upstream_secret_id; you do not pass primary_route_id at create time. Model policy (model_allowlist, model_denylist, model_rewrite), tool_allowlist, output_schema / output_validation_action, fallback_route_ids, and firewall_policy_id are configured after creation via PATCH /admin/ai-gateway/{gatewayId}/agents/{agentId} — they are not read by the create handler.