url set to https://llm.modellix.ai/v1, or pass a Vercel AI SDK provider instance as model.
This page covers LLM text only (
https://llm.modellix.ai).Modellix expects full provider/name Model IDs in the request body (for example openai/gpt-5.5). Treat Modellix as a gateway: use a three-part id (modellix/<provider>/<name>) so Mastra forwards openai/gpt-5.5 upstream. See Models & Pricing.Set Up Mastra
1
Install Mastra
Follow the Mastra getting started flow for your app, or add the core package to an existing TypeScript project:For the AI SDK provider path below, also install:
2
Set Credentials
3
Configure a Custom OpenAI-Compatible Model (Recommended)
Pass an object to Other catalog examples:
model with id, url, and apiKey:Traffic still uses Chat Completions on
https://llm.modellix.ai/v1.4
Optional: Use createOpenAICompatible
Mastra accepts AI SDK language models anywhere a Same pattern as the Vercel AI SDK guide. You can also put this model in Mastra fallback chains.
"provider/model" string works:5
Optional: Fallbacks Across Catalog IDs
Keep several Modellix models on the same gateway URL:
Troubleshooting
Related
- Mastra model providers β custom OpenAI-compatible
url, gateways, fallbacks - Vercel AI SDK β
createOpenAICompatibledetails - OpenAI SDK β same
/v1gateway without Mastra - Models & Pricing β Model IDs and rates
- LLM API guide β protocols and curl examples