diff --git a/.env.example b/.env.example index 2844a32..4d00b54 100644 --- a/.env.example +++ b/.env.example @@ -1,11 +1,11 @@ -# Freepik API Configuration -# Get your API key at https://www.freepik.com/api -FREEPIK_API_KEY=your_api_key_here +# Magnific API Configuration +# Get your API key at https://magnific.ai +MAGNIFIC_API_KEY=your_api_key_here # Optional overrides -# FREEPIK_BASE_URL=https://api.freepik.com -# FREEPIK_POLL_TIMEOUT=600 -# FREEPIK_DEFAULT_IMAGE_MODEL=flux-2-pro -# FREEPIK_DEFAULT_VIDEO_MODEL=kling-o1-pro -# FREEPIK_DEFAULT_OUTPUT_DIR=./output -# FREEPIK_SHOW_BANNER=true +# MAGNIFIC_BASE_URL=https://api.magnific.ai +# MAGNIFIC_POLL_TIMEOUT=600 +# MAGNIFIC_DEFAULT_IMAGE_MODEL=flux-2-pro +# MAGNIFIC_DEFAULT_VIDEO_MODEL=kling-o1-pro +# MAGNIFIC_DEFAULT_OUTPUT_DIR=./output +# MAGNIFIC_SHOW_BANNER=true diff --git a/README.md b/README.md index af923f0..cc73064 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ -# Freepik AI CLI +# Magnific AI CLI -A sophisticated, beautiful command-line interface for the [Freepik AI API](https://docs.freepik.com/introduction) — generate images, animate videos, upscale media, and more, all from your terminal. +A sophisticated, beautiful command-line interface for the [Magnific AI API](https://magnific.ai) — generate images, animate videos, upscale media, and more, all from your terminal. ``` - ███████╗██████╗ ███████╗███████╗██████╗ ██╗██╗ ██╗ - ██╔════╝██╔══██╗██╔════╝██╔════╝██╔══██╗██║██║ ██╔╝ - █████╗ ██████╔╝█████╗ █████╗ ██████╔╝██║█████╔╝ - ██╔══╝ ██╔══██╗██╔══╝ ██╔══╝ ██╔═══╝ ██║██╔═██╗ - ██║ ██║ ██║███████╗███████╗██║ ██║██║ ██╗ - ╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ - AI Media Generation CLI • v0.1.0 +███╗ ███╗ █████╗ ██████╗ ███╗ ██╗██╗███████╗██╗ ██████╗ +████╗ ████║██╔══██╗██╔════╝ ████╗ ██║██║██╔════╝██║██╔════╝ +██╔████╔██║███████║██║ ███╗██╔██╗ ██║██║█████╗ ██║██║ +██║╚██╔╝██║██╔══██║██║ ██║██║╚██╗██║██║██╔══╝ ██║██║ +██║ ╚═╝ ██║██║ ██║╚██████╔╝██║ ╚████║██║██║ ██║╚██████╗ +╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝ ╚═════╝ + AI Media Generation CLI • v0.1.0 ``` ## Features @@ -18,20 +18,20 @@ A sophisticated, beautiful command-line interface for the [Freepik AI API](https - **Beautiful terminal UI** — live polling panels, progress bars, color-coded status, Rich-themed output - **15+ AI models** — Flux, Mystic, Seedream, Kling, Minimax, Runway, and more - **Async-first** — all long-running tasks poll with exponential backoff; use `--no-wait` for fire-and-forget -- **Zero config required** — just set `FREEPIK_API_KEY` and go +- **Zero config required** — just set `MAGNIFIC_API_KEY` and go ## Installation ### Prerequisites - Python 3.11+ -- A [Freepik API key](https://www.freepik.com/api) (free tier includes $5 credit) +- A [Magnific API key](https://magnific.ai) (free tier includes $5 credit) ### Setup ```bash git clone -cd freepik +cd magnific python3 -m venv .venv source .venv/bin/activate # Windows: .venv\Scripts\activate @@ -42,7 +42,7 @@ pip install -e . ### API Key ```bash -export FREEPIK_API_KEY=your_api_key_here +export MAGNIFIC_API_KEY=your_api_key_here ``` Or add it to a `.env` file in the project root (see `.env.example`). @@ -51,19 +51,19 @@ Or add it to a `.env` file in the project root (see `.env.example`). ```bash # Generate an image -freepik generate-image "a misty forest at dawn, cinematic lighting" +magnific generate-image "a misty forest at dawn, cinematic lighting" # Animate an image into a video -freepik generate-video photo.jpg --prompt "gentle camera drift" --duration 5 +magnific generate-video photo.jpg --prompt "gentle camera drift" --duration 5 # Upscale an image 4x -freepik upscale-image photo.jpg --mode precision-v2 --scale 4x +magnific upscale-image photo.jpg --mode precision-v2 --scale 4x # Upscale a video -freepik upscale-video clip.mp4 --mode turbo +magnific upscale-video clip.mp4 --mode turbo # Describe an image (reverse-engineer its prompt) -freepik describe-image painting.jpg +magnific describe-image painting.jpg ``` ## Commands @@ -73,7 +73,7 @@ freepik describe-image painting.jpg Generate an image from a text prompt. ```bash -freepik generate-image [OPTIONS] +magnific generate-image [OPTIONS] ``` | Option | Short | Default | Description | @@ -85,14 +85,14 @@ freepik generate-image [OPTIONS] | `--input-image` | `-i` | — | Reference image for img2img (flux-kontext-pro) | | `--output` | `-o` | auto | Output file path | | `--wait / --no-wait` | | `--wait` | Wait for completion or return task ID | -| `--api-key` | | `$FREEPIK_API_KEY` | API key override | +| `--api-key` | | `$MAGNIFIC_API_KEY` | API key override | **Available models:** | Model | Description | |-------|-------------| | `flux-2-pro` | High-quality, versatile (default) | -| `mystic` | Freepik's exclusive photorealistic workflow | +| `mystic` | Magnific's exclusive photorealistic workflow | | `flux-kontext-pro` | Instruction-based image editing (img2img) | | `flux-2-turbo` | Fast generation | | `flux-pro-1.1` | Flux Pro v1.1 | @@ -103,11 +103,11 @@ freepik generate-image [OPTIONS] **Examples:** ```bash -freepik generate-image "a cat on the moon, oil painting style" -freepik generate-image "cyberpunk city at night" --model mystic --aspect-ratio 16:9 -freepik generate-image "make the sky orange at sunset" --model flux-kontext-pro --input-image photo.jpg -freepik generate-image "portrait of a wizard" --seed 42 --output wizard.jpg -freepik generate-image "vast ocean panorama" --model flux-2-pro --no-wait +magnific generate-image "a cat on the moon, oil painting style" +magnific generate-image "cyberpunk city at night" --model mystic --aspect-ratio 16:9 +magnific generate-image "make the sky orange at sunset" --model flux-kontext-pro --input-image photo.jpg +magnific generate-image "portrait of a wizard" --seed 42 --output wizard.jpg +magnific generate-image "vast ocean panorama" --model flux-2-pro --no-wait ``` --- @@ -117,7 +117,7 @@ freepik generate-image "vast ocean panorama" --model flux-2-pro --no-wait Animate a source image into a short video clip. ```bash -freepik generate-video [OPTIONS] +magnific generate-video [OPTIONS] ``` | Option | Short | Default | Description | @@ -129,7 +129,7 @@ freepik generate-video [OPTIONS] | `--seed` | | — | Seed for reproducibility | | `--output` | `-o` | auto | Output `.mp4` path | | `--wait / --no-wait` | | `--wait` | | -| `--api-key` | | `$FREEPIK_API_KEY` | | +| `--api-key` | | `$MAGNIFIC_API_KEY` | | **Available models:** @@ -146,9 +146,9 @@ freepik generate-video [OPTIONS] **Examples:** ```bash -freepik generate-video photo.jpg --prompt "gentle ocean waves lapping at the shore" -freepik generate-video portrait.png --model minimax-hailuo --duration 10 --aspect-ratio 9:16 -freepik generate-video landscape.jpg --model kling-o1-pro --output timelapse.mp4 +magnific generate-video photo.jpg --prompt "gentle ocean waves lapping at the shore" +magnific generate-video portrait.png --model minimax-hailuo --duration 10 --aspect-ratio 9:16 +magnific generate-video landscape.jpg --model kling-o1-pro --output timelapse.mp4 ``` --- @@ -158,7 +158,7 @@ freepik generate-video landscape.jpg --model kling-o1-pro --output timelapse.mp4 Upscale and enhance an image using AI. ```bash -freepik upscale-image [OPTIONS] +magnific upscale-image [OPTIONS] ``` | Option | Short | Default | Description | @@ -170,7 +170,7 @@ freepik upscale-image [OPTIONS] | `--seed` | | — | Seed for reproducibility | | `--output` | `-o` | auto | Output file path | | `--wait / --no-wait` | | `--wait` | | -| `--api-key` | | `$FREEPIK_API_KEY` | | +| `--api-key` | | `$MAGNIFIC_API_KEY` | | **Modes:** @@ -183,9 +183,9 @@ freepik upscale-image [OPTIONS] **Examples:** ```bash -freepik upscale-image photo.jpg --scale 4x -freepik upscale-image photo.jpg --mode precision-v2 --scale 2x --output photo_hd.jpg -freepik upscale-image portrait.jpg --mode creative --creativity 6 --prompt "sharp cinematic texture" +magnific upscale-image photo.jpg --scale 4x +magnific upscale-image photo.jpg --mode precision-v2 --scale 2x --output photo_hd.jpg +magnific upscale-image portrait.jpg --mode creative --creativity 6 --prompt "sharp cinematic texture" ``` --- @@ -195,7 +195,7 @@ freepik upscale-image portrait.jpg --mode creative --creativity 6 --prompt "shar Upscale a video to higher resolution using AI. ```bash -freepik upscale-video