Connect your agent to NovaAPI
One page from login to a working key: create the key, copy three values, then paste them into the agent you already use. English only.
NovaAPI is an independent gateway. It is not DeepSeek, OpenAI or Anthropic. The endpoint speaks OpenAI Chat Completions, OpenAI Responses and Anthropic Messages, so most agents need only a base URL, a key and a model name.
1. Create an API key
- Log in at api.lbase.com/login, or create an account at api.lbase.com/register with an email address.
- Open API Keys → Create Key in the console.
- Give the key a name, for example
claude-codeordsh-desktop. - Select a group. A key without a group cannot call any model.
- DeepSeek → native names
deepseek-flashanddeepseek-v4-pro. - Claude Compatible → Claude names such as
claude-sonnet-5, routed to the same DeepSeek backends.
- DeepSeek → native names
- Copy the
sk-...key. It is shown once. Store it in an environment variable or a password manager, never in a repository.
2. The three values every agent needs
| Value | What to use |
|---|---|
| OpenAI-compatible base URL | https://api.lbase.com/v1 |
| Anthropic-compatible base URL | https://api.lbase.com (the client appends /v1/messages) |
| Model names | deepseek-flash, deepseek-v4-pro, or a Claude-compatible alias with a Claude Compatible key |
| API key | sk-... from the console, tied to the group you selected |
3. Pick the protocol your agent speaks
| Agent | Protocol | Base URL |
|---|---|---|
| DeepSeek Harness | OpenAI Chat Completions | https://api.lbase.com/v1 |
| Claude Code | Anthropic Messages | https://api.lbase.com |
| Codex CLI | OpenAI Responses | https://api.lbase.com/v1 |
| OpenCode | OpenAI Chat Completions | https://api.lbase.com/v1 |
| Hermes Agent | OpenAI Chat Completions | https://api.lbase.com/v1 |
| Cline | OpenAI Chat Completions | https://api.lbase.com/v1 |
| Cursor | OpenAI Chat Completions | https://api.lbase.com/v1 |
| Dify | OpenAI Chat Completions | https://api.lbase.com/v1 |
| n8n | OpenAI Chat Completions | https://api.lbase.com/v1 |
Agent setup
Each section below says exactly where the values go. If your agent is not listed, use the OpenAI-compatible values above and open the main docs.
DeepSeek Harness (dsh)
Where: Settings → Models → Add model provider → Custom model API.
| Field | Value |
|---|---|
| Provider ID | novaapi (lowercase; this ID is permanent) |
| Display name | NovaAPI |
| Base URL | https://api.lbase.com/v1 |
| API protocol | OpenAI Chat Completions |
| API key | your sk-... key |
| Models | deepseek-flash, deepseek-v4-pro |
Save the provider, then select the model in the model picker. If Fetch available models returns nothing, add the two model IDs by hand; they work the same.
If the gateway rejects the request shape, add the compatibility switches in $DSH_HOME/profiles/web/cordis.patch.yml:
- id: llm-pi-ai
config:
providers:
novaapi:
api: openai-completions
baseURL: https://api.lbase.com/v1
apiKeyEnv: NOVAAPI_API_KEY
compat:
supportsDeveloperRole: false
maxTokensField: max_tokens
models:
- id: deepseek-flash
- id: deepseek-v4-pro
Set NOVAAPI_API_KEY in the environment before launching dsh. Keep the literal key out of the YAML file.
Claude Code
Where: ~/.claude/settings.json (recommended) or environment variables.
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "sk-your-key-here",
"ANTHROPIC_BASE_URL": "https://api.lbase.com",
"ANTHROPIC_MODEL": "deepseek-flash"
}
}
Alternatively, export the same three values in your shell and run claude:
export ANTHROPIC_BASE_URL="https://api.lbase.com"
export ANTHROPIC_AUTH_TOKEN="sk-your-key-here"
export ANTHROPIC_MODEL="deepseek-flash"
claude
Use a DeepSeek group key with ANTHROPIC_MODEL=deepseek-flash, or a Claude Compatible key and keep your existing Claude model names.
Codex CLI
Where: ~/.codex/config.toml. On Windows: %USERPROFILE%\.codex\config.toml.
model = "deepseek-flash"
model_provider = "novaapi"
review_model = "deepseek-flash"
disable_response_storage = true
[model_providers.novaapi]
name = "NovaAPI"
base_url = "https://api.lbase.com/v1"
env_key = "NOVAAPI_API_KEY"
wire_api = "responses"
requires_openai_auth = false
Set the environment variable, then run codex:
# Linux / macOS
export NOVAAPI_API_KEY="sk-your-key-here"
# Windows PowerShell
$env:NOVAAPI_API_KEY="sk-your-key-here"
Codex appends /responses to the base URL. NovaAPI accepts that endpoint. Do not put the key in the TOML file.
OpenCode
Where: opencode.json or opencode.jsonc in the project, or the global config. OpenCode V2 uses providers and package.
{
"$schema": "https://opencode.ai/config.json",
"model": "novaapi/deepseek-flash",
"providers": {
"novaapi": {
"name": "NovaAPI",
"env": ["NOVAAPI_API_KEY"],
"package": "@opencode/ai/providers/openai-compatible",
"settings": {
"baseURL": "https://api.lbase.com/v1"
},
"models": {
"deepseek-flash": { "name": "DeepSeek V4.1 Flash" },
"deepseek-v4-pro": { "name": "DeepSeek V4 Pro" }
}
}
}
}
export NOVAAPI_API_KEY="sk-your-key-here"
opencode
Run /models and select novaapi/deepseek-flash. If you are on V1, the old provider/npm/options shape is different; migrate to the V2 block above.
Hermes Agent
Where: ~/.hermes/config.yaml, with the key in ~/.hermes/.env.
model:
default: deepseek-flash
provider: custom
base_url: https://api.lbase.com/v1
key_env: NOVAAPI_API_KEY
# ~/.hermes/.env
NOVAAPI_API_KEY=sk-your-key-here
Start Hermes and check the route with /model or hermes config show. Use provider: custom; a bare OPENAI_BASE_URL is not enough for this custom endpoint.
Cline
Where: Cline settings → Provider.
- Choose OpenAI Compatible.
- Base URL:
https://api.lbase.com/v1. - API key:
sk-.... - Model ID:
deepseek-flashordeepseek-v4-pro.
Cline passes the model ID through unchanged, so a typo becomes a 404 rather than a silent fallback.
Cursor
Where: Settings → Models.
- Open the OpenAI API Key section.
- Enable Override OpenAI Base URL.
- Base URL:
https://api.lbase.com/v1; API key:sk-.... - Add
deepseek-flashas a custom model and select it.
If the model does not appear in the picker, restart Cursor. That is a UI cache, not an API error.
Dify
Where: Settings → Model Provider → OpenAI-API-compatible.
- Base URL:
https://api.lbase.com/v1. - API key:
sk-.... - Model name:
deepseek-flash; model type: LLM. - Leave the context size at the model default unless you know your workload needs a lower cap.
Dify's connection test calls the models endpoint first, which is a useful check on the key.
n8n
Where: Credentials → OpenAI (or OpenAI-compatible credential).
- Base URL:
https://api.lbase.com/v1. - API key:
sk-.... - Model:
deepseek-flash.
The OpenAI node sends Chat Completions requests to the base URL. If a workflow uses a hard-coded OpenAI model name, replace it with deepseek-flash.
Verify the key before debugging the agent
curl https://api.lbase.com/v1/chat/completions \
-H "Authorization: Bearer sk-your-key-here" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-flash",
"messages": [{"role": "user", "content": "Hello!"}]
}'
If this returns a message, the key, group and endpoint are correct. A failure here is an account or key problem, not an agent problem.
Troubleshooting
| Symptom | What it means | Fix |
|---|---|---|
| 401 | Key missing, wrong or revoked, or the key has no group. | Re-copy the key from the console and confirm its group. |
| 402 | Balance is exhausted. | Top up from $5, or use the remaining free credit. |
| 404 | The model name is not available to that key's group. | Use deepseek-flash or deepseek-v4-pro; check the console model list. |
| 400 / 422 | The agent sends a request shape the gateway rejects, often a developer role or max_completion_tokens. | Use the compatibility switches in the DeepSeek Harness section, or switch the agent to Chat Completions. |
| Long outputs look stuck | The request is not streaming. | Enable streaming in the agent; non-streaming long generations can look like a hang. |
| Model not in picker | UI cache or a provider that only lists its own catalog. | Restart the client, or add the model ID manually. |
Key security
- The key is shown once. Store it in an environment variable, not in source code or a shared document.
- Use one key per agent or per machine. Revoke a key from the console if it leaks.
- Do not commit
.env,config.tomlwith inline secrets, or shell history containing the key. - If a key is pasted into a chat, issue, or screenshot, rotate it.
FAQ
Which agents can use NovaAPI?
Any agent that accepts an OpenAI-compatible base URL, an Anthropic base URL or an OpenAI Responses endpoint. This page covers DeepSeek Harness, Claude Code, Codex CLI, OpenCode, Hermes Agent, Cline, Cursor, Dify and n8n.
Where do I put the NovaAPI API key?
Create the key in the console under API Keys, choose a group, then paste it into the agent's API-key field or reference it through the environment variable shown in that agent's section.
Do I need a Claude Compatible key?
Only if you want to keep Claude model names. A DeepSeek-group key works with deepseek-flash and deepseek-v4-pro. A Claude Compatible key maps Claude names to the same DeepSeek backends.
Does Codex CLI work with NovaAPI?
Yes. Codex uses the OpenAI Responses protocol. Set base_url to https://api.lbase.com/v1, wire_api to responses, and model to deepseek-flash in ~/.codex/config.toml.
Nova