Skip to content
Try Hanzo
Language: English (United States)

Use Hanzo AI with GitHub Copilot

Extend your GitHub Copilot workflow with Hanzo AI for access to additional models and capabilities via the API. Use Hanzo for tasks Copilot can't handle.

Get API key — Free
Hanzo API alongside Copilotpython
# Use GitHub Copilot in editor, Hanzo API in code
from openai import OpenAI
 
# Hanzo for programmatic access
client = OpenAI(
    base_url="https://api.hanzo.ai/v1",
    api_key="your-hanzo-api-key",
)
 
# Access the models Copilot does not carry
response = client.chat.completions.create(
    model="zen4-pro",
    messages=[{"role": "user", "content": "Review this code..."}],
)
4 of 12 lines point at Hanzo

GitHub Actions with Hanzo

typescript

3 of 14 lines point at Hanzo
GitHub Actions with Hanzotypescript
// In CI: use Hanzo AI for code review
import OpenAI from "openai";
 
const client = new OpenAI({
  baseURL: "https://api.hanzo.ai/v1",
  apiKey: process.env.HANZO_API_KEY,
});
 
const review = await client.chat.completions.create({
  model: "zen4-pro",
  messages: [{
    role: "user",
    content: `Review this PR diff:
${diff}`,
  }],
});

GitHub Actions workflow

yaml

1 of 13 lines point at Hanzo
GitHub Actions workflowyaml
name: AI Code Review
on: [pull_request]
jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: AI Review
        env:
          HANZO_API_KEY: ${{ secrets.HANZO_API_KEY }}
        run: |
          pip install openai
          python scripts/ai_review.py

API key setup

bash

2 of 4 lines point at Hanzo
API key setupbash
# Add to GitHub repo secrets
# Settings > Secrets > Actions > New secret
# Name: HANZO_API_KEY
# Value: your-hanzo-api-key

Created by GitHub / Microsoft

License: Proprietary · View source on GitHub →

Hanzo AI is OpenAI-compatible, so existing GitHub Copilot code works with zero refactoring. We deeply appreciate the GitHub / Microsoft team for building and maintaining this open-source project.

Ready to get started?

Create a free account and get your API key. The Free plan includes free model requests and Kai decisions, no card.