Harness orchestration · Nexus routing · session budgets & compaction · transparent channel pricing
ModelAPI is an agent & multi-model orchestration cloud — routing, budgets, compaction, and cache. You pay for orchestration software with tiered AKL / Rsc / Bedrock / direct channel pricing.
Trending This Week
Based on real request volume over the past 7 days · updated hourly
Harness sends tests, lint, and file scans to nexus/cheapest-west while plan/reasoning stays on frontier tiers. Verify via X-Harness-Task — see /harness.
Sound familiar?
Account friction, cross-border routing, and billing — we offer a compliant SaaS path (see /compliance).
Overseas phone + credit card required. Accounts banned without warning; balance lost.
✓ Our solution
Sign up with email. Eligible users per /compliance; credits never expire.
Cross-border API calls over long routes suffer latency spikes and timeouts — hard to meet production SLAs.
✓ Our solution
Multi-region PoPs and smart routing. Primary endpoint in US East; regional BASE_URLs as PoPs ship.
Foreign card only. No RMB payment, no VAT invoice, no corporate billing.
✓ Our solution
WeChat Pay, Alipay, bank transfer in RMB. VAT invoices available. Corporate billing supported.
Ten keys, inflated bills, flaky routing — condensed into one control plane.
OpenAI, Anthropic, Google, DeepSeek — each with its own account, billing, key rotation, and quota tracking.
Per-token API billing adds up. Some gateways add markup, inflate counts, or swap models.
Trading cost vs quality manually breaks unattended workflows.
Non-developers get stuck; ticket cycles are long.
Same credential surface for experimentation and scaled traffic.
Claude Fable 5 / Sonnet 5, GPT-5.6 Sol/Terra/Luna, Opus 4.8, Gemini 3.1 Pro — same integration surface.
DeepSeek V4 Flash, Qwen, Kimi, GLM — built for volume and everyday workloads.
Representative routing: code pane, streamed body, latency and credits.
Loading...Ecosystem
Point Cursor, Windsurf, VS Code, Claude Code, or Codex CLI at ModelAPI.
Universal config — works in every tool
Resilience
Reuse the exact same key — swap hostname only.
Catalog
50+ frontier and value tiers · one unified API envelope
Capabilities
Harness, Nexus, and failover algorithms — one endpoint, not another passthrough shop.
Server-side agent orchestration: tiered routing, session budgets, auto-compaction, and cache tuning via HTTP headers — proprietary algorithm layer.
nexus/* aliases resolve to the best model by cost, latency, or capability. Software routing with fallbacks — not blind passthrough.
GPT-5.5, Claude Opus 4.8 / 4.7, Gemini 3.1, DeepSeek V4, Grok 4.3 and 50+ more — all through one API key, no restrictions.
Change 2 lines of code. Keep your existing SDK, prompts, and tools — zero refactoring.
US · Singapore · Tokyo · Frankfurt. Regional PoPs roll out after US primary launch.
Official API prices, zero markup. 5% infrastructure fee at top-up only — below industry average. Bring Your Own Key (BYOK) at $0.50/M for expensive models.
Key isolation · RBAC · Audit logs · Spend caps · SOC 2 compliant infrastructure.
Agent cloud · not a token relay
ModelAPI sells an agent service: tiered task routing, session budgets, compaction, and cache optimization. Model calls are billed at upstream channel rates — you buy orchestration, not a simple token hop.
Server-side agent orchestration: tiered task routing (plan / bulk / compress), session USD budgets, auto context compaction, and prompt-cache optimization.
Cost-, latency-, and capability-aware model selection via nexus/* aliases. Live catalog resolution — your code stays stable as frontier SKUs update.
Profile-driven fallbacks (e.g. Opus → Sonnet → nexus/cheapest-west) with provider health checks — intelligent agent routing.
Exact-match response cache for repeated non-stream calls; transient memory consolidate API for Hermes/OpenClaw agent workflows.
curl https://api.aimodelapi.ai/v1/chat/completions \
-H "Authorization: Bearer sk-ama-..." \
-H "x-harness-profile: claude-code-optimal" \
-H "x-harness-session-id: my-project-1" \
-H "x-harness-auto-compact: true" \
-d '{"model":"nexus/best-coding","messages":[...]}'Response headers X-Harness-Profile / X-Harness-Model / X-Harness-Task expose routing decisions. See /docs#harness and integrations.
For Claude Code power users
Claude Code is a great terminal agent. ModelAPI Harness is orchestration software on our gateway — it does not replace Claude Code, but auto-picks models, enforces budgets, and compacts long context. All features below are live and verifiable via response headers.
Set ANTHROPIC_BASE_URL to api.aimodelapi.ai and add x-harness-profile: claude-code-optimal.
"Run all tests" → bulk tier → nexus/cheapest-west. Architecture question → plan tier → nexus/best-reasoning.
X-Harness-Task and X-Harness-Model tell you which model ran — auditable, billable at official rates.
| Capability | Anthropic direct | Claude Code + Harness |
|---|---|---|
Multi-vendor models in one agent session Opus for plan, DeepSeek Flash for bulk — automatic via tiers | No | Yes |
Server-side task tier routing (plan / bulk / compress) Rules + optional hybrid LLM classifier on every request | No | Yes |
Session USD spend cap with HTTP 429 Redis-backed; claude-code-optimal default $50/session | No | Yes |
Auto context compaction before expensive calls Server summarizes older turns; non-streaming requests today | Partial | Yes |
Live model aliases (nexus/*, claude-sonnet-latest) | No | Yes |
Provider prompt-cache optimization (Bedrock) Dashboard shows cacheRead / cacheSavingsUsd | Partial | Yes |
Exact-match response cache Non-stream, temp ≤ 0.1, no tools; X-ModelAPI-Cache header | No | Yes |
Agent memory consolidate API POST /v1/harness/memory/consolidate | No | Yes |
Transparent routing in response headers X-Harness-Model, X-Harness-Task, X-Harness-Classifier | No | Yes |
Native Claude Code UX (queue, steer, IDE) Keep Claude Code — point ANTHROPIC_BASE_URL at ModelAPI + Harness headers | Yes | Partial |
Honest notes: Harness does not change Claude Code's client UI. Auto-compact and response cache apply mainly to non-streaming calls today. "Response cache" is exact payload match, not embedding similarity. Hybrid cost ($2.20/M output at 5% Opus / 95% cheap) is a typical agent workload estimate — your mix may differ.
Start in under 60 seconds
Top up from $5. Supports WeChat, Alipay, Stripe, Apple Pay, crypto.
View payment optionsCreate a key, swap the base URL. Your existing OpenAI code works as-is.
Read quickstartPricing
Upstream model passes through with a spelled-out infra surcharge — zero surprise fees.
For exploration and testing
Official API prices · zero markup · min $5 top-up
For production workloads
Loved by developers
"Used to juggle 7–8 API accounts. Now one ModelAPI key covers everything, billing is crystal clear, and switching between Claude Opus and DeepSeek takes zero effort."
"The Singapore PoP is legitimately fast. I was skeptical about a gateway adding latency, but median response time is actually lower than hitting the OpenAI API directly from SEA. Solid routing."
"We needed one gateway for multiple model providers. ModelAPI unified billing and routing; WeChat Pay works for our eligible accounts. Deployed to production in one afternoon."
"The PPP pricing for India is real — I'm paying ~40% less than teammates in the US for the same models. Switching my existing codebase took literally 2 lines of code."
"Looked at a lot of gateways — ModelAPI is one of the few with truly 0% per-token markup and a transparent fee structure. The nexus/cheapest route cut our batch inference cost substantially."
"Building multi-tenant where users have different model preferences. The Compare page saved hours of manual benchmarking. BYOK at $0.50/M flat is the most cost-effective routing I've found."
Recent Updates
Use claude-opus-latest or AKL-claude-opus-4-8. Save cost with AKL-*-rsc. Hermes dropdown "Opus 4 7" may fail — see docs.
Now routing via nexus/cheapest. $0.14/M input, 1M context.
Pause agentic workflows mid-execution and inject human decisions via the API.
Prompt-level cache hits on repeated context now reduce latency by ~40% at no extra cost.
Sign up in 30 seconds. No credit card required. 50+ models, one key.