# How to point any base-URL tool at one local gateway with magpie

Repo: [yetone/magpie](https://github.com/yetone/magpie) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Aim scripts and apps that take an OpenAI, Anthropic or Gemini base URL at magpie's local address.

**Who it is for:** Builder with a script or editor tool that reads OPENAI_BASE_URL and wants it to use a different model

**The problem:** Tools that call one vendor's API cannot easily use other models or your pooled accounts.

**The outcome:** The tool sends requests to 127.0.0.1:3425 and gets answers from whichever model magpie routes to.

## Steps

1. Make sure magpie is running with at least one provider added
2. Run: export OPENAI_BASE_URL=http://127.0.0.1:3425/v1 OPENAI_API_KEY=magpie
3. Run your tool or script as usual
4. Check the Routing view to see the request arrive and which provider answered

## Prompt to paste into your agent

```text
Using yetone/magpie, configure <TOOL_NAME> to use the local gateway at 127.0.0.1:3425 via its base URL environment variables. Run one request and verify it shows up in magpie's Routing view.
```

## Caveat

A tool that hard-codes its API host or rejects custom base URLs will not work. One user also reported that some apps do not accept magpie as a provider.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/yetone-magpie/point-any-base-url-tool-at-local-gateway/
