Compatible Gateways

MiniMax

Use MiniMax OpenAI-compatible models with Anvia.

MiniMax exposes OpenAI-compatible endpoints at https://api.minimax.io/v1. In Anvia, configure OpenAIClient with that baseUrl, then pass MiniMax model ids to completionModel(...).

Create the Client

import { AgentBuilder } from "@anvia/core";
import { OpenAIClient } from "@anvia/openai";

const client = new OpenAIClient({
  baseUrl: "https://api.minimax.io/v1",
  apiKey: process.env.MINIMAX_API_KEY,
});

const model = client.completionModel("MiniMax-M2.5");

const agent = new AgentBuilder("support", model)
  .instructions("Answer support questions clearly.")
  .build();

const response = await agent.prompt("Hello!").send();

console.log(response.output);

Get the Model List

MiniMax provides an OpenAI-compatible model list endpoint. Because the client was created with baseUrl, listModels() calls MiniMax's /models endpoint.

const models = await client.listModels();

console.table(models.data.map((model) => ({ id: model.id, owner: model.ownedBy })));

Use the id field directly with completionModel(...).

Notes

  • MiniMax also appears in some tools as MiniMax coding plans or alternate domains. Prefer the official API base URL for production docs unless your product explicitly supports a plan-specific endpoint.
  • Compatible endpoints can differ in reasoning metadata, tool behavior, streaming chunks, and rate limits. Test the specific model id before enabling advanced features.

For current MiniMax API details, see the MiniMax model list reference.