Mage API · Video model
Melon API
Anime in motion, with optional audio
POST https://api.mage.space/v1/melon/generateAt a glance
The Melon API runs Melon and 1 other variant through Mage at POST https://api.mage.space/v1/melon/generate. A request at the default settings costs 147 Gems (about $0.147), with no subscription. Melon takes saved characters, references by @handle in the prompt.
- VideoOutput
- 2Variants
- 147Gems per clip, default
- $0.147About, in USD
Overview
What the Melon API does
Our anime video model, as Melon and Melon Pro. Start and end frames or up to 7 references or Characters, optional audio, 3 to 16 seconds at up to 1080p.
Mage's anime video model, as Melon and Melon Pro, with optional audio.
It accepts first_image, last_image, image, additional_images as inputs.
Quick start
Call the Melon API
Set MAGE_API_KEY, submit to /melon/generate, and poll status_url until the request completes.
cURL
STATUS_URL=$(curl --request POST 'https://api.mage.space/v1/melon/generate' \
--header "Authorization: Bearer $MAGE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"prompt": "A slow push-in on a lighthouse at dusk, waves breaking below",
"aspect_ratio": "16:9",
"duration": "4",
"model_id": "melon"
}' | jq -r '.status_url')
# Repeat until status is "completed"; result.url is the file
curl "$STATUS_URL" --header "Authorization: Bearer $MAGE_API_KEY"TypeScript
// npm install @mage-space/sdk
import Mage from '@mage-space/sdk';
const mage = new Mage(); // reads MAGE_API_KEY
const request = await mage.run('melon', {
prompt: 'A slow push-in on a lighthouse at dusk, waves breaking below',
aspect_ratio: '16:9',
duration: '4',
model_id: 'melon',
});
console.log(request.result.url);Python
# pip install mage-space
from mage_space import Mage
mage = Mage() # reads MAGE_API_KEY
request = mage.run("melon", {
"prompt": "A slow push-in on a lighthouse at dusk, waves breaking below",
"aspect_ratio": "16:9",
"duration": "4",
"model_id": "melon",
})
print(request["result"]["url"])Models
Melon model_id values
Send model_id to pick a variant. A request without one runs the default.
| model_id | Name | Default |
|---|---|---|
| melon | Melon | Yes |
| melon-pro | Melon Pro |
Options
Melon parameters
Allowed values across all variants; a variant may offer fewer. The docs list the options per variant.
| Field | Values |
|---|---|
| aspect_ratio | 16:9, 9:16, 1:1, 3:4, 4:3 |
| resolution | 540p, 720p, 1080p |
| duration | 3, 4, 5, 6, 8, 10, 16 |
Inputs
Media inputs Melon accepts
Send each as an https URL, a data URL, or an upload of up to 100 MB.
| Field | Role |
|---|---|
| first_image | The first frame image. |
| last_image | The last frame image. |
| image | The reference image. |
| additional_images | Additional reference images. |
Rules
What the Melon API enforces
- First and last frames cannot be combined with reference images: send one kind or the other.
- The prompt is at most 5000 characters.
More video models
Other video generation APIs on Mage
MiniMax-H3 API
Fast open video with stereo sound
Plum API
Sound on every clip, up to 2K
Raspberry API
Characters brought to life from a first frame
Seedance API
Seedance, with a strict filter
Wan 3.0 API
Wan 3.0, with a strict filter
Wan Video v2.2 API
Open-weights video with a Lightning variant
FAQ
Frequently asked questions
How much does the Melon API cost?
What is the Melon API endpoint?
Which Melon models can I call?
Does Melon support reference images or characters?
Can I use Melon from Claude or ChatGPT?
How long are Melon results kept?
Start building with Mage
One account, one Gems balance, every model. Pay only for what you generate.