NAME

Langertha::Engine::MiniMax - MiniMax API

VERSION

version 0.302

SYNOPSIS

use Langertha::Engine::MiniMax;

my $minimax = Langertha::Engine::MiniMax->new(
    api_key => $ENV{MINIMAX_API_KEY},
    model   => 'MiniMax-M2.5',
);

print $minimax->simple_chat('Hello from Perl!');

# Streaming
$minimax->simple_chat_stream(sub {
    print shift->content;
}, 'Write a poem');

# Tool calling works out of the box
my $response = await $minimax->chat_with_tools_f('Search for Perl modules');

DESCRIPTION

Provides access to MiniMax models via their OpenAI-compatible API. Composes Langertha::Role::OpenAICompatible with MiniMax's endpoint (https://api.minimax.io/v1) and API key handling.

MiniMax is a Chinese AI company based in Shanghai, offering large language models with strong coding, reasoning, and agentic capabilities.

Available text models:

  • MiniMax-M2.5 — Latest flagship. 1M context window, $0.30/1M input, $1.20/1M output. SOTA coding (80.2% SWE-Bench Verified), agentic tool use, and search.

  • MiniMax-M2.5-highspeed — Same M2.5 performance with lower latency. 205K context window.

  • MiniMax-M2.1 — 230B total parameters, 10B activated per inference. Strong multilingual coding and reasoning.

  • MiniMax-M2.1-highspeed — Same M2.1 performance with lower latency.

  • MiniMax-M2 — 200K context, 128K max output. Function calling and agentic capabilities.

See https://platform.minimax.io/docs/guides/models-intro for the full model catalog including audio, video, and music models.

Supports chat, streaming, and tool calling. Embeddings, transcription, and dynamic model listing (/v1/models) are not supported.

Coding Plan: MiniMax offers a Coding Plan subscription with web search and image understanding APIs for coding workflows. See https://platform.minimax.io/docs/coding-plan/intro.

Get your API key at https://platform.minimax.io/ and set LANGERTHA_MINIMAX_API_KEY in your environment.

THIS API IS WORK IN PROGRESS

SEE ALSO

SUPPORT

Issues

Please report bugs and feature requests on GitHub at https://github.com/Getty/langertha/issues.

CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

AUTHOR

Torsten Raudssus <torsten@raudssus.de> https://raudss.us/

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Torsten Raudssus.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.