> Markdown copy of https://makernice.com/blog/how-to-use-magi-2-in-claude-code-and-chatgpt/ for AI tools. The HTML page is the canonical version.

[← All posts](https://makernice.com/blog/)

Guides

# How to Use Magi 2 in Claude Code and ChatGPT?

Makernice Team · 2026-12-03

Prices as of December 3, 2026 (price list v18).

## Key takeaways

-   Magi 2 runs from Claude Code and ChatGPT through the Makernice MCP server with the model id magi-2; a 5-second clip is $0.50 at price list v18 (December 3, 2026).
-   Every Magi 2 clip is 1080p, so the request carries no resolution field; lengths run 4 to 30 seconds and are billed per second.
-   Text-to-video and reference-to-video take 16:9, 9:16, 1:1, 4:3, 3:4, 21:9; image-to-video and first and last frame take 16:9, 9:16, 1:1, 4:3, 3:4.
-   Magi 2 outputs audio by default (set generate\_audio to false for a silent clip at the same price) and accepts up to 10 reference images, with no reference video or audio file over the API.
-   Sand.ai's own platform listed MAGI-2 as an invite-only beta on December 2, 2026; on Makernice any account with a prepaid balance can call it.

Ask an AI assistant about this page[Ask ChatGPT](https://chatgpt.com/?q=Read+https%3A%2F%2Fmakernice.com%2Fblog%2Fhow-to-use-magi-2-in-claude-code-and-chatgpt%2F+and+summarize+what+it+says+about+How+to+Use+Magi+2+in+Claude+Code+and+ChatGPT%3F.+Quote+the+page+for+prices+and+limits.)[Ask Claude](https://claude.ai/new?q=Read+https%3A%2F%2Fmakernice.com%2Fblog%2Fhow-to-use-magi-2-in-claude-code-and-chatgpt%2F+and+summarize+what+it+says+about+How+to+Use+Magi+2+in+Claude+Code+and+ChatGPT%3F.+Quote+the+page+for+prices+and+limits.)[Ask Perplexity](https://www.perplexity.ai/search?q=Read+https%3A%2F%2Fmakernice.com%2Fblog%2Fhow-to-use-magi-2-in-claude-code-and-chatgpt%2F+and+summarize+what+it+says+about+How+to+Use+Magi+2+in+Claude+Code+and+ChatGPT%3F.+Quote+the+page+for+prices+and+limits.)

Yes. Magi 2, Sand.ai's 1080p video model with sound, works in Claude Code and in ChatGPT on the web once the Makernice MCP server is connected: the assistant quotes the clip with `estimate_cost`, you approve the figure, and `generate` refuses to spend more than that `max_cost_usd`. There is no invitation step on Makernice, while Sand.ai's own platform listed MAGI-2 as an invite-only beta when checked on December 2, 2026 ([Sand.ai pricing page](https://platform.sand.ai/docs/model-pricing)). A 5-second clip costs $0.50 on price list v18 (December 3, 2026).

## How do you connect Magi 2 to Claude Code and ChatGPT?

Magi 2 needs no separate plugin: it is one of the models behind the Makernice MCP server, which you add once per app. For Claude Code, the [Claude Code connect page](https://makernice.com/mcp/connect/claude-code/) gives the `claude mcp add --transport http --scope user makernice` command with its server URL; run it, type `/mcp`, choose makernice and sign in when the browser opens.

In ChatGPT on the web, open Plugins, click Add and choose Add custom MCP server; your plan or workspace must allow custom MCP servers. Paste the ChatGPT-specific server URL from the [ChatGPT connect page](https://makernice.com/mcp/connect/chatgpt/), set Authentication to OAuth, click Create as a plugin, then Continue to Makernice, sign in and allow access; the approval screen lets you set a per-job and a daily spending limit for ChatGPT. In a new chat, type @ and pick Makernice before asking for a clip. If the sign-in takes too long, ChatGPT shows Continue connecting app on the plugin page; click it to finish. The ChatGPT version has the same balance, quoting, generating and polling tools but no top-up link tool, so add balance on the Makernice wallet page. The Makernice MCP server also works in Cursor ([Cursor connect page](https://makernice.com/mcp/connect/cursor/)).

A connection has its own per-job limit and an optional daily limit. Magi 2 bills by the second at 1080p, so the cost grows with every second; have the assistant run `get_balance` first to see your balance, today's spend and those limits.

## What does a quoted Magi 2 request look like in the chat?

A first Magi 2 clip from Claude Code uses three tools, with repeated `check_job` calls until the job finishes. The prompt below is adapted from a showcase scene in Sand.ai's launch post.

**You:** Magi 2, 16:9: a woman in a yellow dress walking up a hill of giant irises, with wind and birdsong. Quote it before you run it.

**Claude Code** builds the input without a resolution field and sends it to `estimate_cost`:

```
{
  "name": "estimate_cost",
  "arguments": {
    "input": {
      "model": "magi-2",
      "mode": "t2v",
      "prompt": "A young woman in a pale yellow linen dress and a straw hat walks up a hillside of giant purple irises, low-angle shot through the stems, soft late-afternoon light, wind in the grass and birdsong",
      "duration": 5,
      "aspect_ratio": "16:9"
    }
  }
}
```

**Claude Code:** 5 seconds of Magi 2 at 1080p comes to $0.50 on price list v18. No job exists yet. Go ahead?

**You:** Go ahead.

Claude Code sends the same input to `generate`, caps it with `max_cost_usd` at the amount you approved and labels the attempt in `request_id`:

```
{
  "name": "generate",
  "arguments": {
    "input": {
      "model": "magi-2",
      "mode": "t2v",
      "prompt": "A young woman in a pale yellow linen dress and a straw hat walks up a hillside of giant purple irises, low-angle shot through the stems, soft late-afternoon light, wind in the grass and birdsong",
      "duration": 5,
      "aspect_ratio": "16:9"
    },
    "max_cost_usd": "0.50",
    "request_id": "iris-hillside-magi2-v1"
  }
}
```

`estimate_cost` doesn't reserve the price. `generate` quotes again when it runs, creates the job only if that quote does not exceed `max_cost_usd` or the connection's per-job limit, and charges exactly the quote. Repeating the identical call with the same `request_id` returns the existing job rather than charging twice; any change to the parameters needs a new `request_id`.

The agent then waits on `check_job`; `wait_s` (55 at most) holds the call open until the job finishes or the wait ends:

```
{
  "name": "check_job",
  "arguments": {
    "job_id": "gen_...",
    "wait_s": 30
  }
}
```

When the job succeeds, the MP4 with its soundtrack is at `outputs[0].url`, a signed link valid for 24 hours; calling `check_job` again issues a fresh one, and `console_url` opens the run in the Makernice console. A single `wait_s` window may end before the render finishes, so let the agent keep calling `check_job` until the status is final.

## Which Magi 2 fields should the agent set?

Magi 2 has a single 1080p tier, so leave `resolution` out. `duration` takes 4 to 30 seconds (5 if omitted), billed at $0.10 per second (price list v18, December 3, 2026). Text-to-video and reference-to-video accept `aspect_ratio` 16:9, 9:16, 1:1, 4:3, 3:4, 21:9; image-to-video and first and last frame accept 16:9, 9:16, 1:1, 4:3, 3:4. Audio is on by default; set `generate_audio` to false and the audio track is removed after generation, without re-encoding the picture, at the same price. The full specification is on the [Magi 2 model page](https://makernice.com/models/magi-2/).

| Your instruction | Fields the agent sets |
| --- | --- |
| Make it 1080p | Nothing; Magi 2 is always 1080p, so no `resolution` |
| One 30-second take | `duration` 30, priced per second |
| Cinemascope look | `aspect_ratio` 21:9 (text or reference mode only) |
| Vertical for Reels | `aspect_ratio` 9:16 |
| Animate this photo | `mode` i2v with `image_url` |
| Start here, end there | `mode` flf with `image_url` and `last_image_url` |
| Same character in every shot | `mode` r2v with up to 10 links in `reference_images` |

## Can Magi 2 start from your own images?

Yes, Magi 2 starts from your own images in three modes. Image-to-video (`mode` i2v) uses `image_url` as the first frame. First and last frame (`mode` flf) adds `last_image_url` and fills in the motion between them. Reference-to-video (`mode` r2v) reads up to 10 pictures from `reference_images` to keep a character, product or place consistent, and the prompt says how they appear.

Each image must be a public https link to a JPEG, PNG or WebP file of 10 MB or less; repo paths don't work over MCP, so upload stills to public storage first. Sand.ai describes video and audio references and video editing on its own platform, but on Makernice the Magi 2 media inputs are still images only: no reference video, reference audio or editing fields. A first and last frame estimate in 9:16, with no resolution:

```
{
  "name": "estimate_cost",
  "arguments": {
    "input": {
      "model": "magi-2",
      "mode": "flf",
      "prompt": "She reaches the top of the hill, turns around and lifts her hat as the wind picks up",
      "image_url": "https://example.com/frames/hill-path.jpg",
      "last_image_url": "https://example.com/frames/hilltop.jpg",
      "duration": 8,
      "aspect_ratio": "9:16"
    }
  }
}
```

How start and end frames steer motion is covered in [image-to-video and first and last frame](https://makernice.com/blog/image-to-video-and-first-last-frame/), and choosing references in the [reference-to-video guide](https://makernice.com/blog/reference-to-video-guide/).

## Which Magi 2 refusals will the agent run into?

A refused Magi 2 `generate` call creates no job and charges nothing, and the agent gets readable text rather than an error code. The first column is the refusal's internal name in Makernice's server, the second a phrase from the message the tool returns.

| Refusal | What the tool returns | What to do |
| --- | --- | --- |
| `invalid_request` | "Invalid parameters" | Usually a `resolution` field (Magi 2 has a fixed resolution), 21:9 in i2v or flf, a duration outside 4 to 30, or more than 10 references; drop or fix the named field |
| `price_exceeds_max_cost` | "which exceeds max\_cost\_usd" | The new quote is above your cap, for example after a longer duration or a price-list update; estimate again and confirm the new amount |
| `per_job_limit_exceeded` | "which exceeds this connection's per-job limit" | Shorten the clip or raise the connection's limit in Makernice |
| `request_id_conflict` | "This request\_id was already used with different parameters." | Give each variant its own request\_id; reuse one only to retry an identical call |
| `insufficient_balance` | "Insufficient balance for this job. Nothing was charged." | Top up and retry with the same request\_id |
| `concurrency_limit_reached` | "Too many jobs are running for this account right now." | Each account runs 2 jobs at once by default; send the next clip when one finishes |

A job that fails after it starts shows `status` failed in `check_job` and its held amount is released in full. One exception: if output moderation blocks a finished clip for a policy violation, the run is still charged, and support can review it on request. The rules are on [failed generations](https://makernice.com/pricing/failed-generations/).

## Frequently asked questions

#### Do I need ChatGPT Plus to use Magi 2 in ChatGPT?

Not necessarily. On December 2, 2026, a ChatGPT account on the Free plan could add a custom MCP server on the web and get quotes through it. A workspace admin can still turn custom MCP servers off, and generating needs a Makernice account with balance.

#### Do I need a Sand.ai invitation to run Magi 2 from Claude Code?

No. Claude Code calls Magi 2 through the Makernice MCP server with your Makernice balance. Sand.ai's own platform listed MAGI-2 as an invite-only beta on December 2, 2026.

#### Can I ask Magi 2 for 720p or 4k?

No. Magi 2 has a single 1080p tier and no resolution parameter, so leave resolution out of the request.

#### Can ChatGPT make a silent Magi 2 clip?

Yes. Have it set generate\_audio to false: the audio track is removed after generation, without re-encoding the picture, and the price stays the same. If the field is left out and the prompt clearly asks for a silent video, it is treated as false.

#### Can Magi 2 use 21:9 with a start image?

No. Image-to-video and first and last frame accept 16:9, 9:16, 1:1, 4:3, 3:4; 21:9 works in text-to-video and reference-to-video only.

## Models in this post

Video

### Magi 2

Sand.ai's Magi 2 on one API key: 1080p clips of 4–30 seconds with sound, from text, a still, first and last frames, or up to 10 reference images.

By Sand.aiFrom $0.10/s

https://makernice.com/models/magi-2/
