Chutes SDK Documentation
Welcome to the complete documentation for the Chutes SDK - a powerful Python framework for building and deploying serverless AI applications on GPU-accelerated infrastructure.
What is Chutes?
Chutes is a serverless AI compute platform that allows you to:
- π Deploy AI models and applications instantly
- π° Pay only for GPU time you actually use
- π§ Build custom Docker images or use pre-built templates
- π Scale automatically based on demand
- π― Focus on your AI logic, not infrastructure management
Quick Start
# Install the Chutes SDK
pip install chutes
# Register your account
chutes register
# Deploy your first chute
chutes deploy my_chute:chute
Key Features
π― Simple Decorator-Based API
Define your AI endpoints with simple Python decorators:
@chute.cord(public_api_path="/generate")
async def generate_text(self, prompt: str) -> str:
return await self.model.generate(prompt)
π§ Flexible Templates
Get started quickly with pre-built templates for popular AI frameworks:
from chutes.chute.template.vllm import build_vllm_chute
chute = build_vllm_chute(
username="myuser",
model_name="microsoft/DialoGPT-medium",
node_selector=NodeSelector(gpu_count=1)
)
ποΈ Custom Image Building
Build sophisticated Docker environments with a fluent API:
image = (
Image(username="myuser", name="custom-ai", tag="1.0")
.from_base("nvidia/cuda:12.2-devel-ubuntu22.04")
.with_python("3.11")
.run_command("pip install torch transformers")
.with_env("MODEL_PATH", "/app/models")
)
β‘ Hardware Optimization
Specify exactly the hardware you need:
node_selector = NodeSelector(
gpu_count=4,
min_vram_gb_per_gpu=80,
exclude=["old_gpus"]
)
Architecture Overview
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Your Code β β Chutes SDK β β Chutes Platform β
β β β β β β
β @chute.cord βββββΆβ Build & Deploy βββββΆβ GPU Clusters β
β def generate() β β β β β
β β β HTTP APIs β β Auto-scaling β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
Community & Support
- π Documentation: You're here!
- π¬ Discord: Join our community
- π Issues: GitHub Issues
Ready to get started? Head to the Installation Guide to begin your Chutes journey!