Cursor, Trae & AI IDEs
Route AI-powered IDE features through SpendLil for spend visibility.
AI-native IDEs like Cursor, Trae, Windsurf (Codeium), and Continue.dev call AI providers on your behalf. SpendLil passes standard provider auth headers through unchanged, so any IDE that lets you override the base URL will work. Coverage below.
Continue.dev
Continue.dev is an open-source AI coding assistant for VS Code and JetBrains. It supports full configuration of API endpoints and custom headers — the cleanest integration path.
{
"models": [
{
"title": "GPT-4o (via SpendLil)",
"provider": "openai",
"model": "gpt-4o",
"apiKey": "sk-your-openai-key",
"apiBase": "https://openai.gateway.spendlil.ai/v1",
"requestOptions": {
"headers": {
"X-SpendLil-Key": "sl_abc123def456"
}
}
},
{
"title": "Claude Sonnet (via SpendLil)",
"provider": "anthropic",
"model": "claude-sonnet-4-5",
"apiKey": "sk-ant-your-key",
"apiBase": "https://anthropic.gateway.spendlil.ai",
"requestOptions": {
"headers": {
"X-SpendLil-Key": "sl_abc123def456"
}
}
}
]
} Cursor
Cursor supports custom OpenAI-compatible base URLs via Settings → Models. Point it at openai.gateway.spendlil.ai/v1 and enter your OpenAI key.
Cursor's Models settings don't currently expose a custom header field. If you need to inject X-SpendLil-Key without SpendLil seeing it in the provider auth header, use the local header injection proxy shown below.
Trae
Trae is a free AI IDE by ByteDance, built on VS Code, with access to Claude, GPT-4o, DeepSeek, and Gemini models.
As of April 2026, Trae IDE does not support custom base URLs for API endpoints. There's an open feature request on GitHub (Trae-AI/Trae #2076). Use the local proxy below.
Trae Agent CLI
Trae also offers trae-cli (Trae Agent), a standalone CLI tool that does support custom base URLs. Point it at the SpendLil gateway for the provider you use.
GitHub Copilot
GitHub Copilot uses a proprietary API channel and does not support custom base URLs. Copilot spend cannot be routed through SpendLil. You can manually add Copilot's fixed subscription cost to your budget tracking in the dashboard.
Local Header Injection Proxy
For IDEs that support a custom base URL but don't let you add custom headers, run this local proxy. It forwards requests to the SpendLil gateway and injects X-SpendLil-Key for you.
import http from 'node:http';
import https from 'node:https';
const SPENDLIL_KEY = process.env.SPENDLIL_KEY || 'sl_abc123def456';
const PROVIDER = process.env.PROVIDER || 'openai';
const GATEWAY = `${PROVIDER}.gateway.spendlil.ai`;
const PORT = 8787;
const server = http.createServer((req, res) => {
const headers = { ...req.headers };
headers['x-spendlil-key'] = SPENDLIL_KEY;
headers['host'] = GATEWAY;
const options = {
hostname: GATEWAY,
port: 443,
path: req.url,
method: req.method,
headers,
};
const proxy = https.request(options, (proxyRes) => {
res.writeHead(proxyRes.statusCode, proxyRes.headers);
proxyRes.pipe(res);
});
req.pipe(proxy);
proxy.on('error', (err) => {
console.error('Proxy error:', err.message);
res.writeHead(502);
res.end('SpendLil proxy error');
});
});
server.listen(PORT, () => {
console.log(`SpendLil proxy for ${PROVIDER} on http://localhost:${PORT}`);
console.log(`Set your IDE base URL to: http://localhost:${PORT}`);
}); # For OpenAI-based IDEs
PROVIDER=openai SPENDLIL_KEY=sl_abc123 node spendlil-proxy.mjs
# Then set IDE base URL to http://localhost:8787
# For Anthropic-based IDEs
PROVIDER=anthropic SPENDLIL_KEY=sl_abc123 node spendlil-proxy.mjs