Onpi

Documentation

Integrate Onpi into any client that speaks the OpenAI API. One base URL, one key, five models.

  1. Base URL and authentication
  2. First request
  3. Available models
  4. Pricing and billing
  5. Streaming
  6. Reasoning
  7. Tools and web search
  8. Images (vision)
  9. Errors and limits
  10. Configuring common clients

1. Base URL and authentication

All traffic goes through a single endpoint:

https://onpi.live/v1

Authentication is by key, in the Authorization header:

Authorization: Bearer sk-xxxxxxxxxxxxxxxx

Keys are created in the dashboard, under Tokens. Each key can have its own quota, model limit, IP restriction and group. All new accounts start in the Onpi group, which grants access to all five models.

2. First request

curl https://onpi.live/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $ONPI_API_KEY" \
  -d '{
    "model": "deepseek-chat",
    "messages": [
      {"role": "user", "content": "Explain what an API gateway is in two sentences."}
    ]
  }'

The response follows the OpenAI format: choices[0].message.content, with usage reporting input, output and cached tokens.

With the official OpenAI SDK

from openai import OpenAI

client = OpenAI(
    api_key="sk-...",
    base_url="https://onpi.live/v1",
)

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

3. Available models

ModelWhat forEndpoint
deepseek-chatGeneral purpose: conversation, code, tools, vision.openai
deepseek-reasonerStep-by-step reasoning, returns reasoning_content before the answer.openai
deepseek-searchBuilt-in web search, with sources cited in the text.deepseek-tools-search
deepseek-latestAlias that always points to the most recent version.openai
OnpiThe platform's own conversational model.openai

The live list is at GET /v1/models (requires a key) and prices are on the pricing page.

There is no embeddings or images endpoint: /v1/embeddings and /v1/images/generations return 404. Vision is supported by deepseek-chat (see section 8).

4. Pricing and billing

Usage is metered per token and deducted from your balance. DeepSeek models use dynamic pricing, with two tiers per 1M tokens:

ModelInputOutputCache read
deepseek-chat
deepseek-latest
deepseek-reasoner
deepseek-search
$0.15
peak: $0.30
$0.60
peak: $1.20
$0.003
peak: $0.006
Onpi$0.20$0.20—
Peak = Monday to Friday, 09:00–12:00 and 14:00–18:00 in the Asia/Shanghai time zone (UTC+8). Outside those hours, and at weekends, the standard price applies. The dashboard shows the real cost of each call in the usage log.

Balance and quotas: the internal quota unit is 500,000 per dollar. Every new account receives 400 quota units as a welcome credit. Balance is purchased in the dashboard, under Wallet.

Crypto top-ups: the amounts in the dashboard (10, 20, 50, 100) are US dollars of balance. PIX is no longer accepted. Payment is handled by NowPayments: you pick a coin in the invoice page (BTC, ETH, USDT, USDC, LTC, TRX and others), the invoice shows the exact amount and address, and the balance is credited automatically within a few minutes of the network confirmation. A single invoice covers one top-up; if the transfer arrives under the requested amount the order stays pending until the difference is paid or the invoice expires.
First top-up bonus: the first deposit of US$ 10 or more is credited as US$ 100 of balance (10x). One bonus per account, applied automatically.

5. Streaming

Add "stream": true. The response arrives as SSE, one data: per chunk, ending with data: [DONE].

curl -N https://onpi.live/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $ONPI_API_KEY" \
  -d '{"model":"deepseek-chat","stream":true,
       "messages":[{"role":"user","content":"Count to 10."}]}'

With usage included in the final chunk when you send "stream_options": {"include_usage": true}.

6. Reasoning

deepseek-reasoner returns the reasoning in its own field, reasoning_content, before the final answer in content:

{
  "choices": [{
    "message": {
      "role": "assistant",
      "reasoning_content": "The user asked for 2+2...",
      "content": "4"
    },
    "finish_reason": "stop"
  }]
}

When streaming, the reasoning arrives in delta.reasoning_content and the text in delta.content. Show them separately if you want the full "thinking" experience.

7. Tools and web search

The tools parameter in the OpenAI format is accepted and forwarded to the model. Example:

{
  "model": "deepseek-chat",
  "messages": [{"role": "user", "content": "What is the weather in Maputo?"}],
  "tools": [{
    "type": "function",
    "function": {
      "name": "get_weather",
      "description": "Current weather in a city",
      "parameters": {"type": "object",
        "properties": {"city": {"type": "string"}},
        "required": ["city"]}
    }
  }],
  "tool_choice": "auto"
}

For internet search use deepseek-search: it queries the web and returns the text with [citation:N] markers in the response body.

{"model": "deepseek-search",
 "messages": [{"role": "user", "content": "What is today's date? Search."}]}

8. Images (vision)

Send the image as image_url, either a public URL or a base64 data URL, using deepseek-chat:

{
  "model": "deepseek-chat",
  "messages": [{
    "role": "user",
    "content": [
      {"type": "text", "text": "Describe this image."},
      {"type": "image_url",
       "image_url": {"url": "data:image/png;base64,iVBORw0KGgo..."}}
    ]
  }]
}

To try it in the browser, use the playground — your key stays in your browser only.

9. Errors and limits

CodeResponseMeaning
401Invalid tokenInvalid, revoked or missing key.
403model_not_allowedKey has no access to that model or group.
429rate_limitRequests-per-minute limit reached.
402 / 400insufficient_quota / invalid_requestInsufficient balance or malformed request.
503model_not_foundNo channel available for that model in the group.
Usage is billed by tokens. Track it request by request in Dashboard → Logs, with input, output and cached tokens.

10. Configuring common clients

Cherry Studio / Chatbox / LobeChat

Provider OpenAI → Base URL https://onpi.live/v1, API Key sk-.... The model list is read automatically from /v1/models.

LangChain

from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    model="deepseek-chat",
    api_key="sk-...",
    base_url="https://onpi.live/v1",
)

Cline / Continue / Roo Code

Provider "OpenAI Compatible", same base URL, and pick deepseek-chat for speed or deepseek-reasoner for tasks that need reasoning.

curl / any HTTP client

Just replace https://api.openai.com/v1 with https://onpi.live/v1 and use an Onpi key.