logoLAZAPI

Two commands. That is the whole tool.

The CLI reads LAZAPI_KEY from the environment, defaults to the gateway base URL, and prints raw JSON so it composes with jq.

Claude CodeAnthropic Codex CLIOpenAI CursorOpenAI OpenCodeOpenAI Kilo CodeOpenAI PiOpenAI Kimi Code CLIOpenAI Grok BuildOpenAI DeepSeek HarnessOpenAI HermesOpenAI ZCodeOpenAI Any SDK or curleither

Every one of them takes the same two values — the base URL and your key. Nothing else changes.

Verify before you build on it

One call tells you whether the key and the URL are both right. A JSON list back means yes; a 401 means the key is wrong or expired.

curl https://lazarus-th.duckdns.org/v1/models \
  -H "Authorization: Bearer sk-..."
CommandWhat it does
lazapi chatSends a prompt to a named model, streams or prints the reply
lazapi bench20 samples against one model, prints p50 latency and tok/s

Install

# pip
pip install lazapi

# or straight from the repo
git clone https://lazarus-th.duckdns.org/lazapi.git
cd lazapi && pip install -e .

Set the key

export LAZAPI_KEY=sk-...
export LAZAPI_BASE=https://lazarus-th.duckdns.org/v1

Chat

lazapi chat --model Mythos China "explain paged attention in two lines"

# stream
lazapi chat --model LARP --stream "count to 50"

# raw JSON for jq
lazapi chat --model LAZARUS --json "hi" | jq '.usage'

Benchmark a route

lazapi bench --model Mythos China --n 20 --tokens 512

model   Mythos China
samples 20/20 ok
ttft    p50 0.31s  p95 0.48s
tok/s   112
cost    $0.0004 per call

Exit codes

  • 0 — the call succeeded and the body parsed
  • 1 — transport failure, no response
  • 2 — the gateway answered with an error object
  • 3 — the model was not in the key's allow-list