fablun
by Crimson-Pass
README.md
# fablun
Official zero-dependency **CLI**, **Agent Skill (`SKILL.md`)**, and **lightweight MCP server** for [Fablun](https://fablun.com) — one API key & shared USD balance for **H3 Pro Precise Video Subject Swap (`$0.025/s`)** plus **19 live frontier video & image models** (MAGI-2, Seedance 2.5, Kling 4.0, Veo 3.1, FLUX 3, GPT Image 2, Nano Banana).
> **Try free:** Sign in with Google or GitHub at [fablun.com/console](https://fablun.com/console) to claim **$1.00 free H3 Pro credit** (~8 free 5s swaps, no card required). Pay-as-you-go starts from `$5`, no monthly subscription, 100% auto-refund on failed or cancelled jobs.
---
## 1. Install as an Agent Skill (Claude Code · Cursor · Codex · Antigravity)
Give your AI coding agent native video swapping & generation without bloating its context window:
```bash
npx skills add Crimson-Pass/fablun-cli
```
Once installed, just tell Claude Code / Cursor / Codex:
> *"Quote a 5s 480p H3 Pro swap and replace the earbuds case in this video with this product image, keeping camera motion and lighting."*
---
## 2. Use the CLI Directly
Zero runtime dependencies · Node.js 18+ · instant cold start.
```bash
# Run without installing
npx fablun --help
# Or install globally
npm i -g fablun
```
### Authenticate
```bash
export FABLUN_API_KEY="your_api_key_here"
# or save locally to ~/.config/fablun/config.json (0600 permissions)
fablun auth login
```
### Flagship: H3 Pro Precise Subject Swap (`$0.025/s` · `~$0.125 / 5s`)
Lock the source video's camera motion, lighting, and background while replacing a foreground object, outfit, or subject:
```bash
fablun swap \
--video "https://example.com/source-clip.mp4" \
--ref "https://example.com/new-product.png" \
--target "earbuds case" \
--prompt "Replace the earbuds case with <Picture 1>, keeping exact camera motion and lighting" \
--resolution 480p \
--duration 5 \
--ratio 16:9 \
-o swapped.mp4
```
### Generate Video or Image Across 19 Live Models
Local image files passed to `--image` / `--last-image` are automatically encoded and sent inline:
```bash
# List all live models & starting USD rates
fablun models
# Check real-time USD estimate before spending
fablun quote magi-2 --resolution 1080P --duration 5 --ratio 16:9
# MAGI-2 (Sand AI 480B · 1080p native audio · $0.08/s)
fablun generate magi-2 \
--prompt "Rain-slicked Tokyo alley at dusk, slow dolly forward, neon reflections" \
--resolution 1080P --duration 5 --ratio 16:9 \
-o tokyo.mp4
# H3 Pro image-to-video from a local PNG
fablun generate h3-pro \
--image ./product-frame.png \
--prompt "Smooth macro orbit, studio rim lighting" \
--resolution 480p --duration 5 \
-o product.mp4
# Image generation (FLUX 3, GPT Image 2, Nano Banana 2.1/Pro, Seedream 5.5, H3 Image)
fablun generate flux-3 \
--prompt "Ceramic espresso cup on warm oak desk, morning sunlight" \
--ratio 1:1 \
-o cup.png
```
### Async Workflows & Scripting (`--json`)
Every command supports `--json` for agents and CI pipelines:
```bash
fablun generate seedance-2.5 --prompt "..." --no-wait --json
fablun status gen_0123456789abcdef --wait -o out.mp4 --json
fablun list --limit 10 --json
fablun cancel gen_0123456789abcdef --json
```
---
## 3. Run as a Lightweight MCP Server (6 Focused Tools)
No heavy dependencies, ~1.2K tokens of tool definitions:
- `fablun_list_models` — Live models, modes, specs & USD rates
- `fablun_quote` — Real-time USD estimate & balance check
- `fablun_swap_video` — H3 Pro Precise Subject Swap (`preserve_scene`) & Free Reference (`standard`)
- `fablun_generate` — Unified video & image generation across all 19 live models
- `fablun_get_task` — Poll & optionally download completed media for any `cgt-*` / `gen_*` / `img_*` task
- `fablun_cancel_task` — Cancel queued/running task for 100% auto-refund
### Claude Code
```bash
claude mcp add fablun -e FABLUN_API_KEY=your_api_key -- npx -y fablun mcp
```
### Cursor / Claude Desktop / Codex (`mcp.json`)
```json
{
"mcpServers": {
"fablun": {
"command": "npx",
"args": ["-y", "fablun", "mcp"],
"env": {
"FABLUN_API_KEY": "your_api_key"
}
}
}
}
```
---
## Supported Models
| Category | Models |
| :--- | :--- |
| **Fablun Native** | `h3-pro` (T2V, I2V, Reference-to-Video, Precise Subject Swap · `$0.025/s`), `h3-image` |
| **Video (Unified API)** | `magi-2`, `seedance-2.5`, `seedance-2.5-flash`, `seedance-2.0`, `seedance-2.0-fast`, `kling-4.0`, `kling-3-pro`, `veo-3.1`, `veo-3.1-fast`, `veo-3.1-lite`, `gemini-omni-1.2-flash` |
| **Image (Unified API)** | `flux-3`, `gpt-image-2`, `nano-banana-2.1`, `nano-banana-pro`, `kling-image-4.0`, `seedream-5.5` |
Full API documentation: [fablun.com/docs](https://fablun.com/docs)
## License
MIT © Crimson Pass Technologies, Inc.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues