# MiniMax

> Write answers, draw pictures, read text aloud in natural voices and make short videos with MiniMax's AI models.

App · 5 actions. Web page: https://docs.lodol.com/docs/integrations/minimax

## Actions

### Convert text to speech

Read text aloud in one of MiniMax's voices, or a voice you cloned in MiniMax, and save it as an audio file, such as a spoken summary or a phone greeting.

**Inputs**

- Text (`text`, text, required): What to say, up to 10,000 characters.
- Voice (`voice`, text): Who reads it. Pick a voice, or give a voice id from MiniMax. Defaults to Graceful Lady (English). Default: `English_Graceful_Lady`.
- Model (`model`, text): Which speech model reads it. One of: `speech-2.8-hd` (Speech 2.8 HD (most natural)), `speech-2.8-turbo` (Speech 2.8 Turbo (faster, lower cost)). Default: `speech-2.8-hd`.
- Speed (`speed`, number): How fast it is read, from 0.5 (half speed) to 2 (twice as fast). Defaults to 1. From 0.5 to 2.0.
- Emotion (`emotion`, text): The feeling in the voice. Leave blank for the voice's natural tone. One of: `happy`, `sad`, `angry`, `fearful`, `disgusted`, `surprised`, `calm`.
- File type (`audio_format`, text): The audio file's type. Defaults to MP3. One of: `mp3` (MP3 (smaller file)), `wav` (WAV (uncompressed)). Default: `mp3`.

**Outputs**

- `character_count` (number): The characters MiniMax billed for.
- `content_type` (text): The file's type, such as image/jpeg, audio/mpeg or video/mp4.
- `document_ref` (text): The saved file, for steps that take a file.
- `duration_seconds` (number): How long the recording is, in seconds.
- `filename` (text): The file's name.
- `model` (text): The model used.
- `size_bytes` (number): The file's size in bytes.
- `url` (text): A link that opens the file in Lodol.
- `voice` (text): The voice used.

**Example output**

```json
{
  "character_count": 64,
  "content_type": "audio/mpeg",
  "document_ref": "doc_0123456789abcdef0123456789abcdef",
  "duration_seconds": 5.98,
  "filename": "minimax-speech.mp3",
  "model": "speech-2.8-hd",
  "size_bytes": 96112,
  "url": "/actions/core/serve-document/doc_0123456789abcdef0123456789abcdef",
  "voice": "English_Graceful_Lady"
}
```

### Generate a response

Send a message or question to a MiniMax model and get a written answer back.

**Inputs**

- Message (`prompt`, text, required): The message or question you want MiniMax to answer.
- Model (`model`, text): Which MiniMax model answers. One of: `MiniMax-M3` (MiniMax M3 (most capable, recommended)), `MiniMax-M3.1-Flash` (MiniMax M3.1 Flash (faster, lower cost)). Default: `MiniMax-M3`.
- System instructions (`system_prompt`, text): Optional. Guidance that shapes how the model answers, for example 'Reply in three bullet points.'

**Outputs**

- `finish_reason` (text): Why the answer ended: 'stop' when it was complete.
- `input_tokens` (number): Tokens read from the message.
- `model` (text): The model that answered.
- `output_tokens` (number): Tokens written, thinking included.
- `response_text` (text): MiniMax's answer.

**Example output**

```json
{
  "finish_reason": "stop",
  "input_tokens": 12,
  "model": "MiniMax-M3",
  "output_tokens": 84,
  "response_text": "Hello! How can I help you today?"
}
```

### Generate a video

Make a short video with MiniMax's H3 models from a description, or bring a starting picture to life. The step waits while MiniMax makes it, usually a few minutes, and saves the video as a file for later steps.

**Inputs**

- Description (`prompt`, text, required): What happens in the video: the scene, the action and the camera, such as 'A paper boat drifts across a calm pond, the camera slowly pushing in'. With a starting picture, say how it should move.
- Starting picture (`starting_image`, text): Optional. A picture for the video to start from: upload it, pick a file from an earlier step, or paste its public web address. JPEG, PNG, WebP or HEIC, up to 10 MB. The video then takes the picture's shape.
- Model (`model`, text): Which H3 model makes it. One of: `MiniMax-H3` (H3 (recommended, the only one that makes 2K)), `MiniMax-H3-Highspeed` (H3 Highspeed (faster)), `MiniMax-H3-Lite` (H3 Lite (lowest cost)), `MiniMax-H3-Max` (H3 Max (finest detail)). Default: `MiniMax-H3`.
- Length (seconds) (`duration`, number): How long the video is, from 4 to 15 seconds (H3 Max: 5 to 15). Defaults to 5. Longer videos cost more. From 4 to 15.
- Resolution (`resolution`, text): How sharp the video is. Defaults to 768p. One of: `480P` (480p (quickest, lowest cost)), `768P`, `2K` (2K (H3 only, sharpest)). Default: `768P`.
- Shape (`aspect_ratio`, text): The video's shape when there is no starting picture. Defaults to widescreen. One of: `16:9` (Widescreen (16:9)), `9:16` (Tall (9:16)), `1:1` (Square (1:1)), `4:3` (Landscape (4:3)), `3:4` (Portrait (3:4)), `21:9` (Ultrawide (21:9)). Default: `16:9`.

**Outputs**

