Cursor API from Türkiye: Using AI Code Assistants (Cursor, Cline, Continue.dev, aider) with One Key
Every AI code assistant that supports a custom OpenAI-compatible base_url — Cursor, Cline, Continue.dev, and aider — works with Onysoft AI Gateway: set the base_url field in the tool's settings to https://api.onysoft.com/v1 and paste your sk-ony- key. Claude Code cannot connect directly because it requires Anthropic's native protocol; you can reach the same Claude models through Cursor or Cline instead.
Code assistants have become the fastest-growing line item in API consumption: every chat, every edit, and every agent step is an API request under the hood. For a developer working from Türkiye the problem is two-layered — tool subscriptions and API payments demand a foreign card, and seeing what each request actually cost is hard.
This guide walks through the setup of all four tools step by step, gives an honest answer to the Claude Code question, and shares data you will not find elsewhere for this query: a realistic developer scenario costed model by model in lira, the cost field returned in every response, and latency measured across 6,959 production requests over the last 14 days.
Which AI Code Assistants Work with Onysoft?
Every tool that supports a custom API key and a base_url override works; the only deciding question is whether the tool sends its requests in the OpenAI chat/completions schema. Because Onysoft exposes that schema exactly, any tool with an "OpenAI Compatible" or "Override Base URL" option reaches all 739+ models in the catalog with a single sk-ony- key. The status table:
| Tool | Custom base_url | Where to set it | Status with Onysoft |
|---|---|---|---|
| Cursor | Yes ("Override OpenAI Base URL") | Settings → Models → API Keys | Works (except Tab completion, see below) |
| Cline (VS Code) | Yes ("OpenAI Compatible" provider) | Extension settings | Works |
| Continue.dev | Yes (apiBase) | config.yaml | Works |
| aider (terminal) | Yes (OPENAI_API_BASE) | Environment variable / flag | Works |
| Claude Code | No (Anthropic-native protocol) | — | Does not work directly (honest section below) |
Streaming — non-negotiable for code assistants — is covered too: responses arrive over SSE, so the first token shows up in your editor early. For the general base_url migration logic, the OpenAI SDK migration guide is the base reference.
Tool-by-Tool Setup: Cursor, Cline, Continue.dev, and aider
In all four tools the setup reduces to the same three values: the base_url (https://api.onysoft.com/v1), your sk-ony- key, and a model name from the catalog. Tool by tool:
Cursor: Go to Cursor Settings → Models → API Keys. Paste your sk-ony- key into the OpenAI API Key field, enable Override OpenAI Base URL right below it, enter https://api.onysoft.com/v1, and click Verify. Add the catalog name (for example anthropic/claude-sonnet-5) to the model list via + Add model. Honest note: Cursor features that run on its own proprietary models — Tab completion above all — do not work with a custom key; the custom key applies to chat and Composer.
Cline: Open the extension settings in VS Code and pick OpenAI Compatible as the API Provider. Base URL: https://api.onysoft.com/v1, API Key: your sk-ony- key, Model ID: the catalog name. Cline's agent mode flows through the same endpoint; we cover the cost side separately below.
Continue.dev: Add a model block to your config.yaml:
models:
- name: Claude Sonnet 5 (Onysoft)
provider: openai
model: anthropic/claude-sonnet-5
apiBase: https://api.onysoft.com/v1
apiKey: sk-ony-YOUR_KEYaider: The terminal-based agent recognizes OpenAI-compatible endpoints via environment variables:
export OPENAI_API_BASE=https://api.onysoft.com/v1
export OPENAI_API_KEY=sk-ony-YOUR_KEY
aider --model openai/anthropic/claude-sonnet-5The openai/ prefix tells aider "send this model to the OpenAI-compatible endpoint"; everything after the prefix is the model name in the Onysoft catalog. The same prefix works for any catalog model — openai/deepseek/deepseek-v4-flash, for example.
The Honest Answer on Claude Code: It Does Not Work Directly
Claude Code speaks Anthropic's own native protocol (/v1/messages) and does not work directly with OpenAI-schema gateways — Onysoft included. The Onysoft endpoint serves the OpenAI chat/completions schema; the Anthropic-native protocol uses a different request and response body. Changing the base_url in Claude Code is therefore not enough, and we will not market it to you as "basically works".
There are two honest architectural paths:
- Same models, different interface: The models Claude Code runs on —
anthropic/claude-sonnet-5andanthropic/claude-opus-5— are in the Onysoft catalog. You can work with the same models through Cursor, Cline, or Continue.dev, on a lira balance and with per-request cost breakdowns. If you want a terminal agent, aider is the closest substitute. - Hybrid use: Keep Claude Code on its own subscription and run your production API, automations, and other tools through Onysoft. The two layers do not exclude each other.
For the broader picture on using Claude models via API from Türkiye, see the Claude API Türkiye guide.
How It Works on Onysoft: One Key, Per-Tool Limits, and a cost Field in Every Response
You can verify the setup and preview cost tracking with two curl commands before touching any tool. First test the key and endpoint — /v1/models lists the entire catalog:
curl https://api.onysoft.com/v1/models \
-H "Authorization: Bearer sk-ony-YOUR_KEY"Once a tool is connected, every request it sends returns the standard usage block plus an Onysoft-specific cost field:
{
"model": "anthropic/claude-sonnet-5",
"choices": [ ... ],
"usage": { "prompt_tokens": 4000, "completion_tokens": 1000 },
"cost": 0.027
}That $0.027 is not an estimate but the exact amount deducted from your balance: 4,000 input tokens × $3/1M + 1,000 output tokens × $15/1M. Tools like Cline compute their own approximate cost estimates; the cost field gives you the precise figure the gateway actually charged.
For multi-tool use there are two more layers of protection:
- Per-key limits: Generate a separate key per tool (one for Cursor, one for Cline) and set a spending limit on each. The dashboard shows a per-tool breakdown.
- Cost pre-check: Before any request is processed, its estimated cost is checked against your balance with a 1.2 safety factor; if the balance will not cover it, the request is rejected with
402. An agent loop cannot silently drive your balance negative.
What Does a Code Assistant Cost per Month? A Realistic Scenario
A realistic baseline for a daily active developer — 50 requests a day, roughly 4,000 input + 1,000 output tokens per request, 22 working days a month — comes to $29.70 a month with Claude Sonnet 5, about ₺1,412. The heavy input side is no accident: a code-assistant request is not a short question; the system prompt, open file contents, and diff context all go in together. The scenario's monthly total is 4.4M input + 1.1M output tokens; the math per model:
| Model | Input cost ($/mo) | Output cost ($/mo) | Total ($/mo) | Total (TRY/mo) |
|---|---|---|---|---|
anthropic/claude-opus-5 | $33.00 | $41.25 | $74.25 | ₺3,530.96 |
anthropic/claude-sonnet-5 | $13.20 | $16.50 | $29.70 | ₺1,412.38 |
google/gemini-3.6-flash | $9.90 | $12.38 | $22.28 | ₺1,059.29 |
openai/gpt-5.6-terra | $6.60 | $9.90 | $16.50 | ₺784.66 |
openai/gpt-5.6-luna | $0.66 | $0.99 | $1.65 | ₺78.47 |
deepseek/deepseek-v4-flash | $0.92 | $0.46 | $1.39 | ₺65.91 |
Measured: August 5, 2026 — api.onysoft.com live catalog sale prices. Scenario: 22 working days × 50 requests × (4,000 input + 1,000 output tokens) = 4.4M input + 1.1M output. TRY equivalents calculated at the August 5, 2026 TCMB rate (1 USD = 47.555 TRY).
Two warnings: first, agent modes (Cline's autonomous loop, aider's multi-step edits) fire multiple requests per task, so consumption can run at multiples of this baseline — exactly why you monitor via the cost field and cap via key limits. Second, the roughly 54x spread in the table (₺65.91 to ₺3,530.96) shows that model choice is the decision that actually sets your invoice: economy class for routine edits, flagship for hard refactors. If you would rather delegate the choice, set the model field to onysoft/auto — OnyRouter analyzes each request and routes it to the right class, and routing is free. Build your own scenario in the cost calculator.
What About Speed? Real Latency Data and Practical Recommendations
Across 6,959 successful requests through the gateway in the last 14 days, average end-to-end response time was 3.8 seconds and the fastest response was 0.3 seconds — what shapes the code-assistant experience is not the gateway layer but the generation speed of the model you pick. The 0.3-second floor shows how thin the layer is with lightweight models; the 3.8-second average is pulled up by long-generation flagship and reasoning requests. With streaming, the first token arrives far earlier in every case.
Practical recommendations:
- Fast edits and short questions:
openai/gpt-5.6-lunaordeepseek/deepseek-v4-flash— the sub-second class, under ₺100 a month in the scenario above. - Daily main model:
anthropic/claude-sonnet-5oropenai/gpt-5.6-terra— the quality/cost balance. - Hard refactors and architecture decisions:
anthropic/claude-opus-5— few but critical requests. - No decision fatigue:
onysoft/auto.
To start, open a free account, generate your key, and try the same coding prompt across several models side by side in the Playground before wiring up your tool. For the broader picture, the AI API guide is a good next stop.
Last updated: August 5, 2026 · Data: api.onysoft.com live catalog
Frequently Asked Questions
Can I use my own API key in Cursor from Türkiye?
Yes. In Cursor Settings → Models → API Keys, paste your sk-ony- key into the OpenAI API Key field and set Override OpenAI Base URL to https://api.onysoft.com/v1. You top up your balance in lira and track usage per request. The one exception: Tab completion runs on Cursor's own models and does not work with a custom key; chat and Composer do.
Which base URL should I enter for Cline?
In Cline's settings pick OpenAI Compatible as the API Provider; enter https://api.onysoft.com/v1 as the Base URL, your sk-ony- key as the API Key, and a catalog model name (for example anthropic/claude-sonnet-5) as the Model ID. Streaming is supported on the same endpoint, and agent mode runs on the same key.
Does Claude Code work with Onysoft?
Not directly. Claude Code requires Anthropic's native protocol, while Onysoft serves the OpenAI chat/completions schema. However, the models Claude Code runs on (anthropic/claude-sonnet-5, anthropic/claude-opus-5) are in the catalog: you can reach the same models through Cursor, Cline, or Continue.dev on a lira balance.
How much does an AI code assistant cost per month via API?
In a daily-active-developer scenario (22 working days × 50 requests a day × 4,000 input + 1,000 output tokens), Claude Sonnet 5 comes to $29.70 ≈ ₺1,412 a month; in the economy class (gpt-5.6-luna or deepseek-v4-flash) it drops below ₺80. Agent modes can multiply consumption; the cost field in every response shows actual spend per request. Measured: August 5, 2026 prices.
Which features stop working in Cursor with a custom API key?
Features that run on Cursor's own proprietary models — Tab (autocomplete) above all — do not work with a custom key; that is Cursor's design decision, independent of the gateway. Chat and Composer work fully with a custom key. If you want inline autocomplete on your own key too, Continue.dev supports that role explicitly.
How do I control the spend of several code assistants separately?
Generate a separate sk-ony- key for each tool and set a spending limit per key; the dashboard shows a per-tool breakdown. On top of that, each request's estimated cost is checked against your balance with a 1.2 safety factor before processing, and rejected with 402 if it will not fit — an agent loop cannot silently drain your balance.
Related pages
Ready to build?
Access 739+ AI models through a single API. Pay as you go — no subscription.