Skip to main content
HUD Gateway is an OpenAI-compatible inference service that provides a unified endpoint for accessing various LLM providers (Anthropic, OpenAI, Gemini, OpenRouter). It handles authentication, rate limiting, and credit management, allowing you to focus on building agents.

Quick Start

The gateway is available at https://inference.hud.ai. You can use it with any OpenAI-compatible client.

Using Python (OpenAI SDK)

from openai import AsyncOpenAI
import os

client = AsyncOpenAI(
    base_url="https://inference.hud.ai",
    api_key=os.environ["HUD_API_KEY"]
)

response = await client.chat.completions.create(
    model="claude-sonnet-4-5-20250929",
    messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)

Using curl

curl -X POST https://inference.hud.ai/chat/completions \
  -H "Authorization: Bearer <HUD_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-5-20250929",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Supported Models

HUD Gateway supports models from major providers.

OpenAI

  • gpt-5-2025-08-07
  • gpt-5.1-2025-11-13
  • computer-use-preview (Operator)

Anthropic

  • claude-sonnet-4-5-20250929
  • claude-haiku-4-5-20251001
  • claude-opus-4-5-20251101
  • claude-opus-4-1-20250805

xAI

  • grok-4-1-fast

Google

  • gemini-3-pro-preview
  • gemini-2.5-pro
  • gemini-2.5-flash

Via OpenRouter

  • glm-4.5v

Features

Unified Billing

When using HUD Gateway with your HUD API key, usage is automatically deducted from your HUD credits. This simplifies billing by consolidating multiple provider invoices into one.

Rate Limits

HUD Gateway automatically handles key rotation and rate limiting across our pool of enterprise keys.

Building Custom Agents with Tracing

For a complete example of building a custom agent that uses HUD Gateway with full tracing support, see the custom agent example. This example demonstrates:
  • Using the @instrument decorator to capture inference traces
  • Building a custom MCPAgent with HUD Gateway
  • Automatic token usage and latency tracking
View your traces on the HUD Dashboard.