Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Quickstart

1. Get an API key

Sign in to the Lazu console, open API keys and click Create key. Copy the key (it starts with sk-lazu-…).

2. Pick a base URL

https://api.lazu.ai

For self-hosted Lazu, replace with your domain.

3. Make a request

cURL

curl https://api.lazu.ai/v1/chat/completions \
  -H "Authorization: Bearer $LAZU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o-mini",
    "messages": [
      {"role": "user", "content": "Say hello from Lazu"}
    ]
  }'

Python (OpenAI SDK)

from openai import OpenAI
 
client = OpenAI(
    base_url="https://api.lazu.ai/v1",
    api_key="YOUR_LAZU_KEY",
)
 
resp = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Say hello from Lazu"}],
)
print(resp.choices[0].message.content)

TypeScript (OpenAI SDK)

import OpenAI from "openai";
 
const client = new OpenAI({
  baseURL: "https://api.lazu.ai/v1",
  apiKey: process.env.LAZU_API_KEY,
});
 
const resp = await client.chat.completions.create({
  model: "gpt-4o-mini",
  messages: [{ role: "user", content: "Say hello from Lazu" }],
});
console.log(resp.choices[0].message.content);

4. Next steps