ENTERPRISE AI GATEWAY · SELF-HOSTED

Give enterprise AI
room to grow.

One gateway for models, access, cost, and security. Give platform teams a shared view and business teams the tools to put AI to work.

Go gateway / Bilingual console / Docker Compose

YOUR AI INFRASTRUCTURE● Unified control
Business appsAI agentsInternal tools
XXHubEnterprise AI Gateway
AccessBudgetGuardrailsRouting
OpenAIAnthropicGeminiMore providers
PostgreSQLRedisSelf-hosted
✓Multiple protocols✓Organization governance✓Programmable guardrails✓Agents & multimodal

BUILT FOR YOUR ORGANIZATION

One endpoint. A broader enterprise toolkit.

Connect model resources, people, policies, and request outcomes for the everyday work of managing enterprise AI.

01

Models & protocols

OpenAI Chat / Responses, Anthropic Messages, and Gemini / Vertex. Public model names with supported conversion or native forwarding.

Model access
02

Governance & autonomy

Organizations, teams, projects, and scoped roles. Personal and service virtual keys with model permissions, expiration, and access revocation.

Permissions
03

Costs with clear ownership

Usage by user, key, team, and project. Budgets, RPM / TPM, cache rates, time windows, and historical price snapshots.

Pricing & usage
04

Routing for each business

Weight, load, latency, cost, and usage policies. Inherited templates, model groups, categorized fallbacks, retries, and cooldowns.

Routing policies
05

Policies in the request path

Text rules, secret detection, and moderation adapters. Combine HTTP, JSON, and LLM checks in XGo to block, redact, or flag.

Programmable guardrails
06

Continuous agent calls

Multi-turn messages and tool-call structures, Responses history continuation, and session tracing. Validate streams and compare models in Playground.

Sessions & runtime
07

Beyond conversation

Deployment-specific images, audio, embeddings, reranking, and video tasks. Track asynchronous status, results, usage, and settlement.

Media tasks
08

Visibility for operations

Model catalogs, configuration diagnostics, request and error logs, cost details, audit records, and health checks.

Operations

THE XHUB DIFFERENCE

Distinct capabilities. Practical outcomes.

Policies you can program

Compose enterprise checks in XGo pre-call guardrails. Draft testing and real calls share the same executor.

Explore scripts & examples →

Routing along your organization

Select templates through key, team, and organization scopes. Clear a binding to inherit; routing never expands model permissions.

Understand inheritance →

Pricing evidence for every call

Keep applied price snapshots, distinguish response and prompt caches, and deduplicate asynchronous task settlement.

Understand pricing →

ONE WORKSPACE

Shared resources. Scoped responsibilities.

Administrators configure resources. Members discover available models. Use one console to connect, validate, and trace requests.

XHub / Model catalog
XHub model catalog console

Actual interface from a configured instance. Fresh installations need provider credentials and deployments.

FROM SETUP TO SCALE

A clear path to adoption.

01

Connect models

Add credentials and deployments. Publish model names.

02

Set boundaries

Configure teams, members, access, and budgets.

03

Integrate apps

Issue virtual keys. Validate in Playground.

04

Keep governing

Review costs, adjust policies, and trace failures.

From one application to your organization.

Enterprise AI platform

Share a model catalog with departmental budgets and clear resource ownership.

Assistants & coding agents

Manage service keys, tool-call structures, and multi-turn usage.

RAG & content production

Bring retrieval, dialogue, and media tasks into a shared endpoint and usage system.

START ON YOUR INFRASTRUCTURE

Start in your own environment.

Clone the repository, build images on your host, then start the gateway, console, and stores with Docker Compose.

Requires Git, Go 1.25, Node.js ≥24.14.1, npm ≥11.10.0, Docker Compose, Bash, and a readable system CA bundle (override with XHUB_CA_CERT_FILE). Use WSL2 on Windows.

Complete setup & first request →
Console :3000Gateway API :4000
Docker Compose
git clone https://github.com/qiniu/xhub.git
cd xhub
bash deploy/build.sh
docker compose up -d --no-build
Python · OpenAI SDK
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_XHUB_VIRTUAL_KEY",
    base_url="http://localhost:4000",
)

response = client.chat.completions.create(
    model="YOUR_PUBLIC_MODEL_NAME",
    messages=[{"role": "user", "content": "Hello, XHub!"}],
)
print(response.choices[0].message.content)

DOCUMENTATION

Understand the platform. Use its capabilities.

Setup, administration, protocols, permissions, security, and operations. Built directly from repository documentation.

Browse all documentation →

Search full documentation: budgets, routing, Docker…