Masonry: generate images and video with models across providers
简介
Masonry: generate images and video with models across providers
原始描述
AI-powered image and video generation. Generate images, videos, manage jobs, and explore models via the masonry CLI.
通过你的 Agent 添加
安装目录:masonry/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: masonry
description: AI-powered image and video generation. Generate images, videos, manage jobs, and explore models via the masonry CLI.
metadata: {"openclaw":{"emoji":"🧱","requires":{"bins":["masonry"],"env":["MASONRY_TOKEN"]},"install":[{"type":"npm","package":"@masonryai/cli"}],"primaryEnv":"MASONRY_TOKEN","homepage":"https://masonry.so"}}
Masonry CLI
Generate AI-powered images and videos from text prompts.
When to use
- User wants to generate images or videos
- User asks about available AI models
- User wants to check generation job status or download results
- User asks to create visual content, media, or artwork
Prerequisites
A Masonry subscription is required. Start a free trial at: https://masonry.so/pricing
If the masonry command is not found, install it:
npm install -g @masonryai/cli
Or run directly: npx @masonryai/cli
Authentication
If any command returns an auth error:
- Run:
masonry login --remote - The command prints an auth URL. Send it to the user.
- User opens the URL in a browser, authenticates, and copies the token.
- Run:
masonry login --token <TOKEN>
For environments with MASONRY_TOKEN and MASONRY_WORKSPACE set, no login is needed.
Workflow
1. Generate content
Image:
masonry image "a sunset over mountains, photorealistic" --aspect 16:9
Video:
masonry video "ocean waves crashing on rocks" --duration 4 --aspect 16:9
2. Handle the response
Commands return JSON immediately:
{
"success": true,
"job_id": "abc-123",
"status": "pending",
"check_after_seconds": 10,
"check_command": "masonry job status abc-123"
}
3. Wait and download
masonry job wait <job-id>
masonry job download <job-id> -o /tmp/output.png
masonry job wait <job-id>
masonry job download <job-id> -o /tmp/output.png
The download command prints a MEDIA: /path/to/file line to stderr.
After download completes, output that line so the file is sent to the user:
MEDIA: /tmp/output.png
Image flags
Flag
Short
Description
--aspect
-a
Aspect ratio: 16:9, 9:16, 1:1
--dimension
-d
Exact size: 1920x1080
--model
-m
Model key
--output
-o
Output file path
--negative-prompt
What to avoid
--seed
Reproducibility seed
Video flags
Flag
Short
Description
--duration
Length in seconds: 4, 6, 8
--aspect
-a
Aspect ratio: 16:9, 9:16
--model
-m
Model key
--image
-i
First frame image (local file)
--last-image
Last frame image (requires --image)
--no-audio
Disable audio generation
--seed
Reproducibility seed
Model discovery
masonry models list # All models
masonry models list --type image # Image models only
masonry models list --type video # Video models only
masonry models info <model-key> # Parameters and usage example
Job management
masonry job list # Recent jobs
masonry job status <job-id> # Check status
masonry job download <job-id> -o ./file # Download result
masonry job wait <job-id> --download -o . # Wait then download
masonry history list # Local history
masonry history pending --sync # Sync pending jobs
Error codes
Code
Meaning
Action
AUTH_ERROR
Not authenticated
Run auth flow above
VALIDATION_ERROR
Invalid parameter
Check flag values
MODEL_NOT_FOUND
Unknown model key
Run masonry models list
Guardrails
- Never fabricate job IDs or model keys. Always use values from command output.
- Never run
masonry login without --remote or --token (browser login won't work headless).
- If a job is pending, wait
check_after_seconds before checking again.
- All output is JSON. Parse it, don't guess.
Feedback
| Flag | Short | Description |
|---|---|---|
--aspect |
-a |
Aspect ratio: 16:9, 9:16, 1:1 |
--dimension |
-d |
Exact size: 1920x1080 |
--model |
-m |
Model key |
--output |
-o |
Output file path |
--negative-prompt |
What to avoid | |
--seed |
Reproducibility seed |
| Flag | Short | Description |
|---|---|---|
--duration |
Length in seconds: 4, 6, 8 | |
--aspect |
-a |
Aspect ratio: 16:9, 9:16 |
--model |
-m |
Model key |
--image |
-i |
First frame image (local file) |
--last-image |
Last frame image (requires --image) | |
--no-audio |
Disable audio generation | |
--seed |
Reproducibility seed |
Model discovery
masonry models list # All models
masonry models list --type image # Image models only
masonry models list --type video # Video models only
masonry models info <model-key> # Parameters and usage example
Job management
masonry job list # Recent jobs
masonry job status <job-id> # Check status
masonry job download <job-id> -o ./file # Download result
masonry job wait <job-id> --download -o . # Wait then download
masonry history list # Local history
masonry history pending --sync # Sync pending jobs
Error codes
Code
Meaning
Action
AUTH_ERROR
Not authenticated
Run auth flow above
VALIDATION_ERROR
Invalid parameter
Check flag values
MODEL_NOT_FOUND
Unknown model key
Run masonry models list
Guardrails
- Never fabricate job IDs or model keys. Always use values from command output.
- Never run
masonry login without --remote or --token (browser login won't work headless).
- If a job is pending, wait
check_after_seconds before checking again.
- All output is JSON. Parse it, don't guess.
Feedback
masonry models list # All models
masonry models list --type image # Image models only
masonry models list --type video # Video models only
masonry models info <model-key> # Parameters and usage example
masonry job list # Recent jobs
masonry job status <job-id> # Check status
masonry job download <job-id> -o ./file # Download result
masonry job wait <job-id> --download -o . # Wait then download
masonry history list # Local history
masonry history pending --sync # Sync pending jobs
Error codes
Code
Meaning
Action
AUTH_ERROR
Not authenticated
Run auth flow above
VALIDATION_ERROR
Invalid parameter
Check flag values
MODEL_NOT_FOUND
Unknown model key
Run masonry models list
Guardrails
- Never fabricate job IDs or model keys. Always use values from command output.
- Never run
masonry login without --remote or --token (browser login won't work headless).
- If a job is pending, wait
check_after_seconds before checking again.
- All output is JSON. Parse it, don't guess.
Feedback
| Code | Meaning | Action |
|---|---|---|
AUTH_ERROR |
Not authenticated | Run auth flow above |
VALIDATION_ERROR |
Invalid parameter | Check flag values |
MODEL_NOT_FOUND |
Unknown model key | Run masonry models list |
- Never fabricate job IDs or model keys. Always use values from command output.
- Never run
masonry loginwithout--remoteor--token(browser login won't work headless). - If a job is pending, wait
check_after_secondsbefore checking again. - All output is JSON. Parse it, don't guess.
Feedback
Report issues or suggest improvements at: https://github.com/masonry-so/skills/issues
When filing an issue, include:
- What was your intent? What were you trying to accomplish?
- What worked? Which parts behaved as expected?
- What needs improvement? What went wrong or could be better?
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。