Inference endpoint
Run FusionKit as an OpenAI-compatible HTTP endpoint without launching a coding harness.
You can run FusionKit as a plain HTTP endpoint. This mode is useful when you want model fusion from curl, the OpenAI SDK, a custom application, or a benchmark harness without launching Codex, Claude Code, or Cursor.
fusionkit serve starts the same underlying stack as the harness launchers:
RouteKit routing, the Python synthesis sidecar, and the Fusion gateway.
Prepare the engine
Install the CLI and pre-provision the Python engine so the first request does not pay the uvx cold start.
npm install -g @fusionkit/cli
fusionkit setup
fusionkit init
fusionkit doctorEdit .routekit/router.yaml and export the provider variables named by its
registry-defined credentials. FusionKit reads only namespaced RouteKit model
IDs.
Start the endpoint
Run from inside the git repository you want the panel to see.
cd your-git-repo
fusionkit serve --port 8787
export FUSION_URL=http://127.0.0.1:8787Omit --port for an ephemeral port. Configure members and judge with
fusionkit ensemble; configure models and credentials in RouteKit.
The fused model id is fusion-panel. Each panel member id is also exposed for direct passthrough calls when you want to compare the ensemble against one member.
HTTP surface
The gateway exposes familiar routes under /v1.
| Route | Purpose |
|---|---|
/v1/chat/completions | OpenAI-compatible chat completions. |
/v1/responses | OpenAI Responses dialect used by Codex-style clients. |
/v1/messages | Anthropic Messages dialect used by Claude Code-style clients. |
/v1/messages/count_tokens | Anthropic token-count helper. |
/v1/models | Model listing in OpenAI or Anthropic shape. |
/v1/cursor/chat/completions | Cursor BYOK hybrid: accepts Cursor's Responses-shaped body on a Chat Completions path when Cursor's base URL override points at .../v1/cursor. Accepts routekit/<served-id> and discovered routekit/<served-id>:<effort> model names. |
/v1/cursor/models | Mirror of /v1/models for Cursor probing relative to its BYOK base URL. Advertises every id as routekit/<served-id> and reasoning-capable models as one :<effort> variant per discovered effort. |
/v1/embeddings | Embeddings route when the configured backend supports it. |
/health | Unauthenticated health check. |
Streaming example
curl -N "$FUSION_URL/v1/chat/completions" \
-H 'content-type: application/json' \
-d '{
"model": "fusion-panel",
"stream": true,
"messages": [
{ "role": "user", "content": "Explain a B-tree in two sentences." }
]
}'The -N flag disables curl buffering so you can see Server-Sent Events as they arrive. Remove "stream": true for a single JSON response.
Tool-calling example
Tools are passed through the panel and judge. When the ensemble decides to call a tool, the response contains a tool_calls array in the OpenAI Chat shape.
curl "$FUSION_URL/v1/chat/completions" \
-H 'content-type: application/json' \
-d '{
"model": "fusion-panel",
"messages": [
{ "role": "user", "content": "What is the weather in Paris?" }
],
"tools": [{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get the current weather for a city",
"parameters": {
"type": "object",
"properties": {
"city": { "type": "string" }
},
"required": ["city"]
}
}
}]
}'Execute the tool in your application and continue the conversation with a tool message, the same way you would with the OpenAI API.
Auth and binding
Loopback usage can run without auth. If you bind the gateway beyond loopback, require a token.
fusionkit serve --port 8787 --auth-token "$FUSIONKIT_GATEWAY_TOKEN"Then send either Authorization: Bearer <token> or x-api-key: <token>.
When to use this instead of a harness launcher
Use fusionkit serve when your application already owns the conversation loop, when you want to benchmark the endpoint directly, or when you want a familiar OpenAI-compatible URL. Use fusionkit codex, fusionkit claude, or fusionkit cursor when you want an existing coding agent to be wired automatically with its native protocol and tool loop.