Provided by Spendplane Docs Assistant
how to set up base url
## Quick‑start: Point Your Tool at the Spendplane Proxy
1. **Connect your workspace** (creates the Shadow Plane & gives you a public proxy URL)
```bash# 1️⃣ Initialise a new workspace (once per project)
spendplane init
# 2️⃣ Authenticate & spin up the proxy
spendplane connect
```
After `spendplane connect` finishes, the CLI prints something like:
```
✅ Proxy ready → https://proxy.spendplane.com/v1```
That URL **is the base URL** you’ll give to any LLM‑aware tool.
2. **Set the base URL in your client**
| Tool / Environment | Where to set it | Example value |
|--------------------|----------------|---------------|
| **VS Code** (extension) | Settings → *OpenAI: Base URL* | `https://proxy.spendplane.com/v1` |
| **Cursor** | Settings → *OpenAI > Base URL* | `https://proxy.spendplane.com/v1` |
| **Bolt / v0** | Environment variable | `OPENAI_BASE_URL=https://proxy.spendplane.com/v1` |
| **Node / Express** (SDK) | `fetch`/`axios` endpoint | `https://proxy.spendplane.com/v1` |
| **Custom CLI / Scripts** | Any HTTP client’s endpoint config | `https://proxy.spendplane.com/v1` |
> **Note:** Spendplane speaks the **OpenAI‑compatible `/v1` API**, so you can keep the exact same request shape you already use (just swap the host).
3. **(Optional) Verify the connection**
```bash
spendplane status # shows the current proxy URL and health
spendplane logs # streams real‑time proxy activity (good for debugging)
```
If you need to change the endpoint later, run `spendplane connect` again – it will output a new URL and automatically update your local config files.
### Example: Setting the URL via an environment variable
```bash
# .env (or export in your shell)
OPENAI_BASE_URL=https://proxy.spendplane.com/v1```
Then, in your code:
```javascriptimport { Configuration, OpenAIApi } from "openai";
const config = new Configuration({
apiKey: process.env.SPENDPLANE_API_KEY, // your Spendplane-managed key
baseURL: process.env.OPENAI_BASE_URL, // <-- points to Spendplane
});
export const openai = new OpenAIApi(config);
```
### TL;DR Command Flow
```bash
spendplane init # set up workspace metadata
spendplane connect # spins up the Shadow Plane & prints the proxy URL
# → copy the printed URL, e.g. https://proxy.spendplane.com/v1
# → configure your tool (VS Code, Cursor, Bolt, env var, etc.) to use that URL
```
That’s all you need to have **all** LLM traffic routed through Spendplane’s governance, routing, and observability layer. Happy routing! 🚀
?
AI
Did this help? Spendplane AI continuously learns from search interactions to refine the Engineering Manual.