# Use Hanzo AI with Docker — Hanzo AI > Deploy Hanzo AI-powered services in Docker containers. Use the Hanzo API from any containerized application with proper environment configuration. [Integrations](https://hanzo.ai/integrations)/Docker 🐳Infrastructure # Use Hanzo AI with Docker Deploy Hanzo AI-powered services in Docker containers. Use the Hanzo API from any containerized application with proper environment configuration. Base URL: `https://api.hanzo.ai/v1` API Key: Get yours at [hanzo.ai/signup](https://hanzo.ai/signup) · Fully OpenAI-compatible · 500+ models available 🐳 Created by [Docker / Moby Project](https://docker.com) License: Apache-2.0 · [View source on GitHub →](https://github.com/moby/moby) Hanzo AI is OpenAI-compatible, so existing Docker code works with zero refactoring. We deeply appreciate the Docker / Moby Project team for building and maintaining this open-source project. ## Dockerfile dockerfile ``` FROM python:3.12-slim WORKDIR /app COPY requirements.txt . RUN pip install -r requirements.txt COPY . . ENV HANZO_API_KEY="" ENV OPENAI_API_BASE="https://api.hanzo.ai/v1" CMD ["python", "main.py"] ``` ## compose.yml yaml ``` services: app: build: . environment: - HANZO_API_KEY=${HANZO_API_KEY} - OPENAI_API_BASE=https://api.hanzo.ai/v1 ports: - "8000:8000" restart: unless-stopped ``` ## Run with env bash ``` # .env file HANZO_API_KEY=your-hanzo-api-key # Start docker compose up -d # Or direct run docker run -e HANZO_API_KEY=your-key -p 8000:8000 my-ai-app ``` ## App code python ``` import os from openai import OpenAI client = OpenAI( base_url=os.environ.get("OPENAI_API_BASE", "https://api.hanzo.ai/v1"), api_key=os.environ["HANZO_API_KEY"], ) ``` ## Ready to get started? Create a free account and get your API key. 100K API calls/month free forever. [Get API Key — Free](https://hanzo.ai/signup)[Browse Models](https://hanzo.ai/models) ## More integrations [OpenAI Python SDK](https://hanzo.ai/integrations/openai-sdk)[Anthropic SDK](https://hanzo.ai/integrations/anthropic-sdk)[LangChain](https://hanzo.ai/integrations/langchain)[LlamaIndex](https://hanzo.ai/integrations/llamaindex)[Vercel AI SDK](https://hanzo.ai/integrations/vercel-ai-sdk)[Hugging Face](https://hanzo.ai/integrations/huggingface)[AutoGen](https://hanzo.ai/integrations/autogen)[CrewAI](https://hanzo.ai/integrations/crewai)[DSPy](https://hanzo.ai/integrations/dspy)[Haystack](https://hanzo.ai/integrations/haystack)[Cursor](https://hanzo.ai/integrations/cursor)[Continue.dev](https://hanzo.ai/integrations/continue-dev)[GitHub Copilot](https://hanzo.ai/integrations/github-copilot)[Kubernetes](https://hanzo.ai/integrations/kubernetes)[Python](https://hanzo.ai/integrations/python)[TypeScript](https://hanzo.ai/integrations/typescript)[Go](https://hanzo.ai/integrations/go)[Rust](https://hanzo.ai/integrations/rust)