One OpenAI-compatible endpoint for DeepSeek, Qwen and GLM. Change base_url, keep your code.
https://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)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)
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 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"}]}'
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.
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)
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 -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"}]}'
Model ids are case-sensitive. These are the models on our endpoint today; GET /v1/models returns the same list.
| Model id | Vendor | Official list price |
|---|---|---|
deepseek-v4-pro | DeepSeek | Model page |
deepseek-flash | DeepSeek | Model page |
qwen3.8-max | Alibaba Cloud (Qwen) | Model page |
qwen3.7-plus | Alibaba Cloud (Qwen) | Model page |
glm-5.3 | Zhipu 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.
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-USD | Cost of this call |
X-Vantix-Balance-USD | Remaining 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 use the OpenAI error shape, so SDKs raise their usual exceptions:
{"error": {"message": "Insufficient balance. Top up at ...", "type": "invalid_request_error"}}
| Status | Message starts with | What to do |
|---|---|---|
| 400 | Invalid JSON body | Send a valid JSON request body. |
| 400 | Unsupported model: … | Use an id from GET /v1/models. The message lists the available ids. |
| 401 | Invalid API key / API key not found | Send Authorization: Bearer vx-… with the full key. Keys are issued after your quote is paid. |
| 402 | Insufficient balance | Your prepaid balance is zero. Ask Sapporo on Telegram for a top-up quote. |
| 403 | This model is only available to verified 18+ platforms | 18+ models need the 18+ use verification first. Contact @sapporo168. |
| 405 | POST only | Use 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. |
| 502 | Upstream error / Gateway error | Temporary. Retry with backoff. |
| 503 | Upstream temporarily unavailable | The upstream provider is failing and we have been alerted. Retry later or message @sapporo168. |
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")
Anything with an "OpenAI-compatible" provider works: set the base URL, paste your key, pick a model id.
https://vantixcloud.com/v1vx-…deepseek-v4-pro or deepseek-flash# 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"
https://vantixcloud.com (some apps want the host without /v1; if it fails, try with /v1)vx-…deepseek-flash, deepseek-v4-pro, qwen3.8-max, glm-5.3https://vantixcloud.comvx-…from langchain_openai import ChatOpenAI
llm = ChatOpenAI(model="deepseek-flash", base_url="https://vantixcloud.com/v1", api_key="vx-...")
| Symptom | Check |
|---|---|
| 404 or "not found" from your SDK | base_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 key | Send 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 off | Make sure your proxy or serverless platform doesn't buffer or time out long responses. |
| Costs higher than expected | Upstream 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 stuck | Message Telegram @sapporo168 with the time of the request and the error text. |
base_url.