Gateways and proxies

Route a provider's requests through your own host, such as a LiteLLM proxy, a corporate egress proxy or an AI gateway, while keeping your normal model selection. Set the base URL under Set up a proxy or gateway on the provider's setup card, or in your workflow env::

ProviderVariableDefault base URLRequest
AnthropicANTHROPIC_BASE_URLhttps://api.anthropic.comPOST /v1/messages
OpenAIOPENAI_BASE_URLhttps://api.openai.com/v1POST /responses
GoogleGEMINI_BASE_URLhttps://generativelanguage.googleapis.com/v1betaPOST /models/<model>:streamGenerateContent
xAIXAI_BASE_URLhttps://api.x.ai/v1POST /responses
DeepSeekDEEPSEEK_BASE_URLhttps://api.deepseek.com/v1POST /chat/completions
Moonshot AIMOONSHOT_BASE_URLhttps://api.moonshot.ai/v1POST /chat/completions
Kimi CodeKIMI_BASE_URLhttps://api.kimi.com/coding/v1POST /chat/completions
MetaMETA_MODEL_BASE_URLhttps://api.meta.ai/v1POST /responses

The base URL replaces the default one, path included, and the request path is appended to it. The gateway receives the provider's own model IDs and API key.

  • Under Smart, every rung of the provider's ladder goes through the gateway, so it has to serve each rung's model ID. Pullfrog moves a rung to a newer model when one ships, and the gateway has to serve that ID too.
  • Pullfrog skips its pre-run credential check for a gateway, so a gateway that refuses the credential reports its own error in the run.
  • With an API key and a Claude or Grok subscription both connected, a run through the gateway pays with the API key. A subscription with no API key beside it is sent to the gateway.
  • A credential embedded in the base URL is not treated as one.
  • Google, xAI, DeepSeek, Moonshot AI, Kimi Code and Meta need Pullfrog 0.1.131 or later.

Other providers take other routes. Azure OpenAI builds its endpoint from AZURE_RESOURCE_NAME, and a gateway with its own model list belongs on OpenAI-compatible endpoints.

Anthropic

Anthropic models run through Claude Code, which honors ANTHROPIC_BASE_URL natively and talks to the gateway in Anthropic's own format, so prompt caching and extended thinking survive the hop.

Pick the credential variable by the header your gateway reads. A gateway that reads the other header answers 401.

.github/workflows/pullfrog.yml
env:
  ANTHROPIC_BASE_URL: https://gateway.internal.example.com
  ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
env:
  ANTHROPIC_BASE_URL: https://gateway.internal.example.com
  ANTHROPIC_AUTH_TOKEN: ${{ secrets.GATEWAY_TOKEN }}

This route serves Claude models only. Anthropic doesn't support routing Claude Code to non-Claude models through a gateway, so use OpenAI-compatible endpoints for a provider's /anthropic endpoint that serves its own models.

OpenAI

The OPENAI_BASE_URL variable re-points the OpenAI provider, which speaks the Responses API (POST /v1/responses). Point it at a gateway that serves that endpoint.

.github/workflows/pullfrog.yml
env:
  OPENAI_BASE_URL: https://gateway.internal.example.com/v1
  OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

Most third-party gateways speak the older Chat Completions API (POST /v1/chat/completions), which is what "OpenAI-compatible" usually means. For one of those, use OpenAI-compatible endpoints instead.

Custom headers

A gateway can require more than a key, such as the service token of an access proxy. Set its extra headers under Send custom headers on the provider's setup card, or in your workflow env:, one Name: Value per line:

EndpointVariable
Anthropic gatewayANTHROPIC_CUSTOM_HEADERS
OpenAI gatewayOPENAI_CUSTOM_HEADERS
Google gatewayGEMINI_CUSTOM_HEADERS
xAI gatewayXAI_CUSTOM_HEADERS
DeepSeek gatewayDEEPSEEK_CUSTOM_HEADERS
Moonshot AI gatewayMOONSHOT_CUSTOM_HEADERS
Kimi Code gatewayKIMI_CUSTOM_HEADERS
Meta gatewayMETA_MODEL_CUSTOM_HEADERS
OpenAI-compatible endpointOPENAI_COMPATIBLE_HEADERS

An OpenAI gateway behind Cloudflare Access takes two:

.github/workflows/pullfrog.yml
env:
  OPENAI_BASE_URL: https://gateway.internal.example.com/v1
  OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
  OPENAI_CUSTOM_HEADERS: |
    CF-Access-Client-Id: ${{ secrets.CF_ACCESS_CLIENT_ID }}
    CF-Access-Client-Secret: ${{ secrets.CF_ACCESS_CLIENT_SECRET }}

Each variable applies to its own endpoint and no other. A run that moves to another provider, through --model or a fallback, leaves the headers behind.

Pullfrog treats the variables as secrets and masks them in logs. A line that isn't a header fails the run before the agent starts, and the error names the line number. Custom headers need Pullfrog 0.1.122 or later, except ANTHROPIC_CUSTOM_HEADERS on Claude Code, which reads that variable itself.

© 2026 Pullfrog, Inc.

On this page