Melies CLI
AI filmmaking from the command line. 148 AI actors, 98 visual styles, 50+ models. Generate images, videos, posters, and YouTube thumbnails without prompt engineering.
Install
CODEBLOCK0
Authentication
CODEBLOCK1
Generate an API token at melies.co > Settings > API.
Quick Start
CODEBLOCK2
Smart Model Selection
No model names needed. Use quality presets:
| Flag | Image Model | Video Model |
|---|
(default / --fast) | flux-schnell (2cr) | kling-v2 (30cr) |
| INLINECODE1 |
flux-pro (8cr) | kling-v3-pro (100cr) |
|
--best | seedream-3 (6cr) | veo-3.1 (400cr) |
|
-m <id> | exact model | exact model |
INLINECODE4 overrides quality presets. Use melies models to list all available models.
Visual Style Flags
Add these flags to any image, video, thumbnail, or pipeline command:
| Flag | Example Values |
|---|
| INLINECODE10 | eye-level, high, low, overhead, dutch, ots, profile, three-quarter |
| INLINECODE11 |
ecu, close-up, medium, cowboy, full-body, wide, tighter, wider |
|
--expression | smile, laugh, serious, surprised, villain-smirk, seductive, horrified |
|
--lighting | soft, golden, noir, rembrandt, backlit, neon, candle, hard |
|
--time | dawn, sunrise, golden, dusk, night, morning, midday |
|
--weather | clear, fog, rain, storm, snow, overcast, mist |
|
--color-grade | natural, teal-orange, mono, warm, cool, filmic, sepia |
|
--mood | romantic, mysterious, tense, ethereal, gritty, epic, nostalgic |
|
--art-style | film-still, blockbuster, noir, anime, ghibli, shinkai, oil, watercolor, concept |
|
--era | victorian, 1920s, 1980s, modern, dystopian, medieval |
Multiple flags combine. Example:
CODEBLOCK3
Commands
melies image \
Generate images from text.
CODEBLOCK4
Options:
- -
-m, --model Model override (use quality presets instead) - INLINECODE21 1:1, 16:9, 9:16, 4:3, 3:4 (default: 1:1)
- INLINECODE22 1-4 images (default: 1)
- INLINECODE23 Output resolution (model-dependent)
- INLINECODE24 Reference image for img2img
- INLINECODE25 Reference ID for custom characters (see
melies ref) - INLINECODE27 Built-in AI actor name (see
melies actors) - INLINECODE29 Style reference code (see
melies styles) - INLINECODE31 /
--quality / --best Quality presets - INLINECODE34 ,
--shot, --expression, --lighting, --time, --weather, --color-grade, --mood, --art-style, --era Visual style flags - INLINECODE44 Reproducible generation
- INLINECODE45 Preview prompt, model, and cost without generating
- INLINECODE46 Save file to path (use with --sync)
- INLINECODE47 Wait for completion
melies video \
Generate videos from text or images.
CODEBLOCK5
Options: Same as image plus:
- -
-d, --duration Video duration in seconds - Default aspect ratio is 16:9
- Sync timeout is 5 minutes
melies poster \
Generate movie posters with style presets.
CODEBLOCK6
Options:
- -
-l, --logline Short synopsis - INLINECODE51 Genre (horror, sci-fi, comedy, drama, etc.)
- INLINECODE52 Poster preset: cinematic, anime, retro, film-noir, minimalist, horror, sci-fi, watercolor, comic-book, art-deco, grindhouse, bollywood, western, pixel-art, surrealist, documentary, cartoon, epic-fantasy, indie-film, neon-noir
- INLINECODE53 AI actor name
- INLINECODE54 /
--quality / --best Quality presets - INLINECODE57 ,
--dry-run, --output, INLINECODE60
melies thumbnail \
Generate YouTube thumbnails (forced 16:9, optimized for click-through).
CODEBLOCK7
Options: Same as image. Aspect ratio is always 16:9. Default expression is smile, default lighting is soft.
melies pipeline \
Generate an image then animate it into a video. One command, both steps.
CODEBLOCK8
Options:
- -
--im Image model override - INLINECODE63 Video model override
- INLINECODE64 Ratio for both steps (default: 16:9)
- INLINECODE65 Video duration
- All style flags,
--actor, quality presets, --dry-run, INLINECODE68 - Sync defaults to true
Returns { imageUrl, videoUrl }.
melies upscale \
Upscale an image to higher resolution.
CODEBLOCK9
Models: esrgan (3cr), clarity (8cr), seedvr2 (5cr). Scale 4x costs double.
melies remove-bg \
Remove background from an image. Returns transparent PNG.
CODEBLOCK10
Cost: 3 credits.
melies actors
Browse 148 built-in AI actors.
CODEBLOCK11
melies styles
Browse and search style references (sref codes).
CODEBLOCK12
melies credits
Check credit balance and usage.
CODEBLOCK13
melies models
List available AI models.
CODEBLOCK14
melies status \
Check generation job status.
CODEBLOCK15
melies assets
List recent generated assets.
CODEBLOCK16
melies ref
Manage custom AI actor/object references.
CODEBLOCK17
Common Patterns
YouTube Thumbnail Pipeline with AI Actors
CODEBLOCK18
Consistent Character Across Media
CODEBLOCK19
Image → Video Pipeline
CODEBLOCK20
Movie Poster Batch
CODEBLOCK21
Dry Run Before Expensive Generation
CODEBLOCK22
Budget-Aware Generation
CODEBLOCK23
Credit Costs
| Command | Cost |
|---|
| Image (--fast) | 2 credits |
| Image (--quality) |
8 credits |
| Image (--best) | 6 credits |
| Video (--fast) | 30 credits |
| Video (--quality) | 100 credits |
| Video (--best) | 400 credits |
| Upscale (esrgan, 2x) | 3 credits |
| Upscale (clarity, 2x) | 8 credits |
| Remove background | 3 credits |
| Pipeline | image + video cost combined |
Gotchas
- 1. Generation is async by default. Use
--sync to wait for results. - Video generation takes time. 30s to 3min depending on model.
--sync waits up to 5 min. - Credits are deducted upfront. Refunded automatically on failure.
- Actor names are case-insensitive.
--actor Mei and --actor mei both work. - Style flags combine.
--lighting golden --mood romantic --art-style ghibli all apply to one generation. - Pipeline defaults to sync. It needs to wait for the image before generating the video.
- --dry-run shows the full prompt. Useful for debugging what modifiers get applied.
- Poster --style is separate from --art-style. Poster styles are preset poster designs. Art styles are visual rendering options.
- Token expiry. If you get 401 errors, run
melies login again. - Rate limits. Max 1000 requests per 15 minutes.
Environment Variables
| Variable | Description |
|---|
| INLINECODE76 | JWT auth token (overrides stored config) |
| INLINECODE77 |
API base URL (default: https://melies.co/api) |
Quick Reference
CODEBLOCK24
Links
Melies CLI
命令行AI电影制作。148个AI演员,98种视觉风格,50+模型。无需提示工程即可生成图像、视频、海报和YouTube缩略图。
安装
bash
npm install -g melies
身份验证
bash
浏览器登录(打开melies.co,自动验证)
melies login
或直接使用API令牌(适用于CI/代理)
melies login --token YOUR_TOKEN
或设置为环境变量
export MELIES
TOKEN=yourtoken
在melies.co > 设置 > API生成API令牌。
快速开始
bash
使用AI演员、吉卜力风格和金色灯光生成图像
melies image 咖啡馆里的肖像 --actor mei --art-style ghibli --lighting golden --sync
使用预设风格生成电影海报
melies poster 霓虹阴影 --style noir --actor james --sync
一条命令实现图像到视频的流水线
melies pipeline 日落时悬崖上的战士 --actor mei --best --sync
生成4个YouTube缩略图
melies thumbnail 对AI新闻做出震惊表情 --actor aria -n 4 --sync
生成前预览成本
melies image 日落 --quality --actor hailey --dry-run
智能模型选择
无需模型名称。使用质量预设:
| 标志 | 图像模型 | 视频模型 |
|---|
| (默认 / --fast) | flux-schnell (2积分) | kling-v2 (30积分) |
| --quality |
flux-pro (8积分) | kling-v3-pro (100积分) |
| --best | seedream-3 (6积分) | veo-3.1 (400积分) |
| -m
| 精确模型 | 精确模型 |
-m覆盖质量预设。使用melies models列出所有可用模型。
视觉风格标志
将这些标志添加到任何image、video、thumbnail或pipeline命令:
| 标志 | 示例值 |
|---|
| --camera | 平视、俯视、仰视、顶视、倾斜、过肩、侧面、四分之三 |
| --shot |
极特写、特写、中景、牛仔、全身、广角、更紧、更宽 |
| --expression | 微笑、大笑、严肃、惊讶、反派假笑、诱惑、惊恐 |
| --lighting | 柔和、金色、黑色、伦勃朗、逆光、霓虹、烛光、硬光 |
| --time | 黎明、日出、金色、黄昏、夜晚、早晨、正午 |
| --weather | 晴朗、雾、雨、暴风雨、雪、阴天、薄雾 |
| --color-grade | 自然、青橙、单色、暖色、冷色、电影感、复古 |
| --mood | 浪漫、神秘、紧张、空灵、粗粝、史诗、怀旧 |
| --art-style | 电影剧照、大片、黑色电影、动漫、吉卜力、新海诚、油画、水彩、概念 |
| --era | 维多利亚、1920年代、1980年代、现代、反乌托邦、中世纪 |
多个标志可组合。示例:
bash
melies image 咖啡馆里的女人 --lighting golden --mood romantic --art-style ghibli --sync
命令
melies image \<提示词\>
从文本生成图像。
bash
melies image 山上的日落 --quality --sync
melies image 肖像 --actor mei --lighting golden --sync
melies image 赛博朋克城市 --art-style neo-noir --mood gritty -n 4 --sync
melies image 产品照片 -a 1:1 --best --sync --output photo.webp
选项:
- - -m, --model 模型覆盖(改用质量预设)
- -a, --aspectRatio 1:1、16:9、9:16、4:3、3:4(默认:1:1)
- -n, --numOutputs 1-4张图像(默认:1)
- -r, --resolution 输出分辨率(取决于模型)
- -i, --imageUrl 图像到图像的参考图像
- --ref 自定义角色的参考ID(参见melies ref)
- --actor 内置AI演员名称(参见melies actors)
- --sref 风格参考代码(参见melies styles)
- --fast / --quality / --best 质量预设
- --camera、--shot、--expression、--lighting、--time、--weather、--color-grade、--mood、--art-style、--era 视觉风格标志
- --seed 可复现生成
- --dry-run 预览提示词、模型和成本,不生成
- -o, --output 保存文件到路径(与--sync一起使用)
- -s, --sync 等待完成
melies video \<提示词\>
从文本或图像生成视频。
bash
melies video 森林上空的无人机镜头 --quality --sync
melies video 走在街上 --actor mei --camera low --sync
melies video 产品特写 -i https://example.com/product.jpg --sync
选项: 与image相同,外加:
- - -d, --duration 视频时长(秒)
- 默认宽高比为16:9
- 同步超时为5分钟
melies poster \<标题\>
使用风格预设生成电影海报。
bash
melies poster 霓虹阴影 --style noir --sync
melies poster 最后的花园 --style anime --genre drama --actor mei --sync
melies poster 血月 -l 一名侦探追捕杀手 -g horror --quality --sync
选项:
- - -l, --logline 简短剧情简介
- -g, --genre 类型(恐怖、科幻、喜剧、剧情等)
- --style 海报预设:电影感、动漫、复古、黑色电影、极简、恐怖、科幻、水彩、漫画、装饰艺术、剥削电影、宝莱坞、西部、像素艺术、超现实、纪录片、卡通、史诗奇幻、独立电影、霓虹黑色
- --actor AI演员名称
- --fast / --quality / --best 质量预设
- --seed、--dry-run、--output、--sync
melies thumbnail \<提示词\>
生成YouTube缩略图(强制16:9,针对点击率优化)。
bash
melies thumbnail 对AI新闻做出震惊表情 --actor aria -n 4 --sync
melies thumbnail 烹饪教程介绍 --actor sofia --expression smile --quality --sync
选项: 与image相同。宽高比始终为16:9。默认表情为微笑,默认灯光为柔和。
melies pipeline \<提示词\>
生成图像然后将其动画化为视频。一条命令,两个步骤。
bash
melies pipeline 日落时悬崖上的战士 --actor mei --art-style concept --best --sync
melies pipeline 黎明时的宁静湖泊 --mood ethereal --lighting golden --sync
选项:
- - --im 图像模型覆盖
- --vm 视频模型覆盖
- -a, --aspectRatio 两个步骤的宽高比(默认:16:9)
- -d, --duration 视频时长
- 所有风格标志、--actor、质量预设、--dry-run、--output
- 同步默认为true
返回{ imageUrl, videoUrl }。
melies upscale \
将图像放大到更高分辨率。
bash
melies upscale https://... --model esrgan --scale 2 --sync
melies upscale https://... --model clarity --scale 4 --sync
模型:esrgan(3积分)、clarity(8积分)、seedvr2(5积分)。4倍缩放费用加倍。
melies remove-bg \
从图像中移除背景。返回透明PNG。
bash
melies remove-bg https://... --sync
费用:3积分。
melies actors
浏览148个内置AI演员。
bash
melies actors # 列出所有演员
melies actors --type influencer # 按类型筛选
melies actors --gender female --age 20s # 按性别和年龄筛选
melies actors