Configure
- Sidebar → AI Gateway → Providers → Create.
- Set Provider Type to Custom and give it a name.
- Select every API capability the upstream speaks. You can add any combination.
- Choose Routing Mode. For Upstream URL, paste the base URL. For Site Targets, add targets after save.
- Pick Auth Type and paste a key if that type needs one.
- Set Allow and Block lists. Add exact model keys if you want them listed in
GET /v1/models. See Model Routing. - Save, then attach the provider to an AI Gateway resource.
Reach a Self-Hosted API
Site Targets send the request over a Pangolin tunnel to a host Newt can reach. Install a site on the same network as the model server so the gateway can route to that API over the tunnel. See Understanding Sites. After the site is connected, add the process as a target on the provider’s Network tab (host, port, HTTP or HTTPS). Worked examples: Ollama, vLLM, and Bifrost.AI Gateway providers are only routed to the Pangolin server nodes. Sites
that are connected to remote nodes will not be accessible to be routed to as
targets on providers. DNS resolution of gateway resources will not point at
remote nodes. Users using gateway resources with custom targets on sites may
wish to create a separate org for these resources so sites are able to
connect to regular nodes.
Examples
Worked Custom setups:- Ollama: local models on a site, OpenAI Chat Completions
- vLLM: a vLLM OpenAI server on a site
- Bifrost: downstream model routing with Pangolin identity headers
- Cloud APIs Through a Site: send OpenAI or Anthropic out through a site so the vendor sees that site’s IP
Example: Kimi K2
This is one custom setup: Moonshot AI’s Kimi K2 endpoint speaks the Anthropic API, so you select Anthropic capabilities. A different upstream would get a different capability set.- Create a Custom provider.
- Select Anthropic Messages and Anthropic Models.
- Set routing to Upstream URL and use Moonshot’s Anthropic-compatible base URL.
- Set auth to
x-api-keyand paste the Moonshot key. - Allow the Kimi model ids you plan to call.
- Attach the provider to a resource, then point Claude Code or Claude Desktop at that resource.

