The official SDK for Sudo provides a developer-friendly and type-safe way to integrate with the Sudo AI platform. Available in both Python and TypeScript, it offers comprehensive support for all Sudo features including AI responses with streaming, tool calling, structured outputs, and more.

Key Features

🚀 Easy to Use

Simple installation with pip, npm, or your preferred package manager. Get started in minutes with intuitive APIs.

⚡ High Performance

Built-in connection pooling, retry logic, and async support for optimal performance.

🔄 Streaming Support

Server-sent events for real-time streaming responses with proper context management.

🛠️ Tool Calling

Native support for function calling and parallel tool execution.

📊 Structured Output

JSON schema validation and structured data extraction capabilities.

🖼️ Multimodal

Support for images, audio, and other modalities beyond text.

Quick Start

TypeScript
import { Sudo } from "sudo-ai";

const sudo = new Sudo({
  serverURL: "https://sudoapp.dev/api",
  apiKey: process.env.SUDO_API_KEY ?? "",
});

async function main() {
  const response = await sudo.router.create({
    model: "claude-sonnet-4-20250514",
    messages: [
      { role: "user", content: "Hello! How are you?" }
    ]
  });
  
  console.log(response.choices[0].message.content);
}

main();

Documentation Sections

SDK Benefits

Type Safety

Both SDKs are fully typed - Python with Pydantic models and TypeScript with native types, providing excellent IDE support and compile-time error checking.

Error Handling

Comprehensive error handling with specific error types and detailed error information in both languages.

Resource Management

Automatic connection pooling and resource cleanup with context manager support (Python) and proper resource management (TypeScript).

Performance

Built-in retry logic, connection reuse, and async support for high-performance applications in both languages.

Next Steps

  1. Install the SDK - Get started with installation and setup
  2. Try Chat Completion - Create your first AI response
  3. Explore Streaming - Add real-time capabilities
  4. Advanced Features - Tool calling, structured output, and more
The Sudo SDK follows semantic versioning in both languages. For Python, check the PyPI page and for TypeScript, check the npm page for the latest release information.Python: Compatible with Python 3.9+
TypeScript: Compatible with Node.js 14+ and modern browsers