Skip to content
GET/api/v1/gateway

Get gateway configuration and status

Returns the SERVER-DEFAULT gateway configuration and live process status — not the org's stored routing config. Includes the supported provider list (openai, anthropic, google, mistral, groq) with per-provider health and circuit-breaker state from the in-process gateway, the default routing strategy plus the available-strategy list, cache settings and hit stats, default rate limits, circuit-breaker thresholds, and uptime/total-request counters. The per-org row written by PUT /api/v1/gateway (`gateway_routing_config`) is applied on the hosted proxy and is NOT read back by this endpoint.

Authentication

Send Authorization: Bearer YOUR_API_KEY on every request. Generate API keys at /dashboard/settings/api-keys.

Response

200 example

{
  "success": true,
  "data": {
    "id": "evalguard-gateway",
    "orgId": "00000000-0000-0000-0000-000000000000",
    "configSource": "org",
    "enabled": false,
    "providers": [
      {
        "name": "openai",
        "enabled": false,
        "models": [
          "string"
        ],
        "weight": 0,
        "priority": 0,
        "health": "<EvalGuard's own upstream connection stat>",
        "circuitState": "closed"
      }
    ],
    "routing": {
      "strategy": "string",
      "availableStrategies": [
        "priority"
      ]
    },
    "cache": {
      "enabled": false,
      "ttlSec": 0,
      "maxEntries": 0,
      "keyStrategy": "exact"
    },
    "rateLimiting": {
      "enabled": false,
      "requestsPerMinute": 0,
      "tokensPerMinute": 0,
      "onLimit": "reject"
    },
    "circuitBreaker": {
      "enabled": false,
      "failureThreshold": 0,
      "resetTimeoutMs": 0
    },
    "status": {
      "uptimeMs": 0,
      "totalRequests": 0,
      "activeProviders": 0
    }
  }
}

All status codes

200Gateway configuration
401Unauthorized — no valid credential was presented (AUTH_REQUIRED).
403Forbidden — the credential is valid but lacks the API-key scope, member role, or plan entitlement this operation requires.
429Too Many Requests — the per-key or per-organization rate limit was exceeded. Honour the Retry-After header.
500Internal Server Error — an unhandled error was converted to the standard error envelope (INTERNAL_ERROR).

Code samples

cURL

curl -X GET \
  https://evalguard.ai/api/v1/gateway \
  -H "Authorization: Bearer $EVALGUARD_API_KEY"

TypeScript

// The TypeScript SDK (@evalguard/sdk) exposes TYPED methods — runEval,
// getEval, runSecurityScan, checkFirewall, … — not a generic request().
// For an arbitrary endpoint, call it directly:

const res = await fetch("https://evalguard.ai/api/v1/gateway", {
  method: "GET",
  headers: { Authorization: `Bearer ${process.env.EVALGUARD_API_KEY}` },
});
console.log(res.status, await res.json());

Python

# The Python SDK (pip install evalguardai) exposes TYPED methods on
# EvalGuardClient — run_eval, get_eval, … — not a generic request().
# For an arbitrary endpoint, call it directly:

import os
import requests

headers = {"Authorization": f"Bearer {os.environ['EVALGUARD_API_KEY']}"}

response = requests.request("GET", "https://evalguard.ai/api/v1/gateway", headers=headers)
print(response.status_code, response.json())

Go

package main

import (
	"context"
	"fmt"
	"net/http"
	"os"
)

func main() {
	req, _ := http.NewRequestWithContext(context.Background(), "GET", "https://evalguard.ai/api/v1/gateway", nil)
	req.Header.Set("Authorization", "Bearer "+os.Getenv("EVALGUARD_API_KEY"))
	resp, err := http.DefaultClient.Do(req)
	if err != nil { panic(err) }
	defer resp.Body.Close()
	fmt.Println(resp.Status)
}

Errors

401403429500

Other Gateway endpoints