Skip to main content

Introduction

Bud AI Foundry provides multiple ways to interact with the platform programmatically:
  • Python SDK: High-level interface for Python applications
  • Gateway API: OpenAI-compatible REST API for model inference
  • CLI Tool: Command-line interface for automation and DevOps

Quick Comparison

InterfaceBest ForInstallation
Python SDKPython applications, data science workflowspip install git+https://github.com/BudEcosystem/BudAIFoundry-SDK
Gateway APIAny language, direct HTTP accessREST API calls
CLIDevOps, CI/CD, shell scriptspip install git+https://github.com/BudEcosystem/BudAIFoundry-SDK
OpenAI SDKDrop-in OpenAI replacementChange base URL

Key Capabilities

Model Inference

from budai import BudClient

client = BudClient(api_key="your-key")
response = client.chat.completions.create(
    model="llama-3.2-1b",
    messages=[{"role": "user", "content": "Hello!"}]
)

Pipeline Automation

# Create and execute deployment pipelines
pipeline = client.pipelines.create(
    name="Deploy Model",
    definition={
        "steps": [...]
    }
)

Infrastructure Management

# Manage clusters and deployments
cluster = client.clusters.get("cluster_prod")
deployment = client.deployments.create(
    model_id="model_xyz",
    cluster_id=cluster.id
)

Authentication

All API access requires authentication:
  1. API Keys: Generate in the dashboard under API Keys & Security
  2. Environment Variable: Set BUD_API_KEY for SDK/CLI
  3. Header: Use Authorization: Bearer <key> for direct API calls
See Authentication for detailed setup.

OpenAI Compatibility

The Gateway API is fully compatible with OpenAI’s interface:
from openai import OpenAI

# Just change the base URL
client = OpenAI(
    base_url="https://gateway.bud.studio/v1",
    api_key="your-bud-key"
)

# Use OpenAI SDK as normal
response = client.chat.completions.create(
    model="llama-3.2-1b",
    messages=[{"role": "user", "content": "Hello!"}]
)

Support

  • Documentation: Browse the sections in this tab
  • GitHub: BudAIFoundry-SDK
  • Issues: Report bugs and request features on GitHub
  • Email: contact@bud.studio for enterprise support

Next Steps