สองบรรทัด ทุกเครื่องมือ

ทุกเครื่องมือข้างล่างใช้ของสองอย่างเหมือนกัน: base URL กับคีย์ มีสอง base URL เพราะมีสองโปรโตคอล - เลือกอันที่เครื่องมือคุณพูดอยู่แล้ว ไม่ต้องแปลงอะไร

ทำไมต้องอ่าน

ถ้าย้ายมาแล้วต้องแก้โค้ดหลายจุด นั่นคือสัญญาณว่า API ออกแบบผิด ที่นี่เปลี่ยนสองค่า: host กับ key

Base URLProtocolUsed by
https://lazarus-th.duckdns.org/v1OpenAI-compatibleChat Completions and Responses. Codex, Cursor, OpenCode, Kilo Code, Pi, Kimi, Grok, Hermes and the SDKs.
https://lazarus-th.duckdns.orgAnthropic-compatibleMessages API. Claude Code and the Anthropic SDKs. No /v1 suffix.
MethodPathReturns
POST/v1/chat/completionsCompletion, or an SSE stream when stream:true
POST/v1/messagesAnthropic-shaped completion
POST/v1/images/generationsImage generation
GET/v1/modelsEvery model the key can reach. Needs auth.
GET/api/statusPublic instance status, no auth
GET/api/user/selfBalance and quota for the calling key

Verify the key in one call

List the models the key can reach. A JSON list back means the key and the URL are both right. A 401 means the key is wrong or expired.

curl https://lazarus-th.duckdns.org/v1/models \
  -H "Authorization: Bearer sk-..."

Chat completions

Request body is the OpenAI shape. model is the only field that selects a route.

curl https://lazarus-th.duckdns.org/v1/chat/completions \
  -H "Authorization: Bearer sk-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "LARP",
    "messages": [{ "role": "user", "content": "Say hello in five words." }]
  }'

Response carries a usage block on every call: prompt_tokens, completion_tokens, total_tokens, and reasoning_tokens where the model reports it.

FieldTypeDefaultMeaning
modelstringrequiredModel ID from the catalog
messagesarrayrequiredChat messages array
temperaturenumber1.00–2, randomness
max_tokensintegernullMax output tokens
streambooleanfalseStream via SSE
top_pnumber1.0Nucleus sampling

Streaming

Set stream:true and the response becomes text/event-stream. Each frame is a data: line holding a delta; the last one is data: [DONE].

Errors

The API answers with a standard HTTP status and a JSON body that names the error. The code never changes, so you can match on it; the message is written for humans. Every response also carries an X-Oneapi-Request-Id header - quote it when you open a key.

Two shapes, depending on the endpoint:

// OpenAI-compatible · /v1/chat/completions
{ "error": { "message": "Invalid API key",
             "type": "invalid_request_error",
             "code": "invalid_api_key" } }

// Anthropic-compatible · /v1/messages
{ "type": "error",
  "error": { "type": "authentication_error",
             "message": "Invalid API key",
             "code": "invalid_api_key" } }
StatusCodeWhen it happensWhat to do
400invalid_jsonThe body could not be parsed as JSON.Check quotes, commas, and the Content-Type: application/json header.
400missing_modelThe request has no model field.Add a model id from the catalog.
400bad_requestThe model rejected a parameter - wrong type, unsupported option, content too long.The message repeats the model's reason. Fix the parameter and resend.
401missing_api_keyNo key was sent. Every endpoint needs one, including GET /v1/models.Send Authorization: Bearer sk-… on every request.
401invalid_api_keyThe key does not exist or was deleted.Copy it again from the console, or create a new one.
402insufficient_quotaThe wallet has no remaining quota.Top up. Minimum $3.
403not_in_planNo access to this model on the current key.Call GET /v1/models with the same key, or pick another model.
404model_not_foundThe model id is unknown or was retired.Use an id from /v1/models.
404not_foundThe path or method does not exist.Use POST /v1/chat/completions, GET /v1/models, or POST /v1/images/generations.
429rate_limit_exceededToo many requests in a short window.Slow down. Retry with exponential backoff.
500server_errorThe gateway hit an unexpected error.Retry with backoff. Nothing was charged if the request failed.
503upstream_unavailableThe model timed out or is down for maintenance.Retry in a moment or switch models. Nothing was charged.

การคิดเงิน

คิดเป็นชั่วโมง ไม่ใช่ต่อ token หนึ่งชั่วโมงสิบบาท และทุกอย่างในชั่วโมงนั้นไม่ถูกมิเตอร์ เวลาที่ซื้อแล้วต่อจากของเดิมเสมอ ไม่รีเซ็ต และไม่หมดอายุกลางคำขอ

10 บาท   = 1 ชั่วโมง
79 บาท   = 24 ชั่วโมง
789 บาท  = 30 วัน

# เวลาถูกเขียนลง keys.expires โดยตรง
# คีย์ที่หมดอายุแล้วตอบ 401 จนกว่าจะเติม

ช่องทางที่เปิดอยู่: โอนผ่านธนาคาร (ธ.ก.ส. 020254255452), คริปโต (BTC / ETH / SOL) และพร้อมเพย์เมื่อเปิดพร็อกซีแล้ว คริปโตเป็นช่องทางเดียวที่ระบบตรวจเองอัตโนมัติ โดยเฝ้าที่อยู่บนเครือข่ายทุก 45 วินาที

ดูยอดและประวัติได้ที่ หน้าบัญชี หลังเข้าสู่ระบบ

Python

from openai import OpenAI

client = OpenAI(
    base_url="https://lazarus-th.duckdns.org/v1",
    api_key="sk-...",
)

r = client.chat.completions.create(
    model="Mythos China",
    messages=[{"role": "user", "content": "hello"}],
)
print(r.choices[0].message.content)

Node

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://lazarus-th.duckdns.org/v1",
  apiKey: "sk-...",
});

const r = await client.chat.completions.create({
  model: "LAZARUS",
  messages: [{ role: "user", content: "hello" }],
});

Claude Code

Claude Code speaks the Anthropic protocol, so the base URL has no /v1. Set three variables in the terminal you run it from.

export ANTHROPIC_BASE_URL="https://lazarus-th.duckdns.org"
export ANTHROPIC_AUTH_TOKEN="sk-..."
export ANTHROPIC_MODEL="LARP"

To make it permanent, put the same three values in the env block of ~/.claude/settings.json. Merge into an existing file rather than replacing it.

Your tool is not listed

Any tool that lets you set an OpenAI or Anthropic base URL works here. Look for a Base URL or Custom provider field, paste the URL and your key, and use a model from the catalog.

Webhooks

ยังไม่มี webhook ในรอบนี้ ระบบตรวจการชำระเงินฝั่งเซิร์ฟเวอร์และอัปเดตเวลาให้เอง หน้าเว็บแค่ถามสถานะออเดอร์ซ้ำทุกห้าวินาที ไม่มีคอลแบ็กที่ต้องตั้งค่า

Keys

Keys are created in the console under Tokens. A key carries a quota, an optional model allow-list, and an optional IP allow-list. Revoking a key takes effect on the next request, no cache to wait out.