Zero AI Logo
DEVELOPER SDK

Zero Labs API Quick Start

Start generating real-time completions with Zero Titan models in seconds using JavaScript, Python, or cURL.

import OpenAI from 'openai';

// Initialize OpenAI client pointing to Zero Labs API Gateway
const client = new OpenAI({
  baseURL: 'https://www.zerolabs.live/api/v1',
  apiKey: process.env.ZERO_API_KEY || 'zl-sk-live-your_api_key_here',
});

async function main() {
  // 1. Standard Non-Streaming Call
  const response = await client.chat.completions.create({
    model: 'zero-pro-1.2', // 128k reasoning model
    messages: [
      { role: 'user', content: 'Explain 128k context reasoning in 3 bullet points.' }
    ],
  });
  console.log(response.choices[0].message.content);

  // 2. Real-Time Streaming Call (reasoning_effort: low | medium | high)
  const stream = await client.chat.completions.create({
    model: 'zero-pro-1.2',
    messages: [
      { role: 'user', content: 'Write a TypeScript debounce function.' }
    ],
    reasoning_effort: 'high',
    stream: true,
  });

  for await (const chunk of stream) {
    process.stdout.write(chunk.choices[0]?.delta?.content || '');
  }
}

main();

Authentication

The Zero Labs API uses API keys for request authentication. Provide your secret key in the Authorization HTTP header.

Authorization: Bearer YOUR_API_KEY

Chat Completions

POSThttps://www.zerolabs.live/api/v1/chat/completions

Creates a model response for the given conversation messages. Supports both synchronous output and Server-Sent Event (SSE) streaming.

ParameterTypeRequiredDescription
modelstringYes"zero-pro-1.2" or "titan-ultra"
messagesarrayYesArray of message objects with role and content
streambooleanOptionalIf set, partial message deltas will be sent as SSE chunks. Default: false
reasoning_effortstringOptionalHow much the model thinks before answering: "low" | "medium" | "high". Titan Ultra always runs at maximum depth. Default: "low"
temperaturenumberOptionalSampling temperature between 0.5 and 1.0. Default: 1.0

Available Models

Zero Pro 1.2

REASONING

Frontier reasoning model with caller-controlled thinking (low / medium / high). Excels at code generation, math, analysis, and complex multi-step tasks with 128k context.

Model ID: zero-pro-1.2

Context: 128,000 tokens

Thinking: caller-controlled effort

Titan Ultra

MAX THINKING

Deep-reasoning flagship tier. Always deliberates at maximum depth before answering โ€” built for architecture, agents, and heavyweight multi-step workloads.

Model ID: titan-ultra

Context: up to 1,000,000 tokens

Thinking: maximum depth (always on)