- `content_type` (text): The file's type, such as image/jpeg, audio/mpeg or video/mp4.
- `document_ref` (text): The saved file, for steps that take a file.
- `documents` (list): The saved video, as a list of one file.
- `duration_seconds` (number): How long the video is, in seconds.
- `filename` (text): The file's name.
- `model` (text): The model that made it.
- `resolution` (text): The video's resolution, such as 768P.
- `size_bytes` (number): The file's size in bytes.
- `status` (text): 'succeeded'.
- `task_id` (text): MiniMax's id for the video task.
- `url` (text): A link that opens the file in Lodol.

**Example output**

```json
{
  "content_type": "video/mp4",
  "document_ref": "doc_0123456789abcdef0123456789abcdef",
  "documents": [
    {
      "content_type": "video/mp4",
      "document_ref": "doc_0123456789abcdef0123456789abcdef",
      "filename": "minimax-video.mp4",
      "size_bytes": 5896337,
      "url": "/actions/core/serve-document/doc_0123456789abcdef0123456789abcdef"
    }
  ],
  "duration_seconds": 5,
  "filename": "minimax-video.mp4",
  "model": "MiniMax-H3",
  "resolution": "768P",
  "size_bytes": 5896337,
  "status": "succeeded",
  "task_id": "424010985738629",
  "url": "/actions/core/serve-document/doc_0123456789abcdef0123456789abcdef"
}
```

### Generate an image

Draw pictures from a description with MiniMax's image model. The pictures are saved as files for later steps.

**Inputs**

- Description (`prompt`, text, required): What to draw: the subject, the setting, the style and the mood. Up to 1,500 characters.
- Shape (`aspect_ratio`, text): The picture's shape. Defaults to square. One of: `1:1` (Square (1:1)), `16:9` (Widescreen (16:9)), `4:3` (Landscape (4:3)), `3:2` (Landscape (3:2)), `2:3` (Portrait (2:3)), `3:4` (Portrait (3:4)), `9:16` (Tall (9:16)), `21:9` (Ultrawide (21:9)). Default: `1:1`.
- How many (`count`, number): How many pictures to draw, from 1 to 9. Defaults to 1. From 1 to 9.
- Improve the description (`improve_prompt`, text): Let MiniMax add detail to a short description before drawing. Leave off to draw exactly what you wrote. One of: `off`, `on`. Default: `off`.

**Outputs**

- `blocked_count` (number): How many more its safety check held back.
- `content_type` (text): The file's type, such as image/jpeg, audio/mpeg or video/mp4.
- `document_ref` (text): The saved file, for steps that take a file.
- `documents` (list): Every picture saved, in order.
- `filename` (text): The file's name.
- `image_count` (number): How many pictures MiniMax drew.
- `model` (text): The model that drew them.
- `size_bytes` (number): The file's size in bytes.
- `url` (text): A link that opens the file in Lodol.

**Example output**

```json
{
  "blocked_count": 0,
  "content_type": "image/jpeg",
  "document_ref": "doc_0123456789abcdef0123456789abcdef",
  "documents": [
    {
      "content_type": "image/jpeg",
      "document_ref": "doc_0123456789abcdef0123456789abcdef",
      "filename": "minimax-image-1.jpg",
      "size_bytes": 482211,
      "url": "/actions/core/serve-document/doc_0123456789abcdef0123456789abcdef"
    }
  ],
  "filename": "minimax-image-1.jpg",
  "image_count": 1,
  "model": "image-01",
  "size_bytes": 482211,
  "url": "/actions/core/serve-document/doc_0123456789abcdef0123456789abcdef"
}
```

### Get a video

Collect a video MiniMax is still making, or finished after its 'Generate a video' step stopped waiting, by its task id. The step waits until it is ready and saves it as a file.

**Inputs**

- Task ID (`task_id`, text, required): The video's task id, from the message of a 'Generate a video' step that stopped waiting, or from an earlier step.

**Outputs**

- `content_type` (text): The file's type, such as image/jpeg, audio/mpeg or video/mp4.
- `document_ref` (text): The saved file, for steps that take a file.
- `documents` (list): The saved video, as a list of one file.
- `duration_seconds` (number): How long the video is, in seconds.
- `filename` (text): The file's name.
- `model` (text): The model that made it.
- `resolution` (text): The video's resolution, such as 768P.
- `size_bytes` (number): The file's size in bytes.
- `status` (text): 'succeeded'.
- `task_id` (text): MiniMax's id for the video task.
- `url` (text): A link that opens the file in Lodol.

**Example output**

```json
{
  "content_type": "video/mp4",
  "document_ref": "doc_0123456789abcdef0123456789abcdef",
  "documents": [
    {
      "content_type": "video/mp4",
      "document_ref": "doc_0123456789abcdef0123456789abcdef",
      "filename": "minimax-video.mp4",
      "size_bytes": 5896337,
      "url": "/actions/core/serve-document/doc_0123456789abcdef0123456789abcdef"
    }
  ],
  "duration_seconds": 5,
  "filename": "minimax-video.mp4",
  "model": "MiniMax-H3",
  "resolution": "768P",
  "size_bytes": 5896337,
  "status": "succeeded",
  "task_id": "424010985738629",
  "url": "/actions/core/serve-document/doc_0123456789abcdef0123456789abcdef"
}
```
