Home › API docs

API documentation

One OpenAI-compatible endpoint for DeepSeek, Qwen and GLM. Change base_url, keep your code.

Base URLhttps://vantixcloud.com/v1AuthAuthorization: Bearer vx-…Get a keyNo self sign-up. Request a quote at /ai-api; keys are issued after your quote is paid.EndpointsPOST /v1/chat/completions · GET /v1/modelsBillingPrepaid balance, deducted per token at your quoted rate. Pay with USDT (TRC20) or card. See how it works.StreamingSupported ("stream": true)
Availability: API access is activated by quote. Keys are issued after your quote is paid, and activation timing is confirmed in your quote. Until you have a key, every call returns 401.
QuickstartStreamingModelsCheck balance and usageErrorsRate limitsUse with your toolsTroubleshooting

Quickstart

Python (openai SDK)

pip install openai

from openai import OpenAI

client = OpenAI(
    base_url="https://vantixcloud.com/v1",
    api_key="vx-your-key",
)

r = client.chat.completions.create(
    model="deepseek-flash",
    messages=[{"role": "user", "content": "Hello"}],
)
print(r.choices[0].message.content)

Node.js (openai SDK)

npm install openai · ES modules (top-level await)

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://vantixcloud.com/v1",
  apiKey: process.env.VANTIX_KEY, // vx-...
});

const r = await client.chat.completions.create({
  model: "deepseek-flash",
  messages: [{ role: "user", content: "Hello" }],
});
console.log(r.choices[0].message.content);

curl

curl https://vantixcloud.com/v1/chat/completions \
  -H "Authorization: Bearer $VANTIX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-flash","messages":[{"role":"user","content":"Hello"}]}'

Streaming

Set stream: true to receive server-sent events in the standard OpenAI format. The gateway asks the upstream for token usage on streams (stream_options.include_usage), so the last chunk carries usage; that is what your balance is charged on.

Python

stream = client.chat.completions.create(
    model="deepseek-flash",
    messages=[{"role": "user", "content": "Write a haiku about latency"}],
    stream=True,
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)
    if chunk.usage:  # last chunk carries token usage
        print("\n", chunk.usage)

Node.js

const stream = await client.chat.completions.create({
  model: "deepseek-flash",
  messages: [{ role: "user", content: "Write a haiku about latency" }],
  stream: true,
});
for await (const chunk of stream) {
  const t = chunk.choices?.[0]?.delta?.content;
  if (t) process.stdout.write(t);
  if (chunk.usage) console.log("\n", chunk.usage); // last chunk
}

curl

curl -N https://vantixcloud.com/v1/chat/completions \
  -H "Authorization: Bearer $VANTIX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-flash","stream":true,"messages":[{"role":"user","content":"Hello"}]}'

Models

Model ids are case-sensitive. These are the models on our endpoint today; GET /v1/models returns the same list.

Model idVendorOfficial list price
deepseek-v4-proDeepSeekModel page
deepseek-flashDeepSeekModel page
qwen3.8-maxAlibaba Cloud (Qwen)Model page
qwen3.7-plusAlibaba Cloud (Qwen)Model page
glm-5.3Zhipu AI (GLM)Model page
curl https://vantixcloud.com/v1/models

Kimi, Seedance 2.5, Wan, and Claude, GPT and Gemini are supplied by quote and are not on this endpoint's fixed list. Compare monthly cost at official list prices with the LLM API cost calculator.

Check balance and usage

POST your key to /api/keys with action: "balance". It returns your balance, total spend and number of calls (USD). Non-streaming chat responses also include two headers:

X-Vantix-Cost-USDCost of this call
X-Vantix-Balance-USDRemaining balance after this call

Streaming responses don't carry these headers; use the balance call.

curl -X POST https://vantixcloud.com/api/keys \
  -H "Content-Type: application/json" \
  -d '{"action":"balance","key":"vx-your-key"}'

# {"ok":true,"email":"...","balance":12.3456,"spent":7.6544,"calls":1234,"created":"..."}

Errors

Errors use the OpenAI error shape, so SDKs raise their usual exceptions:

{"error": {"message": "Insufficient balance. Top up at ...", "type": "invalid_request_error"}}
StatusMessage starts withWhat to do
400Invalid JSON bodySend a valid JSON request body.
400Unsupported model: …Use an id from GET /v1/models. The message lists the available ids.
401Invalid API key / API key not foundSend Authorization: Bearer vx-… with the full key. Keys are issued after your quote is paid.
402Insufficient balanceYour prepaid balance is zero. Ask Sapporo on Telegram for a top-up quote.
403This model is only available to verified 18+ platforms18+ models need the 18+ use verification first. Contact @sapporo168.
405POST onlyUse POST for chat completions.
4xx (incl. 429)Upstream rejected the request: …Passed through from the upstream provider with its status and message, e.g. a parameter it doesn't accept or a rate limit. Fix the request, or back off and retry on 429.
502Upstream error / Gateway errorTemporary. Retry with backoff.
503Upstream temporarily unavailableThe upstream provider is failing and we have been alerted. Retry later or message @sapporo168.

Rate limits

The gateway does not set its own per-key rate limit. Upstream providers apply their own limits; if they return 429, we pass it through unchanged. Retry with exponential backoff:

import time, openai

def call_with_retry(fn, tries=5):
    for i in range(tries):
        try:
            return fn()
        except openai.RateLimitError:          # HTTP 429 passed through from upstream
            time.sleep(min(2 ** i, 30))
        except openai.APIStatusError as e:     # retry 502/503 only
            if e.status_code not in (502, 503):
                raise
            time.sleep(min(2 ** i, 30))
    raise RuntimeError("still failing, contact Telegram @sapporo168")

Use with your tools

Anything with an "OpenAI-compatible" provider works: set the base URL, paste your key, pick a model id.

Cline / Roo Code (VS Code)

LibreChat

# librechat.yaml
endpoints:
  custom:
    - name: "VantixCloud"
      apiKey: "${VANTIX_KEY}"
      baseURL: "https://vantixcloud.com/v1"
      models:
        default: ["deepseek-flash", "deepseek-v4-pro", "qwen3.7-plus", "glm-5.3"]
        fetch: true
      titleConvo: true
      modelDisplayLabel: "VantixCloud"

Cherry Studio / ChatBox / NextChat

one-api / new-api

LangChain

from langchain_openai import ChatOpenAI
llm = ChatOpenAI(model="deepseek-flash", base_url="https://vantixcloud.com/v1", api_key="vx-...")

Troubleshooting

SymptomCheck
404 or "not found" from your SDKbase_url must end with /v1: https://vantixcloud.com/v1. Some tools add /v1 themselves; then use https://vantixcloud.com.
401 right after you received your keySend it as Authorization: Bearer vx-…. Copy the whole key with no spaces or line breaks.
"Unsupported model"Use an id from GET /v1/models, e.g. deepseek-flash. Ids are case-sensitive.
Streaming hangs or cuts offMake sure your proxy or serverless platform doesn't buffer or time out long responses.
Costs higher than expectedUpstream list prices vary by time of day for some models (DeepSeek is cheaper off-peak) and by input length for others (Qwen tiers above 256K input). Keep static instructions at the start of the prompt so they can be cached.
Still stuckMessage Telegram @sapporo168 with the time of the request and the error text.
Data: we do not store prompt or response content; the gateway records usage per key only. Details: how API keys and data are handled.
No lock-in. Everything here is the standard OpenAI wire format. If you ever want to leave, change base_url.
Get a quote →Estimate cost at list prices