AI Gateway is now available: identity-aware access to any AI provider, eliminate API keys, and tunnel to self-hosted models. Get started

AI GatewayProvidersCustom

Cloud APIs Through a Site

Send OpenAI or Anthropic traffic out through a Pangolin site so the vendor sees a fixed egress IP

Typed OpenAI and Anthropic providers send requests from the Pangolin node's own egress. A Custom provider with Site Targets sends the same APIs out through a chosen site, so OpenAI or Anthropic see that site's public IP.

Use this when the vendor allowlists IPs, or all inference must leave from one network. The site is only the egress path. Auth still lives on the provider: paste the real vendor key.

Those typed provider types use Upstream URL only. This walkthrough uses Custom plus targets.

See Capabilities for the full capability list.

Configure

  1. Pick a site that can reach the public internet. That box's public IP is what the vendor will see.

  2. Sidebar → AI Gateway → Providers → Create. Set Provider Type to Custom.

  3. Select capabilities that match the cloud API:

    • OpenAI: OpenAI Chat Completions and OpenAI Responses
    • Anthropic: Anthropic Messages and Anthropic Models
  4. Set Routing Mode to Site Targets.

  5. Set Auth Type to Bearer for OpenAI, or x-api-key for Anthropic, and paste the vendor API key.

  6. Allow the model ids you plan to call, then save.

  7. On the Network tab, add a target on that site. Use the API hostname as the address so TLS Host and SNI match:

    VendorAddressPortMethod
    OpenAIapi.openai.com443HTTPS
    Anthropicapi.anthropic.com443HTTPS

    The target address is sent as the Host header.

  8. Attach the provider to an AI Gateway resource.

The site must resolve and reach that hostname. Clients still point at the resource URL, not at OpenAI or Anthropic directly: Codex, Claude Code, and the other client guides.

Was this page helpful?

⌘I

On this page