
Originally published on cloudgpu.app.
Most coding agents let you swap the model behind them by changing one setting: the OpenAI-compatible base URL. This post shows how to put DeepSeek V4 behind Cursor, Continue, Cline and aider using the CloudGPU gateway, paid from one prepaid balance. Switching back later is the same one-field change.
Disclosure: I work on CloudGPU.
The three values every tool needs
| Setting | Value |
|---|---|
| Base URL | https://cloudgpu.app/v1 (no trailing slash) |
| API key | a cgw-sk-... key from the API console, stored in $CGW_API_KEY |
| Model ID | deepseek-v4-flash, deepseek-v4.1-flash or deepseek-v4-pro |
The model IDs are copied from the model table on the live API page (checked 2026-10-27). Type them exactly: a wrong case or a missing dot returns 400 model_not_found.
Step 1: Get a key
- Sign up at cloudgpu.app with an email address or a Google account.
- Open the API console, create a key (name it after the tool, e.g.
cursor) and copy it. It starts withcgw-sk-and is shown only once, so keep it in a password manager. - Put it in an environment variable so it stays out of your code and dotfiles:
export CGW_API_KEY="cgw-sk-..."
Step 2: Check the key with curl
curl https://cloudgpu.app/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $CGW_API_KEY" \
-d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":"hello"}]}'
A JSON reply with choices[0].message.content means the key and balance work. To list the model IDs your key can use, call GET https://cloudgpu.app/v1/models with the same Authorization header. Without a key it returns 401 with missing_authorization, which is expected.
The same check from the openai Python package, if your agent framework is built on it:
# pip install openai
import os
from openai import OpenAI
client = OpenAI(
base_url="https://cloudgpu.app/v1",
api_key=os.environ["CGW_API_KEY"],
)
resp = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[{"role": "user", "content": "Explain what this regex matches: ^\\d{3}-\\d{4}$"}],
)
print(resp.choices[0].message.content)
Step 3: Cursor
Per Cursor's help page on using your own API key, open Cursor Settings > Models and paste your cgw-sk-... key into the API key field. That page doesn't cover the base URL. As of 2026-10-27, per Cursor staff on the forum, using your own key through the base URL override "is an officially supported setup" (forum thread). Turn on the option to override the base URL and set it to https://cloudgpu.app/v1. Then add deepseek-v4-flash (or deepseek-v4.1-flash / deepseek-v4-pro) as a custom model and select it in Chat. Setting names change between Cursor versions, so follow what your build shows.
Two things to know, per Cursor: custom API keys only work with chat models, and Tab completion keeps using Cursor's built-in models. As of 2026-10-27, per Cursor staff on the forum (same thread), while the base URL override is on, requests for Cursor's own models go to the custom endpoint too, so turn the override off when you switch back to them.
Step 4: Continue
Per the Continue docs, the current config format is config.yaml (~/.continue/config.yaml; the older config.json is deprecated). It uses the openai provider for any OpenAI-compatible endpoint; you change apiBase.
The Continue docs say the VS Code and JetBrains extensions can't read variables exported in your shell, so put the key in ~/.continue/.env (plain NAME=value, no quotes):
CGW_API_KEY=cgw-sk-...
Then reference it from config.yaml:
name: CloudGPU
version: 0.0.1
schema: v1
models:
- name: DeepSeek V4 Flash (CloudGPU)
provider: openai
model: deepseek-v4-flash
apiBase: https://cloudgpu.app/v1
apiKey: ${{ secrets.CGW_API_KEY }}
roles: [chat, edit, apply]
If your config.yaml already has name, version and schema, add only the model entry. Restart the IDE after editing .env, and don't commit a .env file that contains the key. Swap the model: line for deepseek-v4.1-flash or deepseek-v4-pro to try the others.
Step 5: Cline
Per the Cline docs, open the Cline settings panel, set API Provider to "OpenAI Compatible" and fill in three fields: Base URL https://cloudgpu.app/v1, your API key, and model ID deepseek-v4-flash, deepseek-v4.1-flash or deepseek-v4-pro. Run a small task first to check the model handles your workflow before you hand it a long one.
Step 6: aider
The aider docs connect to any OpenAI-compatible endpoint through OPENAI_API_BASE and OPENAI_API_KEY, with the model name prefixed by openai/. Reuse the key you already exported:
export OPENAI_API_KEY="$CGW_API_KEY"
export OPENAI_API_BASE=https://cloudgpu.app/v1
aider --model openai/deepseek-v4-flash
Any other framework that accepts an OpenAI-compatible base URL takes the same two values.
Which DeepSeek ID to pick
All three IDs are in the model table on the API page, each with its own rate. deepseek-v4-flash is the model used in the API docs examples, so start there. Then try deepseek-v4.1-flash or deepseek-v4-pro on a real task in your agent and keep the one that fits. Check DeepSeek's own docs for each model's context length and reasoning behaviour.
If a reply comes back with an empty content and finish_reason="length", raise max_tokens or leave it unset.
Paying for it
Usage is paid per token from a prepaid balance; there's no subscription, and the balance doesn't expire. Top up on the billing page by card, Alipay, Google Pay, Apple Pay, or USDT on TRC-20. Rates change, so this post doesn't repeat them: the per-token rate for each model is in the table on the CloudGPU API page. GPU rental rates are on /pricing, and the same balance pays for both.
Troubleshooting
- Cursor rejects the key: check the base URL is exactly
https://cloudgpu.app/v1and the key has no leading or trailing spaces. 429 rate_limit_exceeded: the public-beta default is 100 requests per minute per API key and 10,000 requests per day per account. Use a second key for parallel agents, or email support to raise the limit.402 insufficient_balance: top up on the billing page.- Streaming stops mid-answer: check whether the tool has a request timeout setting and raise it.
CloudGPU is in public beta with no SLA. If a model returns 503 upstream_not_configured, the API docs say it is temporarily unavailable: retry later or use another model.
FAQ
Which base URL do I use in Cursor, Continue or Cline?https://cloudgpu.app/v1, with a cloudgpu.app API key that starts with cgw-sk-.
Which DeepSeek model IDs can I use?deepseek-v4-flash, deepseek-v4.1-flash and deepseek-v4-pro, as listed on the API page. Add the ID as a custom model in the tool and select it.
Does this change Cursor tab completion? No. Per Cursor's docs, custom API keys only work with chat models, and Tab completion keeps using Cursor's built-in models.
Are embeddings supported? Not yet, per the API docs. If your tool needs an embeddings model for codebase indexing, configure that separately.
Comments
Join the discussionNo comments yet. Be the first to comment.


