Skip to main content

What is routing?

Instead of hard-coding one model into every client, you point your client at Manifest and let it pick the model. Send auto as the model, and Manifest resolves the real model behind the scenes based on the rules you set on the dashboard Routing page.

The two routing types

Default

One model plus up to 5 fallbacks. Every request lands here unless a custom tier matches.

Custom

Match a request header to a tier you define, and route it to its own model.
Routing runs in-process. There’s no extra network call and no added latency.

Default

Every agent has a default tier: one model plus up to five fallbacks. You set it on the Routing page and can change it anytime without touching your code. Send auto as the model, and any request that doesn’t match a custom tier goes to your default.

Custom

Custom tiers route by request header. You create a tier on the dashboard, give it a header key and value, and pin it to a model with its own fallbacks. When an incoming request carries that header, Manifest sends it to that tier’s model instead of the default. The header key is yours to choose (lowercase letters, numbers, and hyphens). A few names are reserved and rejected, including authorization, cookie, and x-api-key. Send the header from your client like any other:
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://app.manifest.build/v1",
  apiKey: "mnfst_YOUR_KEY",
  defaultHeaders: { "x-manifest-tier": "batch" }, // your tier's key and value
});

const response = await client.chat.completions.create({
  model: "auto",
  messages: [{ role: "user", content: "Summarize this report." }],
});
Create as many tiers as you need, each with its own model and parameters. This is handy for isolating an agent’s subtasks, A/B testing two models, or letting an orchestration layer decide the tier itself.

Route a specific model

To skip routing for a single request, send a real model ID instead of auto. Manifest forwards it straight to that model’s provider, with no tier lookup and no fallbacks. Call GET /v1/models to list the model IDs your agent can reach.
curl -X POST https://app.manifest.build/v1/chat/completions \
  -H "Authorization: Bearer mnfst_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-4o",
    "messages": [{"role": "user", "content": "Hello"}]
  }'
The response comes back with X-Manifest-Tier: direct, so you can tell a direct call from a routed one. Direct model IDs work on the OpenAI-format endpoints (/v1/chat/completions and /v1/responses). Requests to the Anthropic /v1/messages endpoint always route through your default or custom tiers.