How to Use ToksHub with Cursor
Configure Cursor against one endpoint so setup and review stay aligned with the rest of your team tooling.
Step 1: Get Your API Key
- Visit the dashboard
- Sign up or log in
- Go to API Keys → Create New Key
- Copy the key
Step 2: Configure Cursor
Method A: Via Cursor Settings UI
- Open Cursor
- Press
Cmd+,(macOS) orCtrl+,(Windows/Linux) - Search for "OpenAI"
- Set OpenAI API Base URL to:
https://api.tokshub.com/v1 - Set OpenAI API Key to your ToksHub key
Method B: Via settings.json
{
"openai.apiBaseUrl": "https://api.tokshub.com/v1",
"openai.apiKey": "sk-your-key"
}Step 3: Verify
- Open a file in Cursor
- Use
Cmd+K(orCtrl+K) to open the AI command bar - Type a simple prompt like "Add a comment explaining this function"
- Check your dashboard to confirm the request was routed
Model Recommendations
| Task | Model Tier | Why |
|---|---|---|
| Quick edits, autocomplete | Fast / mini model | Low latency, low cost |
| Code generation | Balanced frontier model | Best code quality per dollar |
| Complex refactoring | Most capable frontier model | Handles large context and reasoning |
| Documentation | Balanced frontier model | Good quality, affordable |
| Exploration / prototyping | Budget model | Very low cost |
Call GET /v1/models with your API key for the current list of available model IDs.
Troubleshooting
- Model not found — Call
GET /v1/modelsfor the current list of available models - Auth failed — Verify your ToksHub key is correct
- Timeout — Check status