---
title: "Retrieve AI Gateway configuration"
method: GET
path: "/v1/ai-gateway"
---

# Retrieve AI Gateway configuration

`GET /v1/ai-gateway`

## Request

- Base URL: `https://api.runbear.io`
- URL: `https://api.runbear.io/v1/ai-gateway`
- Auth: HTTP bearer

Retrieve the organization-level Cloudflare AI Gateway configuration. While its `enabled` flag is true it applies to every Anthropic and OpenAI agent that does not set its own `aiGateway` override on create or update agent; while false no agent routes through it. A disabled configuration is still returned here. The API token is never returned.

## Response `200`

Default Response

- AiGatewayConfig
  - `cloudflareAccountId` string, required: Cloudflare account ID
  - `gatewayName` string, required: Cloudflare AI Gateway name
  - `enabled` boolean, required: Whether routing through the gateway is active

## Other responses

- `204`: No gateway configured
- `403`: The organization is not entitled to AI Gateway; `code` is `forbidden_ai_gateway_not_permitted`. Terminal until the plan changes.

---

[API](https://skmtc.dev/runbear/apis/runbear-api.md) - [All operations](https://skmtc.dev/runbear/apis/runbear-api/llms.txt) - [OpenAPI document](https://skmtc.dev/runbear/apis/runbear-api/revisions/c6a9c3066a5a?raw)
