Integration Guide
Connect your favorite coding agent to Twodelta in under 5 minutes. Our infrastructure provides top-tier model quality through a simple base URL swap.
Prerequisites
Before you begin, make sure you have:
- A Twodelta account (sign up here if you haven't already)
- An active subscription (view plans)
- Your API token (found in your Account Dashboard)
- A coding agent installed (Claude Code, Cursor, Cline, etc.)
Get Your API Token
After subscribing, navigate to your Account Dashboard to find your API token.
- Go to Account Management
- Under the Subscription tab, find the API Token section
- Click Copy to copy your token
Claude Code Integration
Claude Code is our primary supported agent. Here's how to configure it to use Twodelta.
Step 1: Set the environment variable
Add the Twodelta base URL and your API token to your shell profile:
# Twodelta Configuration
export ANTHROPIC_BASE_URL="https://api.twodelta.dev/v1"
export ANTHROPIC_API_KEY="your_api_token_here"Step 2: Restart your terminal
After saving your shell profile, restart your terminal or source the file:
source ~/.zshrc # or source ~/.bashrcStep 3: Launch Claude Code
Start Claude Code as usual. It will automatically use the Twodelta endpoint:
claudeThat's it! Claude Code will now route through Twodelta, giving you top-tier model quality at a fraction of the cost.
Cursor Integration
To use Twodelta with Cursor, configure it as a custom OpenAI-compatible provider:
Step 1: Open Cursor Settings
Go to Cursor Settings → Models → OpenAI API Key.
Step 2: Configure the endpoint
Base URL: https://api.twodelta.dev/v1
API Key: your_api_token_here
Model: twodelta-coderStep 3: Select the model
In the model picker, select twodelta-coder as your active model.
Cline / Other Agents
Any coding agent that supports custom OpenAI-compatible endpoints can use Twodelta. The general setup is:
{
"apiProvider": "openai-compatible",
"baseUrl": "https://api.twodelta.dev/v1",
"apiKey": "your_api_token_here",
"model": "twodelta-coder"
}For Cline specifically, go to Settings → API Provider and select OpenAI Compatible, then enter the values above.
API Details
| Property | Value |
|---|---|
| Base URL | https://api.twodelta.dev/v1 |
| Authentication | Bearer token (your API key) |
| Protocol | OpenAI-compatible REST API |
| Streaming | Supported (SSE) |
| Rate Limits | Based on your subscription plan |
Available Models
| Model ID | Description | SWE-bench |
|---|---|---|
| twodelta-coder | Qwen2.5-Coder-7B — fast, capable coding model served by Twodelta | — |
More models coming soon. Your subscription grants access to all available models.
Troubleshooting
Authentication Error (401)
Double-check your API token. Make sure it has been correctly copied from your dashboard without trailing spaces.
echo $ANTHROPIC_API_KEY
# Should output your API key from the dashboardConnection Timeout
Ensure your network allows outbound HTTPS connections to api.twodelta.dev. If you're behind a corporate proxy, you may need to configure it.
Model Not Found (404)
Make sure you're using a valid model ID. Currently the only available model is twodelta-coder.
Rate Limit Exceeded (429)
You've exceeded your plan's quota. Check your usage in the Account Dashboard. Consider upgrading your plan for higher limits.