# minimax/h3-regeneration

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

MiniMax H3 Regeneration, served direct from MiniMax: one of your own minimax/h3 videos, rendered at 768P, rendered again at 2K, at its own length and with its own sound.

Name the video by its job id.

Served through the async job API only: POST /v2/jobs, then poll.

Billed per second of 2K output, plus the original job's reference clips and pictures, which the generator bills again.

MiniMax H3 on this gateway: [`minimax/h3`](https://docs.sociaro.com/models/minimax-h3/index.md) · [`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` (this page).

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

[View pricing and billing conditions](https://docs.sociaro.com/models/minimax-h3-regeneration/#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-regeneration",
        "input": {
          "source_job": "job_0123456789abcdef0123456789abcdef"
        }
      }'

# 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-regeneration',
 'input': {'source_job': 'job_0123456789abcdef0123456789abcdef'}}

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-regeneration",
    "input": {
      "source_job": "job_0123456789abcdef0123456789abcdef"
    }
  };
  
  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 Regeneration — a finished H3 video again at 2K

| Field | Type | Required | Default | Values | What it does |
| --- | --- | --- | --- | --- | --- |
| `source_job` | string | yes | — | job id | The `id` of one of your own `minimax/h3` jobs that succeeded at 768P, submitted less than 24 hours ago. Another tenant's job, one that has not succeeded, one rendered at 2K or one older than 24 hours is a `400` before anything is rendered. |
| `resolution` | string | no | 2K | 2K | The output resolution. `2K` is the only one, so it need not be sent; anything else is a `400`. |
| `aigc_watermark` | boolean | no | — | true · false | Whether the video carries an AI-generated-content watermark. Leave it out for the generator's default. |

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-0005" \
  -d '{ "model": "minimax/h3-regeneration",
        "input": { "source_job": "job_0123456789abcdef0123456789abcdef" } }'

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-regeneration',
 'input': {'source_job': 'job_0123456789abcdef0123456789abcdef'}}

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-0005',
    },
    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-regeneration",
    "input": {
      "source_job": "job_0123456789abcdef0123456789abcdef"
    }
  };
  
  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-0005",
    },
    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
`source_job` in `input`, then poll `GET /v2/jobs/{id}` until `status` is `succeeded`. The finished 2K MP4 is
`outputs[0].url`, a stable link on our CDN kept for ten years. The video it was made from is not changed.

**Which videos.** Only a `minimax/h3` job of your own that succeeded at 768P, and only for 24 hours from when it was
submitted: after that the generator no longer regenerates it. Its length, its sound and its pictures and clips are
the original job's; there is nothing else to send. `resolution` need not be sent (2K is the only one).

**What is checked here.** Everything, because nothing is passed through: any field other than `source_job`,
`aigc_watermark` and a `resolution` of `2K` is a `400 invalid_input` at submit, as are a `source_job` that does not
qualify (above), 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. `prompt_enhance` is not offered.

**How it is billed.** Once, when the job completes, from what the generator reports: seconds of 2K output, plus the
original job's reference clips by their length and each of its pictures (first frame, last frame, reference) past
the first five, which the generator bills again, separately from the original job. Reference sounds are free. A
failed job is not billed.

Regenerating a 10-second video made from one first frame incurs ten seconds at the 2K output rate. The single frame is within the five included pictures. See [Pricing](https://docs.sociaro.com/models/minimax-h3-regeneration/#pricing).

## Pricing

| Billable unit and options | Rate (USD) |
| --- | --- |
| per second of output video 2K | $0.06 |
| per second of reference video 2K the original job's, billed again: the seconds the generator reports | $0.06 |
| per input image after the first 5 the original job's, billed again: its first and last frames and reference images all count | $0.03 |

- Renders one of your own minimax/h3 jobs that succeeded at 768p again at 2K, at its own length; the job must have been submitted less than 24 hours earlier.
- Billed on the seconds the generator reports for the finished clip, plus the original job's reference video and images, which the generator bills again.
- Reference audio is free.

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