Developer Documentation

Build with ZephyrCode

Everything you need to integrate ZephyrCode's AI coding agent into your apps — streaming API, SDKs in 4 languages, voice cloning, and team collaboration.

Core Capabilities

What ZephyrCode can do out of the box.

Code Generation

Generate production code from natural language prompts across 40+ languages.

Multi-step Reasoning

Watch the agent plan, reason, call tools, and verify its own work in real time.

Built-in Terminal

Run commands and inspect output without leaving your browser.

Voice & TTS

500+ AI voices in 200+ languages, plus voice cloning with personality profiles.

Team Guilds

Collaborate with up to 10 members per guild with Owner/Manager/Editor/Viewer roles.

3 Models

Z Code Ultra (frontier), Z Code Pro (balanced), Z Code Local (on-device).

Authentication

All API requests require a valid API key. Create one in API Key Management.

Authorization header
Authorization: Bearer zc_live_xxxxxxxxxxxxxxxxxxxx
Content-Type: application/json
OAuth 2.0

Sign in with Google or email. JWT-based sessions, 30-day expiry.

API Keys

Create scoped keys with rate limits. Masked after creation for security.

Streaming API

ZephyrCode uses Server-Sent Events (SSE) for real-time streaming of agent responses. The stream emits 7 event types:

POST /api/agent
event: meta
data: {"model":"z-code-ultra","mode":"code","ts":1700000000}

event: plan
data: {"goal":"Build a React login form","steps":[...]}

event: reasoning
data: {"text":"Let me think about the form structure..."}

event: tool_call
data: {"name":"read_file","args":{"path":"src/App.tsx"}}

event: tool_result
data: {"summary":"File read successfully"}

event: content
data: {"delta":"Here's a clean React login form..."}

event: done
data: {"model":"z-code-ultra","tools_used":2,"fallback_used":false}
meta
Stream start
plan
Agent plan
reasoning
Thought process
tool_call
Tool invocation
tool_result
Tool output
content
Code/text delta
done
Stream end

SDKs & Code Examples

Official SDKs for Python, JavaScript, Go, and raw cURL. All SDKs support streaming.

Python
pip install zephyrcode
from zephyrcode import ZephyrCode

client = ZephyrCode(api_key="zephyr-yourname-xxx")

# Stream a response
for chunk in client.chat.stream(
    message="Build a React login form with Tailwind",
    model="z-code-ultra",
    mode="code",
):
    print(chunk.delta, end="", flush=True)
JavaScript
npm i zephyrcode
import ZephyrCode from "zephyrcode";

const client = new ZephyrCode({ apiKey: "zephyr-yourname-xxx" });

// Stream a response
for await (const chunk of client.chat.stream({
  message: "Build a React login form with Tailwind",
  model: "z-code-ultra",
  mode: "code",
})) {
  if (chunk.type === "content") process.stdout.write(chunk.delta);
}
Go
go get github.com/zephyrcode/zephyrcode-go
package main

import (
    "fmt"
    "github.com/zephyrcode/zephyrcode-go"
)

func main() {
    client := zephyrcode.New("zephyr-yourname-xxx")

    err := client.Chat.Stream("Build a React login form", "z-code-ultra", "code",
        func(chunk zephyrcode.Chunk) {
            fmt.Print(chunk.Content)
        })
    if err != nil {
        panic(err)
    }
}
cURL
# No install needed
curl -N https://zephyrcode.space-z.ai/api/agent \
  -H "Authorization: Bearer zephyr-yourname-xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [{"role": "user", "content": "Build a React login form"}],
    "model": "z-code-ultra",
    "mode": "code"
  }'

Models

Choose the right model for your workload.

ModelBest for
Z Code UltraFrontier reasoning, multi-file refactors
Z Code ProEveryday coding, quick fixes
Z Code LocalOn-device, privacy-first

Need help?

Check the API key page or reach out — we're happy to help you integrate.