> ## Documentation Index
> Fetch the complete documentation index at: https://openrouter.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Fusion

> Multi-model deliberation as a server tool

Beta

> [!NOTE]
>
> **Beta**
>
> Server tools are currently in beta. The API and behavior may change.

The `openrouter:fusion` server tool gives any model access to multi-model deliberation. When your model decides a prompt benefits from multiple perspectives, it invokes this tool. A panel of models answers in parallel, an analyst compares their responses, and the structured analysis comes back to your model for the final answer.

This is the same pipeline behind the [`openrouter/fusion` model alias](https://openrouter.ai/docs/guides/routing/routers/fusion-router). Using the server tool directly gives you the most control. You can choose your own outer model, combine it with other tools, and configure the panel and analyst independently.

## Quick start

```typescript title="TypeScript" expandable lines theme={null}
const response = await fetch('https://openrouter.ai/api/v1/responses', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <OPENROUTER_API_KEY>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    model: '~anthropic/claude-opus-latest',
    input: 'Survey the strongest arguments for and against a carbon tax. Where do experts disagree?',
    tools: [
      { type: 'openrouter:fusion' },
    ],
  }),
});

const data = await response.json();
const message = [...data.output].reverse().find((item: { type: string }) => item.type === 'message');
console.log(message?.content.find((part: { type: string; text?: string }) => part.type === 'output_text')?.text);
```

```python title="Python" expandable lines theme={null}
import requests

response = requests.post(
  "https://openrouter.ai/api/v1/responses",
  headers={
    "Authorization": f"Bearer <OPENROUTER_API_KEY>",
    "Content-Type": "application/json",
  },
  json={
    "model": "~anthropic/claude-opus-latest",
    "input": "Survey the strongest arguments for and against a carbon tax. Where do experts disagree?",
    "tools": [
      {"type": "openrouter:fusion"},
    ],
  },
)

data = response.json()
message = next(item for item in reversed(data["output"]) if item["type"] == "message")
print(next(part["text"] for part in message["content"] if part["type"] == "output_text"))
```

```go title="Go" lines theme={null}
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"net/http"
	"os"
)

func main() {
	body, _ := json.Marshal(map[string]any{
		"model": "~anthropic/claude-opus-latest",
		"input": "Survey the strongest arguments for and against a carbon tax. Where do experts disagree?",
		"tools": []map[string]any{
			{"type": "openrouter:fusion"},
		},
	})

	req, _ := http.NewRequest("POST", "https://openrouter.ai/api/v1/responses", bytes.NewReader(body))
	req.Header.Set("Authorization", "Bearer "+os.Getenv("OPENROUTER_API_KEY"))
	req.Header.Set("Content-Type", "application/json")

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	// An error response has no output, so check the status before decoding
	if resp.StatusCode != http.StatusOK {
		panic("OpenRouter rejected the request: " + resp.Status)
	}

	var data struct {
		Output []struct {
			Type    string `json:"type"`
			Content []struct {
				Type string `json:"type"`
				Text string `json:"text"`
			} `json:"content"`
		} `json:"output"`
	}
	if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {
		panic(err)
	}

	for i := len(data.Output) - 1; i >= 0; i-- {
		if data.Output[i].Type != "message" {
			continue
		}
		for _, part := range data.Output[i].Content {
			if part.Type == "output_text" {
				fmt.Println(part.Text)
				break
			}
		}
		break
	}
}

```

```bash title="cURL" lines theme={null}
curl -s https://openrouter.ai/api/v1/responses \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "~anthropic/claude-opus-latest",
    "input": "Survey the strongest arguments for and against a carbon tax. Where do experts disagree?",
    "tools": [
      { "type": "openrouter:fusion" }
    ]
  }' | jq -r '[.output[] | select(.type == "message")] | last | .content[] | select(.type == "output_text") | .text'

```

```text title="Output" theme={null}
# The Carbon Tax Debate

Most economists agree on the theory of a carbon tax. The real disagreements are about practice: whether it can be passed and kept in place, how much it actually cuts emissions, and whether it should be the main climate policy or one tool among several.

---

## The strongest arguments for

**1. It fixes the problem at the source.** Greenhouse gas emissions are a textbook externality: polluters don't pay for the damage they cause. A tax on each ton (a "Pigouvian" tax) builds that cost into every decision. Firms and households then cut emissions wherever it's cheapest. No regulator needs to know in advance whether the best option is switching fuels, insulating homes, or changing how a product is made.

**2. It costs less than the alternatives.** A single price makes the cost of the last ton cut the same across the whole economy. Rules that target one sector at a time, like fuel-economy standards or appliance mandates, usually leave cheaper cuts elsewhere untouched. Studies regularly find regulation costs several times more per ton avoided than a price would.

**3. It raises money.** That revenue can:
- cut taxes that discourage work and investment (a "tax swap"),
- be returned to households as equal per-person dividends, which leaves most lower-income households better off, or
- pay for clean-energy investment.

A 2019 statement backing a carbon tax with dividends was signed by over 3,500 US economists, including 28 Nobel laureates and every living former Fed chair. That's unusually broad agreement for economics.

**4. It's simple and transparent.** Compared with layers of regulations and subsidies, a tax is harder for lobbyists to carve up. Compared with cap-and-trade, it gives businesses a predictable price to plan around.

**5. It keeps pushing innovation.** A rising price rewards every future cut in emissions, not just compliance with a fixed standard.

**6. There is real-world evidence it works.**
- **British Columbia** (since 2008): emissions fell relative to the rest of Canada, with no clear harm to growth.
- **Sweden** (since 1991, now one of the world's highest rates at roughly $120+ per ton): emissions fell substantially while the economy grew.
- **UK carbon price floor**: a major reason coal power nearly disappeared in the 2010s.

**7. Leakage can be managed.** "Leakage" means emissions moving to countries without a carbon price. Border adjustments, such as the EU's new carbon tariff on imports (CBAM), tax the carbon in imported goods. That protects domestic industry and pressures trading partners to adopt their own prices.

---

## The strongest arguments against

**1. It's very hard to pass and keep.** The costs are visible, especially at the gas pump, while the benefits are spread out and far in the future. The track record:
- Australia repealed its carbon price in 2014.
- France's planned fuel-tax increases helped spark the 2018 "yellow vest" protests and were dropped.
- Washington State voters rejected carbon-pricing ballot measures in 2016 and 2018.
- Canada set its consumer carbon tax to zero in 2025, even though most households got rebates larger than what they paid. Its industrial carbon pricing remains.
```

> [!NOTE]
>
> Fusion in the `tools` array also works on `/chat/completions`, but it's slower there than on the [Responses API](https://openrouter.ai/docs/api_reference/responses/overview.md) used in the examples above. For latency-sensitive use, stay on the Responses API.

## When does the model invoke it?

The tool's description tells the model to call `openrouter:fusion` only when a task genuinely benefits from multiple perspectives: research questions, multi-domain critique, "compare and contrast" prompts, or anything where being wrong is expensive. Simple tactical prompts won't trigger it.

To **force** fusion on every request, set `tool_choice: "required"`. See [Forcing fusion on every request](https://openrouter.ai/docs/guides/routing/routers/fusion-router.md#forcing-fusion-on-every-request).

## Parameters

Pass an optional `parameters` object on the tool entry to override defaults:

```json lines theme={null}
{
  "tools": [
    {
      "type": "openrouter:fusion",
      "parameters": {
        "analysis_models": [
          "~google/gemini-flash-latest",
          "deepseek/deepseek-v3.2",
          "~moonshotai/kimi-latest"
        ],
        "model": "~anthropic/claude-opus-latest"
      }
    }
  ]
}
```

| Field | Default | Description |
| - | - | - |
| `analysis_models` | Quality preset (`~anthropic/claude-opus-latest`, `~openai/gpt-sol-latest`, `~google/gemini-pro-latest`) | Models that form the panel. Each runs in parallel with `openrouter:web_search` and `openrouter:web_fetch` enabled. 1–8 models allowed. |
| `model` | Your outer model | The analyst that produces the structured analysis JSON. Defaults to the same model handling your request. |
| `max_tool_calls` | `4` | Max tool-calling steps each panel model and the analyst may take in their `openrouter:web_search` / `openrouter:web_fetch` loop before they must return text. Range 1–16. |
| `max_completion_tokens` | `16000` | Max output tokens (including reasoning) per inner panel/analyst call. Keeps reasoning-heavy models from exhausting their budget before producing visible text. |
| `reasoning` | Provider default | Reasoning config forwarded to the panel and analyst calls: an object with optional `effort` and `max_tokens`. |
| `temperature` | Provider default | Temperature (`0`–`2`) forwarded to the panel calls. The analyst always runs at temperature 0. |

## What the tool returns

On success, the tool result contains the structured analysis and the raw panel responses:

```json expandable lines theme={null}
{
  "status": "ok",
  "analysis": {
    "consensus": ["Points all or most panel models agreed on"],
    "contradictions": [
      { "topic": "...", "stances": [{ "model": "...", "stance": "..." }] }
    ],
    "partial_coverage": [
      { "models": ["..."], "point": "Only some models covered this" }
    ],
    "unique_insights": [
      { "model": "...", "insight": "Something only one model raised" }
    ],
    "blind_spots": ["Topics no panel model addressed"]
  },
  "responses": [
    { "model": "anthropic/claude-opus-4.5", "content": "..." },
    { "model": "openai/gpt-4.1", "content": "..." },
    { "model": "google/gemini-2.5-pro", "content": "..." }
  ]
}
```

When some panel models error but at least one succeeds, the result still has `status: "ok"` and adds a `failed_models` array describing which ones failed and why.

### Analyst degradation

If the **panel** succeeds but the **analyst** fails (an upstream error, an empty completion, or output that isn't valid analysis JSON), the tool does **not** error. It returns `status: "ok"` with the raw panel `responses` and simply **omits** `analysis`. Your model can still write the final answer from the panel responses:

```json lines theme={null}
{
  "status": "ok",
  "responses": [
    { "model": "anthropic/claude-opus-4.5", "content": "..." }
  ]
}
```

### Hard failures

The tool only returns `status: "error"` when it can't produce any useful output. In that case it includes a typed `failure_reason`:

```json lines theme={null}
{
  "status": "error",
  "error": "all panel models failed",
  "failure_reason": "all_panels_failed"
}
```

| Reason | Meaning |
| - | - |
| `all_panels_failed` | Every panel model returned an error. |
| `insufficient_credits` | Every panel model failed and at least one was due to insufficient credits. |
| `rate_limited` | Every panel model failed and at least one was rate-limited. |
| `fusion_invocation_capped` | Fusion was already invoked earlier in the same turn; a second call is rejected. |
| `unexpected_error` | An unexpected error interrupted the fusion run. |

The calling model can fall back to answering without the analysis whenever fusion fails or degrades.

## Web tools

`openrouter:web_search` and `openrouter:web_fetch` are enabled on both the **panel** and the **analyst** calls, so models can pull fresh sources while they answer and analyze. The analyst compares the panel responses rather than merging them: it treats what all or most models agree on as higher-confidence consensus, surfaces contradictions, preserves unique insights from individual models, and flags blind spots none of them addressed. The outer model writes the final answer from that analysis, so the result isn't a simple majority vote.

## Recursion protection

Inner fusion calls carry an `x-openrouter-fusion-depth` header. Panel and analyst models cannot recursively invoke `openrouter:fusion`. The plugin refuses to inject the tool a second time, keeping deliberation bounded to a single level.

## Related

* [Fusion Router (`openrouter/fusion`)](https://openrouter.ai/docs/guides/routing/routers/fusion-router)
* [Web Search server tool](https://openrouter.ai/docs/guides/features/server-tools/web-search.md)
* [Web Fetch server tool](https://openrouter.ai/docs/guides/features/server-tools/web-fetch.md)
* [`/labs/fusion`](https://openrouter.ai/fusion/): interactive playground
