Read returns the EFFECTIVE edge policy the caller is subject to: the platform…
Read returns the EFFECTIVE edge policy the caller is subject to: the platform CORS allowlist and pre-auth per-IP flood cap in force, plus the caller's own…
GET /v1/gateway/config
| Address | https://api.hanzo.ai/v1/gateway/config |
| Method | GET |
| Operation | get_gateway_config |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Read returns the EFFECTIVE edge policy the caller is subject to: the platform CORS allowlist and pre-auth per-IP flood cap in force, plus the caller's own authenticated rate ceiling, edge-cache TTLs and accepted-method allowlist. A SuperAdmin may inspect a specific tenant's effective policy with ?org=<slug>.
Request
GET /v1/gateway/config takes no parameters and no body — the credential is the whole request.
Response
| Status | Body | Meaning |
|---|---|---|
200 | Policy | ok |
200 body — 11 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
cache_paths | body | object | — | CachePaths overrides CacheTTLSec per path PREFIX (key "/v1/models" → seconds). |
cache_paths.* | body | integer | — | |
cache_ttl_sec | body | integer | — | CacheTTLSec is the org's default edge-cache TTL for its responses, in seconds; 0 means no caching. |
cors_origins | body | string[] | — | CORSOrigins is the PLATFORM-scope CORS allowlist EdgeCORS admits: an exact origin, a bare host, or a "*.host" wildcard. |
methods | body | string[] | — | Methods is the allowlist of HTTP methods the edge accepts for this org. |
mode | body | string | — | Mode is the abuse gate's posture for THIS scope: "shadow" scores traffic and records the verdict without acting on it, "live" enforces it. Unset means shadow. |
org_rpm | body | integer | — | OrgRPM is the org's OWN authenticated rate ceiling, requests per minute, as ScopeRateLimit enforces it. |
per_ip_rpm | body | integer | — | PerIPRPM is the PLATFORM-scope pre-auth flood cap: requests EdgeRateLimit admits per WindowSec from one client IP. |
updated_at | body | integer | — | UpdatedAt is the unix second this policy row was last written. |
updated_by | body | string | — | UpdatedBy is the validated user id that wrote this policy row. |
window_sec | body | integer | — | WindowSec is the window PerIPRPM is counted over, in seconds. |
Failure carries the platform error shape — see Errors.
Examples
hanzo gateway config getimport { Configuration, GatewayApi } from 'hanzoai';
const api = new GatewayApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getGatewayConfig();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import GatewayApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = GatewayApi(client).get_gateway_config()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.GatewayAPI.GetGatewayConfig(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, gateway_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = gateway_api::get_gateway_config(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.GatewayApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new GatewayApi(client).getGatewayConfig();curl https://api.hanzo.ai/v1/gateway/config \
-H "Authorization: Bearer $HANZO_API_KEY"Tool gateway, op get_gateway_config — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gateway",
"arguments": {
"op": "get_gateway_config",
"input": {}
}
}
}'How is this guide?