fusionAIze Gate keeps the client-facing surface intentionally small: OpenAI-compatible paths for chat and image workloads, plus a compact operator API for health, routing introspection, and updates.
Returns the virtual auto model, any configured routing modes and model shortcuts, plus one entry for every provider that actually loaded at startup.
This is also the source of truth for OpenClaw-side model ids under a faigate provider entry.
curl -fsS http://127.0.0.1:8090/v1/modelsRoutes OpenAI-style chat requests.
model: "auto"runs the normal routing flowmodel: "eco"/model: "premium"/ other configured routing modes apply virtual mode preferences firstmodel: "<provider-id>"routes directly to a loaded providermodel: "<shortcut-id>"routes directly through one configured model shortcut- request size is bounded by
security.max_json_body_bytes
curl -fsS http://127.0.0.1:8090/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "auto",
"messages": [
{"role": "user", "content": "Summarize the benefits of a local AI gateway."}
],
"max_tokens": 128
}'The Anthropic bridge stays optional and v1 is intentionally narrow. It exists to let Claude-oriented clients keep one stable local endpoint while Gate still owns routing, health checks, fallback, and provider selection.
Enable it with:
api_surfaces:
anthropic_messages: true
anthropic_bridge:
enabled: trueRoutes Anthropic-/Claude-style message requests through the same internal Gate routing path used by the OpenAI-compatible surface.
- validates a small v1 subset of Anthropic
messages - supports a simple
systemprompt - supports text content blocks
- non-streaming only in v1
- optional
anthropic_bridge.model_aliasescan map Claude-facing model ids onto Gate routing modes or provider ids
curl -fsS http://127.0.0.1:8090/v1/messages \
-H 'Content-Type: application/json' \
-H 'anthropic-client: claude-code' \
-d '{
"model": "claude-code",
"system": "Prefer concise technical explanations.",
"messages": [
{"role": "user", "content": "Summarize the current fallback path."}
]
}'Response shape is Anthropic-compatible and still carries the normal Gate response headers such as:
X-faigate-ProviderX-faigate-ProfileX-faigate-LayerX-faigate-Rule
Returns a minimal Anthropic-compatible token-count response for the same request structure as /v1/messages.
v1 uses a deterministic local estimate instead of provider-exact token accounting.
curl -fsS http://127.0.0.1:8090/v1/messages/count_tokens \
-H 'Content-Type: application/json' \
-d '{
"model": "claude-code",
"messages": [
{"role": "user", "content": "Count these tokens."}
]
}'Response body:
{"input_tokens": 11}Response headers make the approximation explicit:
X-faigate-Token-Count-Exact: falseX-faigate-Token-Count-Method: estimated-char-v1
Known v1 bridge limits:
- non-streaming only
- text blocks plus basic
tool_use/tool_result - image or binary content blocks are rejected
count_tokensis an estimate, not provider-exact accounting
Routes image-generation requests to providers with capabilities.image_generation: true.
- validates
prompt,n, andsizebefore any provider call - supports image-policy hints via
metadata.image_policyorX-faigate-Image-Policy - works well with OpenClaw when
imageModel.primaryisfaigate/autoor one explicitfaigate/<provider-id>
curl -fsS http://127.0.0.1:8090/v1/images/generations \
-H 'Content-Type: application/json' \
-d '{
"model": "auto",
"prompt": "An architectural diagram of a local AI gateway, blueprint style",
"size": "1024x1024"
}'Routes image-editing requests to providers with capabilities.image_editing: true.
- expects
multipart/form-data - currently supports one required
imageand one optionalmask - rejects uploads above
security.max_upload_bytes - accepts image-policy hints via
image_policy,metadata.image_policy, orX-faigate-Image-Policy - requires at least one loaded provider with
capabilities.image_editing: true
curl -fsS http://127.0.0.1:8090/v1/images/edits \
-F 'model=auto' \
-F 'prompt=Remove the background and keep the subject centered' \
-F 'image=@input.png' \
-F 'mask=@mask.png'Returns overall service status, provider summary, and capability coverage.
Each provider entry includes health, failure counters, average latency, last error, contract, backend, tier, capabilities, and image metadata.
curl -fsS http://127.0.0.1:8090/healthReturns the loaded provider inventory plus the same capability-coverage summary used by the dashboard.
- optional
capability=<name> - optional
healthy=true|false
curl -fsS 'http://127.0.0.1:8090/api/providers?capability=image_generation'Returns the curated provider-catalog view with drift, freshness, volatility, auth-mode, source-confidence metadata, an explicit link-neutral recommendation policy block, and optional disclosed provider-discovery links for configured providers.
curl -fsS http://127.0.0.1:8090/api/provider-catalogFor local operator use, the same discovery block is also available via:
./scripts/faigate-provider-discovery
./scripts/faigate-provider-discovery --jsonReturns the compact discovery-link view with the same link-neutral recommendation policy block, plus optional filters for link_source, offer_track, and disclosed_only.
curl -fsS 'http://127.0.0.1:8090/api/provider-discovery?offer_track=free'
curl -fsS 'http://127.0.0.1:8090/api/provider-discovery?link_source=operator_override&disclosed_only=true'
./scripts/faigate-provider-discovery --json --offer-track free
./scripts/faigate-provider-discovery --link-source operator_override --disclosed-onlyReturns aggregate request counters, token usage, per-client breakdowns, aggregate client totals, client highlight summaries, cost data, and operator-action summaries.
curl -fsS http://127.0.0.1:8090/api/statsReturns recent request records with optional filters for provider, client tag, layer, and success state.
curl -fsS 'http://127.0.0.1:8090/api/recent?limit=20'Returns detailed route traces including requested model, decision reason, attempt order, client profile, and selected provider.
curl -fsS 'http://127.0.0.1:8090/api/traces?limit=20'Returns current release information plus update guardrails such as alert level, rollout ring, release age eligibility, maintenance-window state, and verification hints.
curl -fsS http://127.0.0.1:8090/api/updateReturns helper-driven operator actions such as update checks and auto-update attempts.
curl -fsS 'http://127.0.0.1:8090/api/operator-events?limit=20'Dry-runs chat routing and returns the selected provider, routing layer, decision reason, resolved mode, resolved shortcut, profile resolution, and attempt order.
curl -fsS http://127.0.0.1:8090/api/route \
-H 'Content-Type: application/json' \
-d '{
"model": "auto",
"messages": [
{"role": "user", "content": "Plan a low-latency response path for a CLI agent."}
]
}'Dry-runs image-generation or image-editing routing without calling an upstream provider.
curl -fsS http://127.0.0.1:8090/api/route/image \
-H 'Content-Type: application/json' \
-d '{
"operation": "generation",
"model": "auto",
"prompt": "A clean dashboard screenshot mockup",
"size": "1024x1024"
}'Serves the built-in no-build operator dashboard.
open http://127.0.0.1:8090/dashboardNon-streaming chat completions include:
X-faigate-ProviderX-faigate-Modewhen a virtual routing mode was activeX-faigate-Shortcutwhen a model shortcut was usedX-faigate-LayerX-faigate-Rule
These are intentionally bounded and sanitized before they leave the gateway.