Mage API · Video model
Berry API
Video that stays true to your references
POST https://api.mage.space/v1/berry/generateAt a glance
The Berry API runs Berry 2 and 1 other variant through Mage at POST https://api.mage.space/v1/berry/generate. A request at the default settings costs 189 Gems (about $0.189), with no subscription. Berry takes saved characters, references by @handle in the prompt.
- VideoOutput
- 2Variants
- 189Gems per clip, default
- $0.189About, in USD
Overview
What the Berry API does
Video that stays faithful to every reference you give it. A start frame, up to 9 references or Characters, or a source video to edit; 3 to 15 seconds at up to 1080p.
Mage's reference-driven video model, faithful to the images you give it; Berry 2 is the current version. A first frame or reference images, or a source video to edit.
It accepts first_image, image, additional_images, video as inputs.
Quick start
Call the Berry API
Set MAGE_API_KEY, submit to /berry/generate, and poll status_url until the request completes.
cURL
STATUS_URL=$(curl --request POST 'https://api.mage.space/v1/berry/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": "berry-2"
}' | 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('berry', {
prompt: 'A slow push-in on a lighthouse at dusk, waves breaking below',
aspect_ratio: '16:9',
duration: '3',
model_id: 'berry-2',
});
console.log(request.result.url);Python
# pip install mage-space
from mage_space import Mage
mage = Mage() # reads MAGE_API_KEY
request = mage.run("berry", {
"prompt": "A slow push-in on a lighthouse at dusk, waves breaking below",
"aspect_ratio": "16:9",
"duration": "3",
"model_id": "berry-2",
})
print(request["result"]["url"])Models
Berry model_id values
Send model_id to pick a variant. A request without one runs the default.
| model_id | Name | Default |
|---|---|---|
| berry | Berry | |
| berry-2 | Berry 2 | Yes |
Options
Berry 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, 4:3, 3:4, 4:5, 5:4 |
| resolution | 720p, 1080p, 480p |
| duration | 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 |
Inputs
Media inputs Berry 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. |
| image | The reference image. |
| additional_images | Additional reference images. |
| video | The source video. |
Rules
What the Berry API enforces
- A first frame cannot be combined with reference images.
- Video editing runs on `berry` only, not `berry-2`: send `model_id: "berry"` with a source video of 3 to 60 seconds.
More video models
Other video generation APIs on Mage
Blueberry API
Pin the first and last frame
Cherry API
Our flagship video family
Grok Video API
Grok Imagine, in motion
Kiwi API
Everyday video, zero setup
Lemon API
Every video feature, at a friendlier price
LTX Video API
Fast open-weights video for iteration
FAQ
Frequently asked questions
How much does the Berry API cost?
What is the Berry API endpoint?
Which Berry models can I call?
Does Berry support reference images or characters?
Can I use Berry from Claude or ChatGPT?
How long are Berry results kept?
Start building with Mage
One account, one Gems balance, every model. Pay only for what you generate.