Mastra Gateway
An OpenAI- and Anthropic-compatible model gateway that routes one API key to 300+ models with provider failover, and adds observational memory that compresses each conversation into notes so agents keep context without rebuilding it.
Find alternatives to Mastra Gateway
What it does
- Model inference
Features 5
- Observational MemoryTwo background agents, an Observer and a Reflector, maintain a dense observation log of conversations.
- Model RoutingOne endpoint and one API key to reach 300+ models from every major provider.
- High AvailabilityRuns on distributed infrastructure with automatic failover across providers.
- Bring Your Own KeysPlug in your own provider API keys for direct routing while keeping the same memory features.
- Prompt CachingAppends observations over time to keep the prompt prefix stable and cacheable.
Sources
- Pricing
-
Mastra Platform plan cards: Starter "$0/ month" ("Free for everyone"), Teams "$250/ month", Enterprise "Custom pricing"; the comparison table prices each platform product row by row on all three plans. Gateway rows: Input / Output Tokens "Market Rate + 5.5%" on all plans; Memory Token Usage 100,000 then $10/1M (Starter); Retrieval Storage 250MB then $20/GB (Starter). The Gateway's own page says "transparent pricing with no token markup", which the pricing table's 5.5% row contradicts; the pricing page is the one followed here.
- Description
-
Official documentation · 10 Oct 2026
"Gateway gives any agent human-like memory with observational compression"; one API key and one endpoint with OpenAI- and Anthropic-compatible interfaces reach 300+ models; bring-your-own provider keys; provider failover.
- What it does
- Sold within
-
The Mastra Platform comparison table prices the Gateway on every plan: "Input / Output Tokens" at "Market Rate + 5.5%" and "Memory Token Usage" at "100,000then $10/1M" on Starter. The Gateway page starts with creating a project in the Mastra console.
- Name
-
Official documentation · 10 Oct 2026
"Mastra Gateway combines observational memory with model routing".
- URL
-
Official documentation · 10 Oct 2026
Page headed "Gateway with Observational Memory". gateway.mastra.ai returned only a page title to a plain fetch.
Also from Mastra
-
Mastra Developer tool
An open-source TypeScript framework that developers use to build, run and observe AI agents and workflows, with a hosted Studio and cloud deployment option.
-
Mastra Studio Developer tool
A shared workspace where a team inspects agent runs through traces and cost, latency and quality metrics, scores outputs with LLM-as-judge or code, runs dataset experiments and versions prompts and agent configurations, open to non-engineering reviewers without source access.
-
Mastra Platform Observability Infrastructure service
Hosted telemetry store for Mastra agents in production: it keeps the metrics, structured logs and step-by-step traces of model calls, tool calls and workflow steps for every run, with dashboards for cost, latency and quality scores.
-
Mastra Server Infrastructure service
Hosted deployment target that runs a Mastra application's agents, tools and workflows as an API server from one command, with routing and scaling handled by Mastra and billing by CPU time and data egress.
-
Mastra Agent Builder Agent platform
A UI mounted inside a team's own Mastra server for creating and operating internal agents, with multi-tenant workflows, role-based access and channel integrations, licensed for production under Mastra's enterprise licence.
-
Mastra Factory AI agent
An open-source software delivery environment where coding agents take a connected repository's issues through investigation, planning, implementation and review to a reviewed pull request, with people deciding at each step; self-hosted or deployed on Mastra's platform.
-
Mastra Code AI agent
An open-source terminal coding agent with Build, Plan and Fast modes and explore, plan and execute subagents, whose observational memory compresses the session into notes instead of compacting it, so long sessions keep their context.
Something wrong here? Send a correction — quote this product id: mastra-gateway.