krea-ai
Krea AI — Image, Video & Enhancement Generation
Generate images, videos, upscale/enhance images, and train LoRA styles using the Krea.ai API. Supports 20+ image models (Flux, Imagen, GPT Image, Ideogram, Seedream...), 7 video models (Kling, Veo, Hailuo, Wan), and 3 upscalers (Topaz up to 22K).
IMPORTANT: Do NOT invent model names. Run list_models.py to get the live list of models, CU costs, and accepted parameters from the Krea API's OpenAPI spec. All scripts resolve models dynamically from the spec — there are no hardcoded endpoint tables. Scripts also accept full endpoint paths from list_models.py --json output (e.g. --model /generate/image/google/imagen-4-ultra).
Usage
Scripts are in the scripts/ directory alongside this file. Run them with uv run from the user's working directory so output files are saved where the user expects.
Generate image:
uv run scripts/generate_image.py --prompt "your description" --filename "output.png" [--model nano-banana-2] [--width 1024] [--height 1024] [--api-key KEY]
Generate video:
uv run scripts/generate_video.py --prompt "your description" --filename "output.mp4" [--model veo-3.1-fast] [--duration 5] [--aspect-ratio 16:9] [--api-key KEY]