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.
| Parameter | Value | Description |
|---|---|---|
| OpenAI Base URL | https://api.zbstream.com/v1 | Base address for all OpenAI-compatible requests |
| Anthropic Base URL | https://api.zbstream.com | Anthropic SDK base URL (appends /v1/messages) |
| API Key | ZBSTREAM_API_KEY | Provide the credential via an environment variable |
| Model | deepseek-v4-pro | Chat model used in these examples |
Depending on how much control you want, here are the ways to integrate with ZBStream:
| Method | Best for |
|---|---|
| API | Full control, any language, no dependencies |
| OpenAI SDK | OpenAI Python / Node.js SDKs, minimal integration cost |
| Anthropic SDK | Official Anthropic Python / Node.js / Go SDKs — just change the base URL |
| Agent tools | Agents, IDEs, and automation tools with a configurable base URL |
| WorkBuddy & Hermes | Desktop 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.
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
}'