Using the TechNext AI gateway (DeepSeek)
Fastest: let your AI agent set it up
Paste this into your AI agent: (Claude Code, Codex, Cline, opencode, Cursor agent…). Replace the last part with your key.
Set up my AI tools to use the TechNext AI gateway. Follow https://ai.technext.com.vn/agent-setup.md exactly. My key: <your tnk_ key>In the ERP, the My AI setup page shows this prompt with your key already filled in, so you can copy it from there.
The agent stores your key as a user environment variable and configures the tools it finds (Claude Code, opencode, Continue). For Cline and Cursor it tells you exactly where to click.
Manual setup
Nathan gives you a personal key that starts with tnk_. Use it in place of your own DeepSeek key.
Keep it private. If it leaks, ask Nathan for a new one. A new key turns off the old one.
| Setting | Value |
|---|---|
| OpenAI-compatible base URL | https://ai.technext.com.vn/v1 |
| Anthropic-compatible base URL | https://ai.technext.com.vn/anthropic |
| API key | your tnk_… key |
| Model | deepseek-flash (DeepSeek V4.1 Flash, 1M context). Use deepseek-v4-pro only when you need it: it costs about 4× more. |
Every request counts against your daily budget (default 10 USD per day). There is also a company-wide daily limit. Both reset at midnight Vietnam time.
While a request runs, the gateway reserves a safe upper estimate of its cost and then corrects it to the real cost. This means you may be blocked a few cents before you reach your budget.
One answer can be at most 32768 output tokens. Larger max_tokens values are lowered automatically.
The gateway stores only token counts and cost, never your prompts or answers. Your prompts still go to DeepSeek, so follow the company rules for customer data.
Use the settings below if you prefer to configure tools yourself.
Cline (VS Code)
Settings → API Provider: OpenAI Compatible
- Base URL:
https://ai.technext.com.vn/v1 - API Key:
tnk_… - Model ID:
deepseek-flash - Optional: set Context Window to
1048576.
Cursor
Settings → Models:
- OpenAI API Key: paste
tnk_…, then turn on Override OpenAI Base URL and set it tohttps://ai.technext.com.vn/v1. - Click Add model, enter
deepseek-flash, and turn it on. Turn off the other models when you want to use this one. - Cursor sends these requests from its own servers, so this works only for chat/agent features that support custom OpenAI keys.
Continue (VS Code / JetBrains)
Add this to ~/.continue/config.yaml:
models:
- name: DeepSeek Flash (TechNext)
provider: openai
model: deepseek-flash
apiBase: https://ai.technext.com.vn/v1
apiKey: tnk_your_key_here
roles: [chat, edit, apply]opencode
Add this to ~/.config/opencode/opencode.json (or opencode.json in a project):
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"technext": {
"npm": "@ai-sdk/openai-compatible",
"name": "TechNext AI",
"options": {
"baseURL": "https://ai.technext.com.vn/v1",
"apiKey": "{env:TECHNEXT_AI_KEY}"
},
"models": { "deepseek-flash": { "name": "DeepSeek V4.1 Flash" } }
}
}
}Then set TECHNEXT_AI_KEY=tnk_… in your shell and choose TechNext AI / DeepSeek V4.1 Flash with /models.
Claude Code and other Anthropic-format tools
macOS / Linux (put these in ~/.bashrc or ~/.zshrc):
export ANTHROPIC_BASE_URL=https://ai.technext.com.vn/anthropic
export ANTHROPIC_AUTH_TOKEN=tnk_your_key_here
export ANTHROPIC_MODEL=deepseek-flash
export ANTHROPIC_DEFAULT_OPUS_MODEL=deepseek-flash
export ANTHROPIC_DEFAULT_SONNET_MODEL=deepseek-flash
export ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-flash
export CLAUDE_CODE_SUBAGENT_MODEL=deepseek-flashWindows PowerShell:
$env:ANTHROPIC_BASE_URL="https://ai.technext.com.vn/anthropic"
$env:ANTHROPIC_AUTH_TOKEN="tnk_your_key_here"
$env:ANTHROPIC_MODEL="deepseek-flash"
$env:ANTHROPIC_DEFAULT_OPUS_MODEL="deepseek-flash"
$env:ANTHROPIC_DEFAULT_SONNET_MODEL="deepseek-flash"
$env:ANTHROPIC_DEFAULT_HAIKU_MODEL="deepseek-flash"
$env:CLAUDE_CODE_SUBAGENT_MODEL="deepseek-flash"Unset ANTHROPIC_API_KEY if you have it set. Tools that send the key as x-api-key also work.
If a tool sends claude-opus-*, DeepSeek uses (and bills) deepseek-v4-pro. Any other claude-* name maps to deepseek-flash.
Test with curl
curl https://ai.technext.com.vn/v1/chat/completions \
-H "Authorization: Bearer tnk_your_key_here" \
-H "Content-Type: application/json" \
-d '{"model":"deepseek-flash","max_tokens":16,"messages":[{"role":"user","content":"Say OK"}]}'Errors
| HTTP | Meaning |
|---|---|
| 401 | Missing, wrong, or revoked key. Check the key, or ask Nathan for a new one. |
429 daily_budget_exceeded | You reached today's budget. It resets at 00:00 Vietnam time, or Nathan can raise your budget. |
429 company_budget_exceeded | The whole company reached today's AI budget. Tell Nathan. |
502 / 503 upstream_… | A problem with DeepSeek or the company key/balance. Retry later, or tell Nathan if it continues. |
503 gateway_not_configured | The company DeepSeek key is not set. Tell Nathan. |
| Other 4xx/5xx | The error comes from DeepSeek (bad model name, DeepSeek overloaded, …). |