Support agent (5 hops)
40M input + 12M output tokens / month
Flash plan + Sonnet execute
- Official (Claude Sonnet 4.6)
- $300.00/mo
- LumeAPI
- $150.00/mo
- Monthly savings
- $150.0050% off
Local & self-hosted agents
Run LangGraph, OpenClaw, or custom agent orchestration on your machine — route each hop through LumeAPI with OpenAI-compatible Chat Completions and swap model id per step.
Agents multiply tokens per user action. Cheap steps on Flash or mini; hard reasoning on Sonnet or Sol — same API key and base URL.
Official reference vs LumeAPI catalog rates. Pricing unit: per 1M input / output tokens. Last updated: 2026-07-22. Source: provider list price.
| Model | Official (in / out) | LumeAPI (in / out) | Savings | |
|---|---|---|---|---|
| GPT-5.6 Solgpt-5.6-sol | $5.00 / $30.00 | $1.50 / $9.00 | 70% off | Details → |
| GPT-5.6 Terragpt-5.6-terra | $2.50 / $15.00 | $0.75 / $4.50 | 70% off | Details → |
| GPT-5.5gpt-5.5 | $5.00 / $30.00 | $1.50 / $9.00 | 70% off | Details → |
| GPT-5.4gpt-5.4 | $2.50 / $15.00 | $0.75 / $4.50 | 70% off | Details → |
| Claude Fable 5claude-fable-5 | $10.00 / $50.00 | $5.00 / $25.00 | 50% off | Details → |
| Claude Opus 4.8claude-opus-4-8 | $5.00 / $25.00 | $2.50 / $12.50 | 50% off | Details → |
| Claude Opus 4.7claude-opus-4-7 | $5.00 / $25.00 | $2.50 / $12.50 | 50% off | Details → |
| Claude Sonnet 4.6claude-sonnet-4-6 | $3.00 / $15.00 | $1.50 / $7.50 | 50% off | Details → |
| Gemini 3.1 Progemini-3.1-pro-preview | $2.00 / $12.00 | $1.00 / $6.00 | 50% off | Details → |
| GPT-5.4 minigpt-5.4-mini | $0.75 / $4.50 | $0.225 / $1.35 | 70% off | Details → |
| Gemini 3.5 Flashgemini-3.5-flash | $1.50 / $9.00 | $0.75 / $4.50 | 50% off | Details → |
| Gemini 3 Flashgemini-3-flash | $0.50 / $3.00 | $0.25 / $1.50 | 50% off | Details → |
Illustrative totals for claude-sonnet-4-6 using catalog list prices — your actual bill depends on retries, tool loops, and output length.
40M input + 12M output tokens / month
Flash plan + Sonnet execute
120M input + 45M output tokens / month
Long tool loops
Last verified: 2026-07-25
A local agent architecture does not require local inference. Run LangGraph, LangChain, or OpenClaw on your workstation, VM, container platform, or private network, then send only model requests through LumeAPI. Your agent process keeps ownership of tool execution, state, secrets, retrieval indexes, shell access, and approval workflows. LumeAPI provides the OpenAI-compatible Chat Completions endpoint the agent uses for text generation.
Point OpenAI-compatible clients at https://api.lumeapi.site/v1 and authenticate with a Bearer API key from the LumeAPI Console. The base URL must stop at /v1. Do not append /chat/completions in LangChain, LangGraph, OpenClaw, or SDK client configuration; those clients construct the Chat Completions path themselves.
The practical advantage is per-hop routing. A graph does not need to use one expensive model from intake through final answer. Use gemini-3-flash for classification and lightweight extraction, gpt-5.4-mini for plans and tool selection, claude-sonnet-4-6 for synthesis, and gpt-5.6-sol only when the task has earned escalation. This makes model choice an explicit part of graph design instead of a global application setting.
LumeAPI is an independent service. It is not OpenAI, Anthropic, or Google.
Last verified: 2026-07-25
Use stable catalog IDs in graph nodes and routing rules. The rates below are LumeAPI catalog input/output prices as updated 2026-07-22.
| Agent hop | Recommended model | Why this tier fits | LumeAPI input / output rate | Escalate when |
|---|---|---|---|---|
| Intent classification, triage, extraction | gemini-3-flash | Low-cost first pass for deciding whether a request needs tools, retrieval, or human review. | $0.25 / $1.50 | The request is ambiguous, high-risk, or requires multi-step reasoning. |
| Planning, tool selection, graph routing | gpt-5.4-mini | Good default planner when the node must turn a request into structured next actions without paying for a top-tier model on every hop. | $0.225 / $1.35 | The plan repeatedly fails validation or requires deeper technical judgment. |
| Research synthesis, user-facing drafting | claude-sonnet-4-6 | Use where the agent must combine retrieved evidence, tool outputs, and instructions into a coherent final response. | $1.50 / $7.50 | The task has material business impact, difficult reasoning, or unresolved contradictions. |
| Complex escalation and final review | gpt-5.6-sol | Reserve for exception paths: difficult diagnosis, high-stakes review, and complex final decisions. | $1.50 / $9.00 | A human review queue or a narrower specialist workflow is more appropriate. |
| High-capability generalist alternative | gpt-5.6-terra | A higher-tier option for nodes that need more than a mini model but do not require the designated escalation route. | $0.75 / $4.50 | The graph needs the stricter escalation policy assigned to gpt-5.6-sol. |
Rates are catalog figures, not a promise about the total cost of an agent run. Tool calls, retries, long prompts, retrieved context, and output limits still determine spend.
Last verified: 2026-07-25
LangGraph supports separate model instances per node. Treat that as a production control: each node should have an assigned task, model, output contract, timeout policy, and escalation condition.
For LangGraph's prebuilt agent flow, the relevant construction pattern is create_react_agent(llm, tools). For custom graphs, instantiate a different LLM per node rather than mutating one shared client.
Last verified: 2026-07-25
import os
from langchain_core.tools import tool
from langchain_openai import ChatOpenAI
from langgraph.prebuilt import create_react_agent
# Export these before running:
# export OPENAI_API_KEY='YOUR_LUMEAPI_KEY'
# export OPENAI_BASE_URL='https://api.lumeapi.site/v1'
BASE_URL = os.environ.get("OPENAI_BASE_URL", "https://api.lumeapi.site/v1")
API_KEY = os.environ["OPENAI_API_KEY"]
classifier_llm = ChatOpenAI(
model="gemini-3-flash",
api_key=API_KEY,
base_url=BASE_URL,
temperature=0,
)
planner_llm = ChatOpenAI(
model="gpt-5.4-mini",
api_key=API_KEY,
base_url=BASE_URL,
temperature=0,
)
synthesis_llm = ChatOpenAI(
model="claude-sonnet-4-6",
api_key=API_KEY,
base_url=BASE_URL,
temperature=0.2,
)
escalation_llm = ChatOpenAI(
model="gpt-5.6-sol",
api_key=API_KEY,
base_url=BASE_URL,
temperature=0,
)
@tool
def get_order_status(order_id: str) -> str:
"""Return a verified order status for an order ID."""
# Replace with an authenticated call to your internal service.
return f"Order {order_id}: status unavailable in this example."
# A tool-using node can have its own model assignment.
planner_agent = create_react_agent(planner_llm, [get_order_status])
# In a custom StateGraph, call classifier_llm in the routing node,
# invoke planner_agent in the planning/tool node, call synthesis_llm
# in the response node, and reserve escalation_llm for conditional edges.
result = classifier_llm.invoke(
"Classify this request as simple, tool_required, or escalation: "
"Where is order A-1042?"
)
print(result.content)
Do not change BASE_URL to https://api.lumeapi.site/v1/chat/completions. ChatOpenAI adds the Chat Completions path.
Last verified: 2026-07-25
OpenClaw custom providers should use a new provider name. Do not attempt to override the built-in openai provider base URL.
The relevant OpenClaw settings paths are models.providers, models.providers.lumeapi.baseUrl, models.providers.lumeapi.api, models.providers.lumeapi.apiKey, models.providers.lumeapi.models, and agents.defaults.model.primary.
Last verified: 2026-07-25
The most common routing mistake is sending every message to the strongest available model because the first demo looked better. That approach hides cost in routine traffic: greetings, basic extraction, duplicate tickets, simple status questions, and requests that should have been answered by a tool call. A local agent can make cheaper decisions before it spends on synthesis.
Start with a routing contract. The classifier returns a narrow label, the planner can request only approved tools, and the synthesis node receives evidence rather than raw access to every system. Escalation should depend on visible state: low classifier confidence, validation failure, conflicting tool results, policy-sensitive categories, or a capped number of unsuccessful attempts. Do not escalate merely because a model generated a long answer.
Track spend by graph node and route, not only by user session. If claude-sonnet-4-6 synthesis dominates cost, reduce duplicate context and cap outputs before changing models. If gpt-5.6-sol appears frequently, inspect the reason codes. A high escalation rate usually indicates an unclear router, weak tool result schemas, missing retrieval filters, or a task that needs a human-owned workflow rather than a larger model.
Input and output rates differ substantially for several models. Output limits are a direct routing and cost control, especially for planning and synthesis nodes.
Last verified: 2026-07-25
Local deployment changes where your agent runs, not the need for controls around credentials, tool authority, retries, and observability.
OpenAI compatibility applies to text-model Chat Completions usage. Validate each local agent feature independently instead of assuming every editor, completion mode, or provider-specific capability accepts a custom endpoint.
A single user request in a local agent may trigger five to fifteen Chat Completions calls. Route classification and planning to gemini-3-flash or gpt-5.4-mini; reserve claude-sonnet-4-6 or gpt-5.6-sol for synthesis and tool-heavy steps.
LangGraph and LangChain integrate via ChatOpenAI(base_url="https://api.lumeapi.site/v1") — no graph rewrite when you change model id per node.
Sum Usage rows for all hops in a completed workflow to get true cost per task, not cost per API call in isolation.
LumeAPI is designed for developers who want to integrate without scheduling demos. Create an account, confirm your email, and open Console to generate an API key. Fund your USD wallet with USDT on supported chains when you are ready for billable traffic—there is no mandatory minimum beyond what your tests require.
Point your OpenAI-compatible client at https://api.lumeapi.site/v1, set Authorization to Bearer your key, and pass a catalog model id in the model field. Run a short curl or SDK script from /docs to verify latency, streaming, and error handling before you attach the key to production services.
Use Usage logs to reconcile per-call cost with finance forecasts. When a model tier is too expensive or quality is insufficient, change model id—not your entire integration. For cross-provider price tables and Research deep dives, follow internal links on this page rather than duplicating migration math here.
Every catalog model has a detail page under /models with official reference pricing, LumeAPI pricing, and links to /docs/models/{id} for parameters and curl examples. Start there when this commercial page points you to a model id you have not called before.
The /docs index lists gateway authentication, Chat Completions, image endpoints, and async video patterns. llms.txt bundles the same information for agent tooling—useful when you want a single URL to paste into Cursor or an internal bot.
Research articles explain why bills grow and how to compare providers; commercial pages like this one explain what LumeAPI offers and how to start. Follow internal links instead of searching for duplicate migration content across pages.
If billing, chain deposits, or integration behavior is unclear, use /contact for support channels. Include your model id, approximate request time, and whether the issue is authentication, balance, or model parameters—that speeds up resolution.
A single API key calls GPT, Claude, Gemini, and more on one USD wallet — no separate vendor accounts per provider.
Published catalog rates undercut official list pricing. GPT tiers up to ~70% off; Claude and Gemini 50% off official reference.
Model capacity is sourced through major providers’ authorized application channels — recognizable catalog ids, not opaque repackaged endpoints.
Every call records model id, token counts, latency, and exact USD cost. Audit any line item in Console — usage and price are traceable.
Point Cursor, SDKs, and agents at one base URL. Change API key, base URL, and model id — keep your existing integration shape.
Chat, image generation, and async video on the same key and wallet when you outgrow text-only workloads.
Three values change: API key, base URL, model id. Everything else stays the same.
from openai import OpenAI
client = OpenAI(api_key="YOUR_OPENAI_API_KEY")
response = client.chat.completions.create(
model="claude-sonnet-4-6",
messages=[{"role": "user", "content": "Hello"}],
)from openai import OpenAI
client = OpenAI(
api_key="YOUR_LUMEAPI_KEY",
base_url="https://api.lumeapi.site/v1",
)
response = client.chat.completions.create(
model="claude-sonnet-4-6",
messages=[{"role": "user", "content": "Hello"}],
)Full step-by-step rollout, streaming checks, and FAQ: Agent API cost guide →
API key, base URL (https://api.lumeapi.site/v1), and model id to a LumeAPI catalog entry. Message shape stays OpenAI-compatible for most apps.
Streaming, tool calling, JSON mode, and error handling on your heaviest models. Shadow 5–10% of traffic before full cutover.
Provider-native features (Anthropic Batch, Google Grounding, OpenAI Assistants) may require the official API. Test your exact payload.
Keep environment variables for base URL and model id. Switch back instantly if staging tests fail.
Yes — use langchain_openai.ChatOpenAI with LumeAPI base_url and catalog model id.
Your orchestrator runs on your machine; model inference calls go to LumeAPI gateway.
One API key — change model per request in code.
Usage logs list every hop with model id and USD cost.
ChatOpenAI with base_url=https://api.lumeapi.site/v1.
Different model id for classify, plan, tool, and synthesize steps.
OpenAI-compatible tools on catalog text models — validate schemas in staging.
Sum Usage rows for all hops in one completed workflow.
Part of the Cheap LLM API hub — models, pricing, and integration guides for this provider.
ChatOpenAI(base_url="https://api.lumeapi.site/v1", model="claude-sonnet-4-6"). See page sections.
Any client that speaks OpenAI Chat Completions works — set env OPENAI_BASE_URL.
/ai-agent-api is product-agnostic agent economics. This page is local/self-hosted setup.
gemini-3-flash or gpt-5.4-mini for classification and routing.
Supported — test stream handling in your graph nodes.
See /research/prevent-duplicate-ai-agent-tool-calls for idempotency patterns.
Set base URL and model id in your agent runner https://api.lumeapi.site/v1. Need help choosing a model? Browse the developer docs or contact support.