AI Gateway

Get branch AI Gateway endpoint

Changed on

Returns the AI Gateway endpoint host for the specified branch, used to render code-snippet base URLs. A 200 response means the branch is registered and this region serves the AI gateway. A 404 response includes a reason field indicating why the gateway is unavailable.

Note: This endpoint is currently in Beta.

get/projects/{project_id}/branches/{branch_id}/ai_gateway

Request

  • Base URL: https://console.neon.tech/api/v2
  • URL: https://console.neon.tech/api/v2/projects/{project_id}/branches/{branch_id}/ai_gateway
  • Auth: one of:
    • HTTP bearer
    • API key in cookie zenith
    • API key in cookie keycloak_token

Response

AI Gateway is enabled for this branch

enabledboolean required

Always true in 200 responses. Present for forward compatibility, mirroring BranchStorage.enabled.

base_urlstring uri required

The AI-gateway endpoint root for this branch — an OpenAI-compatible base URL. No dialect path is included; clients append the route (e.g. /ai-gateway/openai/v1/responses) themselves.

Example response

{
  "base_url": "https://br-cool-moon-42-api.ai.c-2.local.neon.build"
}

Changes