Docs / Getting Started / How to Use the Kazepute API to Manage Your Breezes

How to Use the Kazepute API to Manage Your Breezes

By Admin · Mar 15, 2026 · Updated Apr 23, 2026 · 332 views · 3 min read

The Kazepute API lets you programmatically manage your Breezes (VPS instances) — creating, resizing, rebuilding, and destroying servers without logging into the portal. This guide covers authentication, common operations, and practical automation examples.

Getting Your API Token

  1. Log in to the Kazepute Portal
  2. Navigate to Account Settings then API Tokens
  3. Click Generate New Token
  4. Give your token a descriptive name (e.g., CI/CD Pipeline, Monitoring Script)
  5. Copy the token immediately — it will not be shown again

Authentication

# All API requests require a Bearer token in the Authorization header
curl -H "Authorization: Bearer YOUR_API_TOKEN" 
     -H "Content-Type: application/json" 
     https://kazepute.com/api/v1/breezes

List Your Breezes

# GET /api/v1/breezes
curl -s -H "Authorization: Bearer $KAZEPUTE_TOKEN" 
     https://kazepute.com/api/v1/breezes | jq

# Response:
# {
#   "data": [
#     {
#       "id": 42,
#       "name": "web-prod-01",
#       "status": "running",
#       "ip_address": "198.48.63.50",
#       "plan": "breeze-4",
#       "vcpus": 4,
#       "ram_mb": 8192,
#       "disk_gb": 80,
#       "region": "nyc1",
#       "os": "ubuntu-24.04",
#       "created_at": "2025-06-15T10:30:00Z"
#     }
#   ]
# }

Create a New Breeze

# POST /api/v1/breezes
curl -s -X POST 
     -H "Authorization: Bearer $KAZEPUTE_TOKEN" 
     -H "Content-Type: application/json" 
     -d "{
       "name": "staging-01",
       "plan": "breeze-2",
       "region": "nyc1",
       "os": "ubuntu-24.04",
       "ssh_keys": [123],
       "user_data": "#!/bin/bash
apt update && apt upgrade -y"
     }" 
     https://kazepute.com/api/v1/breezes | jq

Power Actions

# Power off a Breeze
curl -s -X POST 
     -H "Authorization: Bearer $KAZEPUTE_TOKEN" 
     https://kazepute.com/api/v1/breezes/42/power-off

# Power on a Breeze
curl -s -X POST 
     -H "Authorization: Bearer $KAZEPUTE_TOKEN" 
     https://kazepute.com/api/v1/breezes/42/power-on

# Reboot a Breeze
curl -s -X POST 
     -H "Authorization: Bearer $KAZEPUTE_TOKEN" 
     https://kazepute.com/api/v1/breezes/42/reboot

Rebuild a Breeze

# Reinstall the OS (WARNING: destroys all data!)
curl -s -X POST 
     -H "Authorization: Bearer $KAZEPUTE_TOKEN" 
     -H "Content-Type: application/json" 
     -d "{"os": "ubuntu-24.04"}" 
     https://kazepute.com/api/v1/breezes/42/rebuild

Practical Automation: CI/CD Integration

# .github/workflows/deploy.yml
name: Deploy to Production
on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Deploy to Breeze
        env:
          DEPLOY_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
          SERVER_IP: ${{ secrets.PRODUCTION_IP }}
        run: |
          mkdir -p ~/.ssh
          echo "$DEPLOY_KEY" > ~/.ssh/id_ed25519
          chmod 600 ~/.ssh/id_ed25519
          ssh-keyscan $SERVER_IP >> ~/.ssh/known_hosts

          ssh deploy@$SERVER_IP "cd /var/www/myapp && 
            git pull origin main && 
            composer install --no-dev && 
            php artisan migrate --force && 
            php artisan config:cache && 
            sudo systemctl reload php8.3-fpm"

Rate Limits

  • General endpoints: 60 requests per minute
  • Create/destroy actions: 10 requests per minute
  • Power actions: 30 requests per minute
# Rate limit headers in every response:
# X-RateLimit-Limit: 60
# X-RateLimit-Remaining: 58
# X-RateLimit-Reset: 1706097600

Error Handling

# Always check HTTP status codes in your scripts
response=$(curl -s -o /dev/null -w "%{http_code}" 
  -H "Authorization: Bearer $KAZEPUTE_TOKEN" 
  https://kazepute.com/api/v1/breezes)

case $response in
  200|201) echo "Success" ;;
  401)     echo "Error: Invalid API token" ;;
  404)     echo "Error: Resource not found" ;;
  422)     echo "Error: Validation failed" ;;
  429)     echo "Error: Rate limited - wait and retry" ;;
  500)     echo "Error: Server error - contact support" ;;
esac

Best Practices

  1. Store tokens securely — Use environment variables or a secrets manager, never hardcode
  2. Use descriptive names — Name Breezes by purpose: web-prod-01, db-staging, worker-03
  3. Handle errors gracefully — Check HTTP status codes and implement retries for transient errors
  4. Respect rate limits — Add delays between batch operations
  5. Tag your resources — Use tags to organize and filter Breezes programmatically

Was this article helpful?