AISIX AI 网关 Admin API 参考,覆盖自托管网关的模型、服务提供方凭证、调用方 API Key、流量策略和可观测性资源。
GET Get Gateway Health /admin/v1/healthGet model health levels and configuration-watch freshness for this gateway.
GET Get Liveness Status /livezProcess liveness: 200 while the process is alive, 503 once graceful shutdown has begun (an expected drain, not a crash). Use /readyz for traffic eligibility (readiness).
GET Get Readiness Status /readyzTraffic eligibility (readiness): 200 when the instance can serve, 503 while draining, before the first config apply, or when the etcd config watch is stale. Distinct from /livez (process liveness).
GET Open Scalar UI /admin/openapi-scalarOpen the browser UI that loads /admin/openapi.json from the admin listener.
GET Get OpenAPI Document /admin/openapi.jsonGet the machine-readable OpenAPI 3.1 document served by this gateway process.
GET List Models /admin/v1/modelsList all configured model resources.
POST Create Model /admin/v1/modelsCreate a model resource. The gateway validates the payload against the Model schema, rejects duplicate display name values, and returns the stored resource entry.
GET List Model Runtime Status /admin/v1/models/statusReturns runtime routing and exclusion state for every model.
GET Get Model by ID /admin/v1/models/{id}Get a model resource by ID.
PUT Update Model by ID /admin/v1/models/{id}Update a model resource by ID. The gateway validates the payload, rejects duplicate display name values, preserves the resource ID, and increments the revision.
DELETE Delete Model by ID /admin/v1/models/{id}Delete a model resource by ID.
GET List Caller API Keys /admin/v1/apikeysList caller API keys with plaintext credentials redacted.
POST Create Caller API Key /admin/v1/apikeysCreate a caller API key. The gateway validates the payload, rejects duplicate key hash values, and returns the stored resource entry with plaintext credentials redacted.
GET Get Caller API Key by ID /admin/v1/apikeys/{id}Get a caller API key by ID with plaintext credentials redacted.
PUT Update Caller API Key by ID /admin/v1/apikeys/{id}Update a caller API key by ID. The gateway validates the payload, rejects duplicate key hash values, preserves the resource ID, and increments the revision.
DELETE Delete Caller API Key by ID /admin/v1/apikeys/{id}Delete a caller API key by ID.
POST Rotate Caller API Key by ID /admin/v1/apikeys/{id}/rotateRotate a caller API key by ID. The gateway generates a new plaintext key, stores only its SHA-256 hash, and returns the plaintext once.
GET List Provider Keys /admin/v1/provider_keysList all configured provider key resources.
POST Create Provider Key /admin/v1/provider_keysCreate a provider key resource. The gateway validates the payload, rejects duplicate display name values, and returns the stored resource entry.
GET Get Provider Key by ID /admin/v1/provider_keys/{id}Get a provider key resource by ID.
PUT Update Provider Key by ID /admin/v1/provider_keys/{id}Update a provider key resource by ID. The gateway validates the payload, rejects duplicate display name values, preserves the resource ID, and increments the revision.
DELETE Delete Provider Key by ID /admin/v1/provider_keys/{id}Delete a provider key resource by ID.
GET List MCP Servers /admin/v1/mcp_serversList registered upstream MCP server resources.
POST Create MCP Server /admin/v1/mcp_serversCreate an upstream MCP server resource. The gateway validates the payload, rejects duplicate display name values, and returns the stored resource entry.
GET Get MCP Server by ID /admin/v1/mcp_servers/{id}Get an upstream MCP server resource by ID.
PUT Update MCP Server by ID /admin/v1/mcp_servers/{id}Update an upstream MCP server resource by ID. The gateway validates the payload, rejects duplicate display name values, preserves the resource ID, and increments the revision.
DELETE Delete MCP Server by ID /admin/v1/mcp_servers/{id}Delete an upstream MCP server resource by ID.
GET List A2A Agents /admin/v1/a2a_agentsList registered upstream A2A agent resources.
POST Create A2A Agent /admin/v1/a2a_agentsCreate an upstream A2A agent resource. The gateway validates the payload, rejects duplicate display name values, and returns the stored resource entry.
GET Get A2A Agent by ID /admin/v1/a2a_agents/{id}Get an upstream A2A agent resource by ID.
PUT Update A2A Agent by ID /admin/v1/a2a_agents/{id}Update an upstream A2A agent resource by ID. The gateway validates the payload, rejects duplicate display name values, preserves the resource ID, and increments the revision.
DELETE Delete A2A Agent by ID /admin/v1/a2a_agents/{id}Delete an upstream A2A agent resource by ID.
GET List Guardrails /admin/v1/guardrailsList all configured guardrail resources.
POST Create Guardrail /admin/v1/guardrailsCreate a guardrail resource. The gateway validates the payload, rejects duplicate name values, and returns the stored resource entry.
GET Get Guardrail by ID /admin/v1/guardrails/{id}Get a guardrail resource by ID.
PUT Update Guardrail by ID /admin/v1/guardrails/{id}Update a guardrail resource by ID. The gateway validates the payload, rejects duplicate name values, preserves the resource ID, and increments the revision.
DELETE Delete Guardrail by ID /admin/v1/guardrails/{id}Delete a guardrail resource by ID.
GET List Cache Policies /admin/v1/cache_policiesList all configured cache policy resources.
POST Create Cache Policy /admin/v1/cache_policiesCreate a cache policy resource. The gateway validates the payload, rejects duplicate name values, and returns the stored resource entry.
GET Get Cache Policy by ID /admin/v1/cache_policies/{id}Get a cache policy resource by ID.
PUT Update Cache Policy by ID /admin/v1/cache_policies/{id}Update a cache policy resource by ID. The gateway validates the payload, rejects duplicate name values, preserves the resource ID, and increments the revision.
DELETE Delete Cache Policy by ID /admin/v1/cache_policies/{id}Delete a cache policy resource by ID.
GET List Observability Exporters /admin/v1/observability_exportersList all configured observability exporter resources.
POST Create Observability Exporter /admin/v1/observability_exportersCreate an observability exporter resource. The gateway validates the payload, rejects duplicate name values, and returns the stored resource entry.
GET Get Observability Exporter by ID /admin/v1/observability_exporters/{id}Get an observability exporter resource by ID.
PUT Update Observability Exporter by ID /admin/v1/observability_exporters/{id}Update an observability exporter resource by ID. The gateway validates the payload, rejects duplicate name values, preserves the resource ID, and increments the revision.
DELETE Delete Observability Exporter by ID /admin/v1/observability_exporters/{id}Delete an observability exporter resource by ID.
POST Create Playground Chat Completion /playground/chat/completionsForwards a chat completion through the proxy path for local playground testing. Use a proxy API key, not an admin key.