Integrations / Mastra
M

Mastra

Mastra · Verified setup guide

A TypeScript agent framework. Point a model at a custom URL.

Setup steps

  1. 1
    Installnpm i @mastra/core
  2. 2
    Create an agentmodel: { id, url } below.
  3. 3
    Run itCall the agent.

Configuration example

javascript
import { Agent } from "@mastra/core/agent";

const agent = new Agent({
  id: "luxechain-agent",
  name: "LuxeChain Agent",
  instructions: "You are a helpful assistant.",
  model: { id: "custom/YOUR_MODEL_ID", url: "https://api.luxechain.si/v1" },   // any id from /models
});

Replace YOUR_MODEL_ID with any model from the catalogue. Never paste a real API key into a shared document.

Troubleshooting

The field is url (not baseURL), and it takes the /v1 base, not the full /chat/completions path.

If the tool rejects the endpoint, confirm the base URL exactly matches the value on the right, and that the key is active in your account.