Mastra

Mastra

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

Step by step

01
Install
npm i @mastra/core
02
Create an agent
model: { id, url } below.
03
Run it
Call the agent.
Protocol
OpenAI Chat Completions
Configured in
model.url
Base URL
https://api.luxechain.si/v1

Copy this

mastra
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
});
The field is url (not baseURL), and it takes the /v1 base, not the full /chat/completions path.

← All tools Get tokens