new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

AI SDK · Providers · all subjects

minimax/setup

13 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

MiniMax provider module name

The MiniMax provider is available via the @ai-sdk/minimax module.

MiniMax provider import

Import the default provider instance minimax from @ai-sdk/minimax.

MiniMax custom provider instance

Import createMiniMax from @ai-sdk/minimax and call it with a configuration object to create a custom provider instance. Example: const minimax = createMiniMax({ apiKey: process.env.MINIMAX_API_KEY ?? '' });

MiniMax provider package

The MiniMax provider is available via the `vercel-minimax-ai-provider` module from npm.

MiniMax import default instance

Import the default provider instance `minimax` from 'vercel-minimax-ai-provider'. This uses the Anthropic-compatible API by default.

MiniMax Anthropic-compatible instance

Import `minimaxAnthropic` from 'vercel-minimax-ai-provider' to explicitly use the Anthropic-compatible API instance.

MiniMax OpenAI-compatible instance

Import `minimaxOpenAI` from 'vercel-minimax-ai-provider' to use the OpenAI-compatible API format.

MiniMax createMinimax function

Use `createMinimax` function to create a custom Anthropic-compatible MiniMax provider instance. The function signature is: `createMinimax({ apiKey: string })`.

MiniMax createMinimaxOpenAI function

Use `createMinimaxOpenAI` function to create a custom OpenAI-compatible MiniMax provider instance.

MiniMax API compatibility modes

MiniMax provides two API formats: Anthropic format (default) using Anthropic Messages API format with anthropic-version header, and OpenAI format using standard OpenAI chat completion format. Both formats access the same MiniMax models with the same capabilities.

MiniMax API key from platform

API keys for MiniMax can be obtained from the MiniMax Platform at https://platform.minimax.io/user-center/basic-information/interface-key.

MiniMax generateText example

Example using minimax with generateText for basic text generation: `import { minimax } from 'vercel-minimax-ai-provider'; import { generateText } from 'ai'; const result = await generateText({ model: minimax('MiniMax-M2'), prompt: 'Explain quantum computing in simple terms.' }); console.log(result.text);`

MiniMax streamText example

Example using minimax with streamText for streaming: `import { minimax } from 'vercel-minimax-ai-provider'; import { streamText } from 'ai'; const result = streamText({ model: minimax('MiniMax-M2'), prompt: 'Write a short story about a robot learning to paint.' }); for await (const chunk of result.textStream) { console.log(chunk); }`

Give your agent this brain