# minimax/h3

Source: https://docs.sociaro.com/models/minimax-h3/

MiniMax H3, served direct from MiniMax.

Text-to-video, image-to-video (a first frame, optionally a last frame) and reference-to-video (reference pictures, clips and sounds) in one model, every clip with sound; 4 to 15 seconds at 768P or 2K. Served through the async job API only: POST /v2/jobs, then poll.

Billed per second of output by resolution, from what the generator reports it rendered.

MiniMax H3 on this gateway: `minimax/h3` (this page) · [`minimax/h3-highspeed`](https://docs.sociaro.com/models/minimax-h3-highspeed/index.md) · [`minimax/h3-lite`](https://docs.sociaro.com/models/minimax-h3-lite/index.md) · [`minimax/h3-max`](https://docs.sociaro.com/models/minimax-h3-max/index.md) · [`minimax/h3-regeneration`](https://docs.sociaro.com/models/minimax-h3-regeneration/index.md).

|  |  |
| --- | --- |
| Slug | `minimax/h3` |
| Kind | video |
| Vendor | minimax |
| Endpoint | `POST /v2/jobs` |

[View pricing and billing conditions](https://docs.sociaro.com/models/minimax-h3/#pricing)

## Example request

cURL

```bash
curl https://api.sociaro.com/v2/jobs \
  -H "Authorization: Bearer $SOCIARO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: my-request-0001" \
  -d '{
        "model": "minimax/h3",
        "input": {
          "content": [
            {"type": "text", "text": "The paper boat drifts down the rain-soaked street."},
            {"type": "image_url", "image_url": {"url": "https://your-cdn.example.com/first.png"}, "role": "first_frame"}
          ],
          "resolution": "768P",
          "duration": 10
        }
      }'

# then poll the job id it returns until status is succeeded:
curl https://api.sociaro.com/v2/jobs/JOB_ID \
  -H "Authorization: Bearer $SOCIARO_API_KEY"
```

Python

```python
# Requires Python 3 and requests (pip install requests).
import os
import time
import requests

payload = {'model': 'minimax/h3',
 'input': {'content': [{'type': 'text',
                        'text': 'The paper boat drifts down the rain-soaked '
                                'street.'},
                       {'type': 'image_url',
                        'image_url': {'url': 'https://your-cdn.example.com/first.png'},
                        'role': 'first_frame'}],
           'resolution': '768P',
           'duration': 10}}

response = requests.post(
    'https://api.sociaro.com/v2/jobs',
    headers={
        'Authorization': 'Bearer ' + os.environ['SOCIARO_API_KEY'],
        'Content-Type': 'application/json',
        'Idempotency-Key': 'my-request-0001',
    },
    json=payload,
    timeout=120,
)
response.raise_for_status()
submitted = response.json()
job_id = submitted['id']
print(submitted)

# then poll the job id it returns until status is succeeded:
while True:
    response = requests.get(
        'https://api.sociaro.com/v2/jobs/' + job_id,
        headers={
            'Authorization': 'Bearer ' + os.environ['SOCIARO_API_KEY'],
        },
        timeout=120,
    )
    response.raise_for_status()
    result = response.json()
    status = result['status']
    if status == 'succeeded':
        break
    if status not in ('queued', 'running'):
        raise RuntimeError(result)
    time.sleep(5)
print(result)
```

JavaScript

```javascript
// Run as an .mjs file with Node.js 22 or later.
let jobId;
let result;

{
  const payload = {
    "model": "minimax/h3",
    "input": {
      "content": [
        {
          "type": "text",
          "text": "The paper boat drifts down the rain-soaked street."
        },
        {
          "type": "image_url",
          "image_url": {
            "url": "https://your-cdn.example.com/first.png"
          },
          "role": "first_frame"
        }
      ],
      "resolution": "768P",
      "duration": 10
    }
  };
  
  const response = await fetch("https://api.sociaro.com/v2/jobs", {
    method: "POST",
    headers: {
      "Authorization": "Bearer " + process.env.SOCIARO_API_KEY,
      "Content-Type": "application/json",
      "Idempotency-Key": "my-request-0001",
    },
    body: JSON.stringify(payload),
  });
  if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
  const submitted = await response.json();
  jobId = submitted.id;
  console.log(submitted);
}

// then poll the job id it returns until status is succeeded:
{
  while (true) {
    const response = await fetch("https://api.sociaro.com/v2/jobs/" + jobId, {
      headers: {
        "Authorization": "Bearer " + process.env.SOCIARO_API_KEY,
      },
    });
    if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
    result = await response.json();
    const status = result.status;
    if (status === "succeeded") break;
    if (!["queued", "running"].includes(status)) throw new Error(JSON.stringify(result));
    await new Promise(resolve => setTimeout(resolve, 5000));
  }
  console.log(result);
}
```

## Parameters

MiniMax H3 — text, image and reference to video, with sound

| Field | Type | Required | Default | Values | What it does |
| --- | --- | --- | --- | --- | --- |
| `content` | object[] | yes | — | text · image_url · video_url · audio_url | Typed parts: exactly one `{"type": "text", "text": …}` (up to 7000 characters), plus `image_url` parts with `role` first_frame, last_frame or reference_image, `video_url` parts with role reference_video and `audio_url` parts with role reference_audio. Each media part is `{"url": …}`, a public https URL or a `data:` URI. Up to 9 reference pictures, 3 clips and 3 sounds (each 2–15 s, 15 s in total per kind). Frames and reference parts cannot be mixed. |
| `resolution` | string | yes | — | 768P · 2K | Sets the per-second rate. Any other value is a `400` before anything is rendered. |
| `duration` | integer | yes | — | 4–15 | Whole seconds of output. |
| `ratio` | string | no | adaptive | adaptive · 21:9 · 16:9 · 4:3 · 1:1 · 3:4 · 9:16 | A text-only request needs a concrete ratio (not `adaptive`). With a first or last frame the ratio follows the picture. |

The endpoint rejects unknown request fields.

### Worked example

cURL

```bash
curl https://api.sociaro.com/v2/jobs \
  -H "Authorization: Bearer $SOCIARO_API_KEY" -H "Content-Type: application/json" \
  -H "Idempotency-Key: my-request-0001" \
  -d '{ "model": "minimax/h3",
        "input": {
          "content": [ { "type": "text", "text": "A boy plays basketball by the sea at sunset; waves and a bouncing ball." } ],
          "resolution": "2K", "duration": 8, "ratio": "16:9" } }'

curl https://api.sociaro.com/v2/jobs/JOB_ID -H "Authorization: Bearer $SOCIARO_API_KEY"
```

Python

```python
# Requires Python 3 and requests (pip install requests).
import os
import time
import requests

payload = {'model': 'minimax/h3',
 'input': {'content': [{'type': 'text',
                        'text': 'A boy plays basketball by the sea at '
                                'sunset; waves and a bouncing ball.'}],
           'resolution': '2K',
           'duration': 8,
           'ratio': '16:9'}}

response = requests.post(
    'https://api.sociaro.com/v2/jobs',
    headers={
        'Authorization': 'Bearer ' + os.environ['SOCIARO_API_KEY'],
        'Content-Type': 'application/json',
        'Idempotency-Key': 'my-request-0001',
    },
    json=payload,
    timeout=120,
)
response.raise_for_status()
submitted = response.json()
job_id = submitted['id']
print(submitted)

while True:
    response = requests.get(
        'https://api.sociaro.com/v2/jobs/' + job_id,
        headers={
            'Authorization': 'Bearer ' + os.environ['SOCIARO_API_KEY'],
        },
        timeout=120,
    )
    response.raise_for_status()
    result = response.json()
    status = result['status']
    if status == 'succeeded':
        break
    if status not in ('queued', 'running'):
        raise RuntimeError(result)
    time.sleep(5)
print(result)
```

JavaScript

```javascript
// Run as an .mjs file with Node.js 22 or later.
let jobId;
let result;

{
  const payload = {
    "model": "minimax/h3",
    "input": {
      "content": [
        {
          "type": "text",
          "text": "A boy plays basketball by the sea at sunset; waves and a bouncing ball."
        }
      ],
      "resolution": "2K",
      "duration": 8,
      "ratio": "16:9"
    }
  };
  
  const response = await fetch("https://api.sociaro.com/v2/jobs", {
    method: "POST",
    headers: {
      "Authorization": "Bearer " + process.env.SOCIARO_API_KEY,
      "Content-Type": "application/json",
      "Idempotency-Key": "my-request-0001",
    },
    body: JSON.stringify(payload),
  });
  if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
  const submitted = await response.json();
  jobId = submitted.id;
  console.log(submitted);
}

{
  while (true) {
    const response = await fetch("https://api.sociaro.com/v2/jobs/" + jobId, {
      headers: {
        "Authorization": "Bearer " + process.env.SOCIARO_API_KEY,
      },
    });
    if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
    result = await response.json();
    const status = result.status;
    if (status === "succeeded") break;
    if (!["queued", "running"].includes(status)) throw new Error(JSON.stringify(result));
    await new Promise(resolve => setTimeout(resolve, 5000));
  }
  console.log(result);
}
```

**Submit and poll.** Served through the [Jobs API](https://docs.sociaro.com/jobs/index.md) only: `POST /v2/jobs` with the model in the envelope and
its fields in `input`, then poll `GET /v2/jobs/{id}` until `status` is `succeeded`. The finished MP4 is
`outputs[0].url`, a stable link on our CDN kept for ten years.

**What is checked here.** What the body decides is checked at submit, each a `400 invalid_input` and no job: a field
the model's `input_schema` does not name, a value outside its list or range (a `resolution` this model does not offer),
a `content` part of the wrong shape, more parts of a kind than the generator takes (one first frame, one last frame, nine
reference pictures, three clips, three sounds), a first or last frame mixed with reference parts, a missing text part, a text-only request without a concrete
`ratio`, a `callback_url` inside `input` (the job's own `callback_url` goes at the top level, beside `model` and
`input`) and an `mm_file://` url. The generator judges the media itself (the length of a clip or sound, a picture's
size and format) and refuses what it does not take before anything is billed.
`prompt_enhance` is not offered on these models.

**How it is billed.** Once, when the job completes, from what the generator reports it rendered: seconds of output
at the rate of the resolution it rendered, plus any reference clips by their length at that resolution's input rate,
plus each picture (first frame, last frame, reference) past the first five. Reference sounds are free. A failed job
is not billed.

For a 10-second 2K output with six seconds of reference clips and seven pictures, the bill includes ten output seconds, six reference-video seconds and two additional pictures. See [Pricing](https://docs.sociaro.com/models/minimax-h3/#pricing).

## Pricing

| Billable unit and options | Rate (USD) |
| --- | --- |
| per second of output video 768p | $0.096 |
| per second of output video 2K | $0.156 |
| per second of reference video 768p the seconds the generator reports, on the row for the output's resolution | $0.096 |
| per second of reference video 2K the seconds the generator reports, on the row for the output's resolution | $0.156 |
| per input image after the first 5 first and last frames and reference images all count | $0.048 |

- Billed on the seconds and resolution the generator reports for the finished clip.
- Lengths of 4 to 15 s; resolution ("768P" or "2K") and length must be sent.
- Reference audio is free.

[View this model in the pricing catalogue](https://sociaro.com/pricing?model=minimax%2Fh3). Your [billing logs](https://docs.sociaro.com/billing/index.md) show the actual charge for each request.
