CLI and JS API for Agnes text, image, and video workflows.
Install globally:
npm install -g agnes-ai-cliRun without installing:
npx -y agnes-ai-cli --helpagnes --help
agnes auth check
agnes media url ./input.png
agnes text chat --prompt "say pong"
agnes image text2img --prompt "a polished product photo of a perfume bottle"
agnes image img2img --image ./input.png --prompt "turn this into a clean editorial poster"
agnes video text2video --prompt "a cinematic drone shot of waves at dusk"
agnes video img2video --image ./frame.png --prompt "animate subtle rain and drifting fog"
agnes video multivideo --image ./frame-a.png --image ./frame-b.png --prompt "blend these references into one motion concept"
agnes video keyframes --image ./frame-a.png --image ./frame-b.png --prompt "morph between the two scenes"
agnes video poll <video-or-task-id>Local media inputs are uploaded to a temporary public URL automatically. The default bridge tries Litterbox first, then falls back to tmpfiles, Uguu, and x0.at.
Video creation is asynchronous. Create commands print both taskId and videoId when Agnes returns them; use videoId with agnes video poll. Passing an older taskId still works through the legacy polling endpoint.
import { createAgnesClient } from "agnes-ai-cli";
const agnes = createAgnesClient({ apiKey: process.env.AGNES_API_KEY });
const image = await agnes.image.generate({
mode: "text2img",
prompt: "A cinematic product shot of a silver watch on black stone."
});
console.log(image.url);You can override the temporary upload provider order when a specific host works better for your Agnes workflow:
const agnes = createAgnesClient({
apiKey: process.env.AGNES_API_KEY,
temporaryMediaProviderOrder: ["tmpfiles", "litterbox", "uguu", "x0"]
});