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: 'titan-pro', // 128k context balanced model (or 'titan-ultra')
    messages: [
      { role: 'user', content: 'Explain 128k context reasoning in 3 bullet points.' }
    ],
  });
  console.log(response.choices[0].message.content);

  // 2. Real-Time Streaming Call
  const stream = await client.chat.completions.create({
    model: 'titan-pro',
    messages: [
      { role: 'user', content: 'Write a TypeScript debounce function.' }
    ],
    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"titan-pro" or "titan-ultra"
messagesarrayYesArray of message objects with role and content
streambooleanOptionalIf set, partial message deltas will be sent as SSE chunks. Default: false
temperaturenumberOptionalSampling temperature between 0.0 and 2.0. Default: 1.0

Available Models

Titan Pro (Thinking)

BALANCED

Balanced performance for everyday reasoning, RAG embeddings, and rapid coding workflows.

Context: 128,000 tokens

Latency: <500ms P50

Titan Ultra (Thinking)

PRO

Frontier multi-step reasoning, mathematical proof, code synthesis, and deep logic.

Context: 128,000 tokens

Self-Verification CoT Engine