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.

Start free. New accounts get $0.5 of credit with no card. Use it to verify the endpoint before any top-up. The minimum paid top-up is $5.

1. Create an API key

  1. Log in at api.lbase.com/login, or create an account at api.lbase.com/register with an email address.
  2. Open API Keys → Create Key in the console.
  3. Give the key a name, for example claude-code or dsh-desktop.
  4. Select a group. A key without a group cannot call any model.
    • DeepSeek → native names deepseek-flash and deepseek-v4-pro.
    • Claude Compatible → Claude names such as claude-sonnet-5, routed to the same DeepSeek backends.
  5. Copy the sk-... key. It is shown once. Store it in an environment variable or a password manager, never in a repository.
One key per agent is easier to audit. If a key leaks, revoke that key only. The console shows usage and cost per key.

2. The three values every agent needs

ValueWhat to use
OpenAI-compatible base URLhttps://api.lbase.com/v1
Anthropic-compatible base URLhttps://api.lbase.com (the client appends /v1/messages)
Model namesdeepseek-flash, deepseek-v4-pro, or a Claude-compatible alias with a Claude Compatible key
API keysk-... from the console, tied to the group you selected

3. Pick the protocol your agent speaks

AgentProtocolBase URL
DeepSeek HarnessOpenAI Chat Completionshttps://api.lbase.com/v1
Claude CodeAnthropic Messageshttps://api.lbase.com
Codex CLIOpenAI Responseshttps://api.lbase.com/v1
OpenCodeOpenAI Chat Completionshttps://api.lbase.com/v1
Hermes AgentOpenAI Chat Completionshttps://api.lbase.com/v1
ClineOpenAI Chat Completionshttps://api.lbase.com/v1
CursorOpenAI Chat Completionshttps://api.lbase.com/v1
DifyOpenAI Chat Completionshttps://api.lbase.com/v1
n8nOpenAI Chat Completionshttps://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.

FieldValue
Provider IDnovaapi (lowercase; this ID is permanent)
Display nameNovaAPI
Base URLhttps://api.lbase.com/v1
API protocolOpenAI Chat Completions
API keyyour sk-... key
Modelsdeepseek-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.

  1. Choose OpenAI Compatible.
  2. Base URL: https://api.lbase.com/v1.
  3. API key: sk-....
  4. Model ID: deepseek-flash or deepseek-v4-pro.

Cline passes the model ID through unchanged, so a typo becomes a 404 rather than a silent fallback.

Cursor

Where: Settings → Models.

  1. Open the OpenAI API Key section.
  2. Enable Override OpenAI Base URL.
  3. Base URL: https://api.lbase.com/v1; API key: sk-....
  4. Add deepseek-flash as 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.

  1. Base URL: https://api.lbase.com/v1.
  2. API key: sk-....
  3. Model name: deepseek-flash; model type: LLM.
  4. 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).

  1. Base URL: https://api.lbase.com/v1.
  2. API key: sk-....
  3. 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

SymptomWhat it meansFix
401Key missing, wrong or revoked, or the key has no group.Re-copy the key from the console and confirm its group.
402Balance is exhausted.Top up from $5, or use the remaining free credit.
404The model name is not available to that key's group.Use deepseek-flash or deepseek-v4-pro; check the console model list.
400 / 422The 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 stuckThe request is not streaming.Enable streaming in the agent; non-streaming long generations can look like a hang.
Model not in pickerUI cache or a provider that only lists its own catalog.Restart the client, or add the model ID manually.

Key security

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.

Need the longer version? The main documentation covers account creation, top-up, pricing, model groups and the OpenAI SDK. For payment failures, see the payment help hub.