Back to blog

Using the Fusion API in Cursor, Cline, LangChain & Vercel AI SDK

How to plug the OpenRouter Fusion API into Cursor, Cline, LangChain and the Vercel AI SDK — since it is OpenAI-compatible, it drops into each in a few lines.

Jun 15, 2026FusionAPIFusionAPI
Using the Fusion API in Cursor, Cline, LangChain & Vercel AI SDK

Because the Fusion API speaks the OpenAI protocol, almost any tool that lets you set a base URL and a model id can use it. The recipe is always the same: base URL https://openrouter.ai/api/v1, model openrouter/fusion, your OpenRouter key.

Cursor

In Settings → Models, enable a custom OpenAI-compatible model:

  • Override base URL: https://openrouter.ai/api/v1
  • API key: your OpenRouter key (sk-or-...)
  • Model name: openrouter/fusion

Cursor will route chat through Fusion. Note that agentic coding loops make many calls, so Fusion's per-call cost adds up fast — reach for it on hard reasoning, and a cheaper single model for routine edits. (Why Fusion costs more.)

Cline (VS Code)

Pick OpenRouter as the API provider, paste your key, and set the model to openrouter/fusion. If Cline offers an "OpenAI Compatible" provider instead, use base URL https://openrouter.ai/api/v1.

LangChain (Python)

from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    base_url="https://openrouter.ai/api/v1",
    api_key="sk-or-...",
    model="openrouter/fusion",
)

print(llm.invoke("Draft an architecture review checklist.").content)

Vercel AI SDK (TypeScript)

import { createOpenAI } from "@ai-sdk/openai";
import { streamText } from "ai";

const openrouter = createOpenAI({
  baseURL: "https://openrouter.ai/api/v1",
  apiKey: process.env.OPENROUTER_API_KEY,
});

const { textStream } = await streamText({
  model: openrouter("openrouter/fusion"),
  prompt: "Compare two database options for a serverless app.",
});

for await (const chunk of textStream) process.stdout.write(chunk);

When to wire Fusion in

Fusion shines on deep research, architecture decisions, and accuracy-critical answers — not on high-frequency, low-stakes calls where its cost multiplies. Estimate the trade-off with the cost calculator, and prototype prompts in the Playground before you commit. For the raw request details, see how to call the Fusion API.