f24d138ab4
Sophisticated Python CLI for generating and manipulating images and video via the Freepik API, built with typer + rich. Commands: - generate-image: text-to-image with 8 models (flux-2-pro, mystic, seedream, etc.) - generate-video: image-to-video with 7 models (kling, minimax, runway, etc.) - generate-icon: text-to-icon in solid/outline/color/flat/sticker styles - upscale-image: 3 modes (precision-v2, precision, creative) + 2x/4x scale - upscale-video: standard/turbo modes - expand-image: outpainting with per-side pixel offsets - relight: AI-controlled relighting (Premium) - style-transfer: artistic style application (Premium) - describe-image: reverse-engineer an image into a prompt - config set/get/show/reset: configuration management Features: Rich Live polling panel, exponential backoff, --wait/--no-wait, auto-timestamped output filenames, streaming download with progress bar, FREEPIK_API_KEY env var support, venv-based setup. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1.4 KiB
1.4 KiB
Freepik AI CLI
A sophisticated, beautiful Python CLI for generating and manipulating images and video with the Freepik API.
Installation
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
Quick Start
export FREEPIK_API_KEY=your_api_key_here
# Generate an image
freepik generate-image "a majestic mountain at sunset" --model flux-2-pro
# Generate a video from an image
freepik generate-video photo.jpg --prompt "gentle ocean waves" --model kling-o1-pro
# Upscale an image
freepik upscale-image photo.jpg --mode precision-v2 --scale 4x
# Upscale a video
freepik upscale-video clip.mp4 --mode standard
Commands
| Command | Description |
|---|---|
generate-image |
Generate images from text prompts |
generate-video |
Animate an image into a video |
generate-icon |
Generate icons in various styles |
upscale-image |
Upscale and enhance images |
upscale-video |
Upscale video to higher resolution |
expand-image |
Outpaint / expand image borders |
relight |
Relight an image (Premium) |
style-transfer |
Apply artistic styles (Premium) |
describe-image |
Reverse-engineer an image into a prompt |
config |
Manage CLI configuration |
Configuration
freepik config show
freepik config set default_image_model mystic
freepik config set default_output_dir ~/images