Polyweave

@polyweave/minimax (1.0.2)

Published 2026-07-17 15:48:27 +00:00 by Dvorak

Installation

@polyweave:registry=https://hub.kl1.tenere.ai/api/packages/Polyweave/npm/
npm install @polyweave/minimax@1.0.2
"@polyweave/minimax": "1.0.2"

About this package

@polyweave/minimax

MiniMax adapter for Polyweave - multi-modal AI adapter supporting text, audio (TTS with HTTP and WebSocket streaming), image, video, music, voice clone, voice design, and voice management via MiniMax API.

Synopsis

import { createMinimaxAdapter } from '@polyweave/minimax';

const adapter = createMinimaxAdapter({ apiKey: 'YOUR_API_KEY' });
adapter.source.pipe(someSink);
adapter.sink.write({ type: 'PARAM', content: { key: 'model', value: 'MiniMax-M2.1-lightning' } });
adapter.sink.write({ type: 'TEXT', content: { text: 'Hello!' } });

Install

npm install @polyweave/minimax

API

createMinimaxAdapter(config)

Returns an IFrameDuplex stream adapter. Configuration options:

Option Type Default Description
apiKey string process.env.MINIMAX_API_KEY MiniMax API key
baseURL string auto (region-based) API base URL
region string 'international' 'international' or 'china'
timeout number 60000 Request timeout in ms
maxRetries number 2 Max retry count

Frame Types

  • Input: TEXT, AUDIO, IMAGE, VIDEO, TOOL_RESULT, PARAM, COST_CHECK, START, END
  • Output: TEXT, AUDIO, IMAGE, VIDEO, TOOL_CALL, RECEIPT, ERROR, COST, END

Tasks

Route via task PARAM: tts, image, video, music, voice_clone, voice_design, voice_management, delete_voice. Default: text generation via Anthropic-compatible endpoint.

Tests

npm test

Requirements

  • Node.js >= 18.0.0
  • @polyweave/core (peer)
  • @polyweave/errors (peer)

License

MIT

Dependencies

Dependencies

ID Version
@polyweave/push-websocket *

Development Dependencies

ID Version
@rigor/core *

Peer Dependencies

ID Version
@polyweave/core *
@polyweave/costs *
@polyweave/errors *

Keywords

polyweave minimax tts ai adapter
Details
npm
2026-07-17 15:48:27 +00:00
2
John Dvorak
SEE LICENSE IN LICENSE
latest
23 KiB
Assets (1)
Versions (6) View all
1.0.2 2026-07-17
1.0.9 2026-07-11
1.0.6 2026-07-10
1.0.5 2026-07-10
1.0.4 2026-07-10