gen-ai-use

Generate AI images, videos, and audio via the Picsart gen-ai CLI.

4|2|Updated May 6, 2026
One-click install
npx skills add https://github.com/PicsArt/gen-ai-skills --skill gen-ai-use-picsart
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gen-ai-use
Source: https://github.com/PicsArt/gen-ai-skills/tree/main/skills/gen-ai-use
Command: npx skills add https://github.com/PicsArt/gen-ai-skills --skill gen-ai-use-picsart

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Working with generative AI models from the terminal requires knowing dozens of commands, flags, model IDs, and edge cases. This Skill gives an agent the operational knowledge to drive the Picsart gen-ai CLI correctly — from authentication and single generations to batch runs, Drive uploads, and troubleshooting — without guessing at flags or stale model names. ## Core Features & Use Cases - Generation workflows: Run text-to-image, image-to-image, text-to-video, and image-to-video generations with correct model IDs, aspect ratios, and input mappings (e.g. -i auto-mapped to startFrame for i2v models). - Batch and Drive operations: Execute manifest-based batch runs with concurrency control and resume failed jobs, plus upload, download, and list files in Picsart Drive. - Diagnostics and scripting: Use --dry-run, --debug, --script, and --no-input for CI-safe, pipe-friendly automation, with a troubleshooting table for common errors. - Use Case: A user asks to generate 20 product image variants overnight. The agent writes a JSON manifest, validates it with --dry-run, runs gen-ai batch run -c 20, then summarizes results.json and retries failures with batch resume. ## Quick Start Ask the agent to generate an image with the gen-ai CLI, for example: "Use gen-ai to generate a sunset over mountains with the flux-2-pro model and save it to my Drive."

Frequently Asked Questions about gen-ai-use

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate an image with the gen-ai CLI?▼

Run `gen-ai generate -m <model-id> -p "your prompt" -s` for a fully specified non-interactive generation. Check available model IDs first with `gen-ai models`, since IDs change as new versions ship.

How do I run batch image generation with gen-ai?▼

Write a JSON manifest with a `jobs` array where each job has a unique `id`, `model`, and `prompt`, then run `gen-ai batch run manifest.json -c <concurrency> -o <dir>`. Validate first with `--dry-run` and retry failures using `gen-ai batch resume <dir>/results.json`.

How do I use gen-ai in CI or non-interactive scripts?▼

Pass `--script` (shorthand for `--silent --quiet --json`) for clean pipe output, and add `--no-input` so the CLI fails fast instead of hanging on prompts. For headless auth, set the PICSART_ACCESS_TOKEN and PICSART_USER_ID environment variables.

Does gen-ai support image-to-video generation?▼

Yes. Pass an input image with `-i` to an i2v model such as VEO, Kling, or Luma, and the CLI auto-maps it to the model's startFrame parameter. Confirm a model's accepted inputs with `gen-ai models info <id>` before running.

Why does gen-ai say "Not authenticated" even after whoami succeeds?▼

`gen-ai whoami` only reads the cached credentials file and does not verify token expiry or make a network call. If a command fails with an AuthError, run `gen-ai login` again; if it fails with a NetworkError, the problem is connectivity, not credentials.

When should I not use the gen-ai CLI?▼

Avoid it for SDK-level integrations, where the `@picsart/ai-sdk` reference is the right source, and for Picsart web or mobile app flows. Models not yet shipped in the SDK catalog are also unavailable to the CLI.