ZBStream

First API Call

ZBStream provides a single unified endpoint that gives you access to hundreds of AI models, with automatic failover and cost-effective routing.

ZBStream is the entry point for model access, compatible with both OpenAI and Anthropic SDKs. Once you have an API key, fire your first chat request with the tools you already know.

ParameterValueDescription
OpenAI Base URLhttps://api.zbstream.com/v1Base address for all OpenAI-compatible requests
Anthropic Base URLhttps://api.zbstream.comAnthropic SDK base URL (appends /v1/messages)
API KeyZBSTREAM_API_KEYProvide the credential via an environment variable
Modeldeepseek-v4-proChat model used in these examples

Depending on how much control you want, here are the ways to integrate with ZBStream:

MethodBest for
APIFull control, any language, no dependencies
OpenAI SDKOpenAI Python / Node.js SDKs, minimal integration cost
Anthropic SDKOfficial Anthropic Python / Node.js / Go SDKs — just change the base URL
Agent toolsAgents, IDEs, and automation tools with a configurable base URL
WorkBuddy & HermesDesktop workspace and agents out of the box — see the integration guide

How do I get a ZBStream API key?

Sign in to the ZBStream platform and create a key on the API Keys page. The key is shown in full only once — store it safely, pass it via the ZBSTREAM_API_KEY environment variable, and never commit it to source control.

Create an API key →

How do I call a model with the OpenAI-compatible API?

The four examples below call the same OpenAI-compatible endpoint. Each request carries a message list with streaming disabled so you can inspect the full response. For the Anthropic interface, see the "Anthropic API" page.

curl https://api.zbstream.com/v1/chat/completions \
  -H "Authorization: Bearer $ZBSTREAM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-pro",
    "messages": [
      { "role": "user", "content": "你好,请介绍一下 ZBStream API。" }
    ],
    "stream": false
  }'