Skip to content
This page was translated from the Chinese original, which has changed since — it may be out of date. The Chinese version is authoritative. View the Chinese original →
Quickstart

Make your first call in 5 minutes

Get a key → send a request → switch models, done in three steps.

Prerequisites

A Lurus account (sign up to get a free quota — step one walks you through creating one) · Python 3.8+ / Node.js 18+ / Go 1.21+ / cURL (pick any) · basic terminal knowledge. Estimated 5 minutes.

Step 1

Sign up — start for free

Sign up to get a free quota; you can run this tutorial without topping up.

Ready to use on sign-up, no payment required

New accounts automatically receive 5 Lubei + a free quota (Free plan, 100 calls/day, including deepseek-chat and gpt-3.5-turbo) — more than enough to run this tutorial. For quota and upgrade details, see the FAQ and Billing.

Next, create an API Key:

  1. Visit hub.lurus.cn and log in or sign up

  2. Go to Token Management → Create New Token

  3. Copy the generated Key (format: sk-xxxxxxxxxxxxxxxx)

Security note

An API Key is equivalent to a password. Do not commit it to Git, and do not embed it in front-end code. We recommend passing it in via an environment variable:

export LURUS_API_KEY="sk-your-key-here"

Step 2

Send your first request

Pick your language, copy, and run.

See a model reply? Your first call worked 🎉

This request ran on the free quota that came with sign-up — it didn’t cost a cent. Next, try a different model — you’ll barely need to touch the code.


Step 3

Switch models

Just change the model parameter — no other code changes needed. Pick a model and the snippet below updates instantly, ready to copy and run.

64K · ¥1/M tokens
from openai import OpenAI
import os

client = OpenAI(base_url="https://hub.lurus.cn/v1", api_key=os.environ["LURUS_API_KEY"])

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

Not sure which to pick?

Everyday use → deepseek-chat (lowest cost, best for Chinese)
Complex reasoning → deepseek-reasoner
Long document processing → gemini-3-pro-preview

For a full comparison, see Supported Models.


FAQ

Not working? Start here

Returns 401 Unauthorized
{"error": {"code": "invalid_api_key", "type": "authentication_error"}}

Check:

  • Whether the Key starts with sk-
  • The request header format: Authorization: Bearer sk-xxxx (note the space after Bearer)
  • Whether the Key is in the "Enabled" state (confirm in the console)
Returns "no available server"
  • Check the spelling of the model name (case-sensitive)
  • Confirm the Key has permission to access this model
  • If you just created the Key, wait about 10 seconds and try again
How do I enable streaming responses?

Add "stream": true to the request body. See Streaming responsesStreamingA streaming response where the AI model returns results token by token rather than waiting for full generation, reducing time to first token. for details.

Next steps

Powered by Lurus Technologies