Mage API · Video model
Lemon API
Every video feature, at a friendlier price
POST https://api.mage.space/v1/lemon/generateAt a glance
The Lemon API runs Lemon through Mage at POST https://api.mage.space/v1/lemon/generate. A request at the default settings costs 245 Gems (about $0.245), with no subscription. Lemon takes saved characters, references, audio references by @handle in the prompt.
- VideoOutput
- 1Variant
- 245Gems per clip, default
- $0.245About, in USD
Overview
What the Lemon API does
Our all-round video model. Start and end frames, up to 10 references or Characters, Voices and audio, and clips from 2 to 30 seconds at up to 1080p.
Mage's all-round video model at a friendlier price: frames, references, Voices, generated audio, and clips from 2 to 30 seconds.
It accepts first_image, last_image, image, additional_images, videos as inputs.
Quick start
Call the Lemon API
Set MAGE_API_KEY, submit to /lemon/generate, and poll status_url until the request completes.
cURL
STATUS_URL=$(curl --request POST 'https://api.mage.space/v1/lemon/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": "3",
"model_id": "lemon"
}' | 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('lemon', {
prompt: 'A slow push-in on a lighthouse at dusk, waves breaking below',
aspect_ratio: '16:9',
duration: '3',
model_id: 'lemon',
});
console.log(request.result.url);Python
# pip install mage-space
from mage_space import Mage
mage = Mage() # reads MAGE_API_KEY
request = mage.run("lemon", {
"prompt": "A slow push-in on a lighthouse at dusk, waves breaking below",
"aspect_ratio": "16:9",
"duration": "3",
"model_id": "lemon",
})
print(request["result"]["url"])Models
Lemon model_id values
Send model_id to pick a variant. A request without one runs the default.
| model_id | Name | Default |
|---|---|---|
| lemon | Lemon | Yes |
Options
Lemon parameters
Allowed values across all variants; a variant may offer fewer. The docs list the options per variant.
| Field | Values |
|---|---|
| aspect_ratio | 16:9, 4:3, 1:1, 3:4, 9:16 |
| resolution | 480p, 720p, 1080p |
| duration | 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 |
Inputs
Media inputs Lemon 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. |
| videos | The source videos. |
Rules
What the Lemon API enforces
- First and last frames cannot be combined with reference images or videos: send one kind or the other.
- Up to 10 reference images and 5 reference videos.
- Each reference video is 1 to 15 seconds long, at most 15 seconds combined, and the combined length plus `duration` is at most 30 seconds. Reference-video seconds bill like output seconds.
More video models
Other video generation APIs on Mage
LTX Video API
Fast open-weights video for iteration
Magejutsu API
Recast any video, keeping its motion
Melon API
Anime in motion, with optional audio
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
FAQ
Frequently asked questions
How much does the Lemon API cost?
What is the Lemon API endpoint?
Which Lemon models can I call?
Does Lemon support reference images or characters?
Can I use Lemon from Claude or ChatGPT?
How long are Lemon results kept?
Start building with Mage
One account, one Gems balance, every model. Pay only for what you generate.