Skip to content
FUMOFUMODocs

Getting started

Fusion supports OpenAI-compatible Chat Completions and Responses interfaces. This quickstart uses Chat Completions; see the Responses API reference for Responses clients.

You need three values:

Value
Base URLhttps://capi.fumolab.ai/api/fusion/v1
API keyCreate in the console
ModelView your available models

Get an API key

This page is for online self-service customers using FUMO Dashboard.

  1. Sign up. Open the registration page and use your email and verification code, or continue with Google / GitHub. When signing up by email, enter your representative's Sales Code if you have one. If you already have an account, sign in.
  2. Prepare credits. Bind a payment card in Account, check your starter credit eligibility, and top up as needed.
  3. Create an API key. Open API Keys in the console, click Create New Key, enter a key name, and create it.
  4. Copy the key. Return to the key list and click Copy, then store it in an environment variable as described below.

If you sign in with Google / GitHub or skipped the Sales Code at signup, you can bind your representative's code in Account.

Check your balance and remaining Fusion credits in Account, and find model IDs and prices in Model. See Console and account for a guide to these pages.

Configure your endpoint and key

Set your FUMO Dashboard key and the self-service Base URL in your shell.

bash
export FUSION_API_KEY="your-key"
export FUSION_BASE_URL="https://capi.fumolab.ai/api/fusion/v1"

Keep production keys in a secret manager. Code snippets generated in FUMO Dashboard use FUMO_API_KEY. To run those snippets in the same shell, set export FUMO_API_KEY="$FUSION_API_KEY".

View your available models

List the models enabled for your self-service key.

bash
curl "${FUSION_BASE_URL}/models" \
  -H "Authorization: Bearer ${FUSION_API_KEY}"

Example response (shortened)

json
{
  "object": "list",
  "data": [
    { "id": "fusion-max-2.0", "object": "model" },
    { "id": "fusion-code-1.0", "object": "model" }
  ]
}

Copy a returned data[].id exactly into the request’s model field. For example, if the list includes fusion-max-2.0, send "model": "fusion-max-2.0". Your key’s response shows which models it can use.

Fusion models

ProductModel IDProduct focus
Fusion Max 2.0fusion-max-2.0High-performance coding, agents and document analysis, built for cost efficiency.
Fusion Code 1.0fusion-code-1.0Coding and software-agent workflows

Send a first request

The examples use fusion-max-2.0. If your list contains a different model, substitute its ID and confirm it supports Chat Completions.

text
POST /chat/completions
bash
curl "${FUSION_BASE_URL}/chat/completions" \
  -H "Authorization: Bearer $FUSION_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "fusion-max-2.0",
    "messages": [
      {"role": "user", "content": "Explain the trade-offs in this design."}
    ]
  }'

A successful response confirms the key, model authorization, request contract, and network path.

Use the OpenAI Python SDK

Install the SDK:

bash
pip install openai

Point the client at the Fusion Base URL:

python
import os
from openai import OpenAI

client = OpenAI(
    base_url=os.environ["FUSION_BASE_URL"],
    api_key=os.environ["FUSION_API_KEY"],
)

response = client.chat.completions.create(
    model="fusion-max-2.0",
    messages=[
        {"role": "system", "content": "Be precise and state your assumptions."},
        {"role": "user", "content": "Review this migration plan."},
    ],
)

print(response.choices[0].message.content)

Stream with the OpenAI TypeScript SDK

Install the SDK:

bash
pnpm add openai

Create a streaming request:

typescript
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: process.env.FUSION_BASE_URL,
  apiKey: process.env.FUSION_API_KEY,
});

const stream = await client.chat.completions.create({
  model: "fusion-max-2.0",
  messages: [
    { role: "user", content: "Find the race condition and propose a patch." },
  ],
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}

Troubleshoot the first call

401 — authentication failed

Confirm the request sends Authorization: Bearer <API_KEY> and that the key has not been truncated or replaced by another environment variable.

403 — service access denied

The key is valid but does not have access to the requested model or Fusion service. Check the model ID in your request. If the error persists, contact support with the model ID, error message, and request_id.

404 — route not found

Confirm that the Base URL ends in /v1, the client appends /models, /chat/completions, or /responses as appropriate, and the model ID is an authorized alias. The exact error envelope may vary by gateway.

Configure Codex with Responses · Configure OpenCode with Chat Completions · Review the API contracts

Both models are AVAILABLE with 128K maximum output. Max 2.0 has 1M context; Code 1.0 has 512K. Text/image input and text/tool-call output are supported. Agents read files; native file upload is not supported.