Mastra logo

Mastra

by MastraFramework / SDKmastra.ai

Mastra is a TypeScript framework for agents, workflows and RAG, and its model router carries Opper as a provider. Set OPPER_API_KEY, write the model as a string, and the call routes through the gateway with no base URL to configure and no Opper package to install. The models arrive with their context windows and prices already filled in, because Mastra reads them from the open models.dev catalogue rather than hard-coding a list, which is also why its router lists a curated slice of the catalogue rather than all of it.

Build with Mastra on Opper

Opper ships inside Mastra, so there is no base URL to set and no package to add. Set OPPER_API_KEY and pick a model.

Get your API key

In your code

import { Agent } from '@mastra/core/agent';
// OPPER_API_KEY is picked up from the environment.
export const agent = new Agent({
name: 'assistant',
instructions: 'You are a helpful assistant.',
model: 'opper/anthropic/claude-fable-5',
});

Mastra documents Opper on its own site. See the provider page.

More apps on Opper

Build with Mastra on any model

One key, 700+ models, a choice of region, and zero data retention. Switch the model behind your app without changing your workflow.

Get startedView Documentation