Get API key
Get started

Quickstart

Call any model on llm.buzz with the OpenAI or Anthropic SDK you already use.

On this page

If you use OpenRouter today, Coming from OpenRouter lists what differs.

1Get a key

Create a key in the console under Keys, and keep it in an environment variable.

export LLM_BUZZ_KEY="exp_vk_..."

2Make a request

Point your SDK at https://api.llm.buzz/api/v1. The Anthropic SDK works too, through /api/v1/messages.

from openai import OpenAI
import os

client = OpenAI(
    base_url="https://api.llm.buzz/api/v1",
    api_key=os.environ["LLM_BUZZ_KEY"],
)
reply = client.chat.completions.create(
    model="deepseek/deepseek-v4.1-flash",
    messages=[{"role": "user", "content": "Hello"}],
)
print(reply.choices[0].message.content)

3Stream the answer

Set stream to true to get the answer as it is generated. Streaming covers the events of each text API and what a failure looks like.

stream = client.chat.completions.create(
    model="deepseek/deepseek-v4.1-flash",
    messages=[{"role": "user", "content": "Write a haiku"}],
    stream=True,
)
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="")

4Choose a model

Model names are author/slug, as on each model page. By default each request goes to the best provider on price and speed, and fails over to the next one. Choosing an API says which API each kind of model takes.

# the cheapest provider first
model="deepseek/deepseek-v4.1-flash:floor"

# only providers that keep nothing
extra_body={"provider": {"zdr": True}}

5Handle errors

The error body's metadata.gateway_code says what went wrong; Errors lists the codes.

StatusCodeWhat to do
401invalid_keyCheck the key, and that it is not disabled or revoked.
402insufficient_creditsAdd credit, or turn on auto top-up. Free models still answer.
404model_not_foundCheck the model name on the Models page.
404no_allowed_providersYour provider preferences leave no provider. Relax them.
429unavailable_routeWait for Retry-After seconds, then retry.
503unavailable_routeNo provider could answer just now. Retry with backoff.
Docs