AI code editors like Cursor, Roo Code, and Cline are powerful β but their built-in pricing can add up. Most of these tools support "bring your own key" (BYOK), letting you route API calls through your own endpoint.
Here's how to set up each tool with a custom API gateway.
Why BYOK?
Cost control : Pay per token instead of flat subscriptions
Model flexibility : Switch between Claude, GPT, and Gemini without changing tools
No rate limits : Your usage, your limits
Unified billing : One dashboard for all model costs
Cursor
Cursor supports custom API endpoints through its settings:
Open Settings β Models
Under OpenAI API Key , enter your gateway key
Set OpenAI API Base to your gateway URL:
https://futurmix.ai/v1
Enter fullscreen mode
Exit fullscreen mode
Select your preferred model from the dropdown
Now Cursor routes all AI requests through your gateway.
Roo Code (VS Code Extension)
Roo Code has built-in support for OpenAI-compatible providers:
Open Roo Code settings in VS Code
Select OpenAIβ¦