Skip to main content

Quickstart with an AI agent

Ask your AI agent for a video. It writes the edit, checks it and opens it in Studio, where you can play it and change anything by hand. You don't need an API key to preview. You need one to export the finished file.

This guide uses the Shotstack CLI and skill with a coding agent in your terminal, such as Claude Code, Cursor, Codex CLI or Gemini CLI. Using Claude, ChatGPT or another chat client instead? Connect the MCP server. It works the same way and shows Studio right in the conversation.

1. Give your agent the Shotstack skill​

You need Node.js. Install the CLI and add the skill:

npm install -g @shotstack/cli
npx skills add shotstack/shotstack-cli

The skill teaches your agent how to write a valid edit and when to use each CLI command. Your agent reads it whenever you ask for a video. Already installed? Both are updated often, so update them first: npm install -g @shotstack/cli@latest and npx skills update shotstack -y.

2. Ask for a video​

Tell your agent what the video is for, where it will be shown and what it should contain. The more you say, the fewer questions it asks before it starts:

Make a 15-second vertical video for our spring sale: a bold headline, "30% off this week",
three product photos and upbeat music. Use sample media for now, then open it in Studio.

Your agent writes the edit to a file, then runs two commands:

shotstack validate edit.json   # checks the edit offline
shotstack studio edit.json # opens the edit at shotstack.studio

Neither command needs an API key, and neither uses credits.

3. Review it in Studio​

Studio opens in your browser with the edit on a timeline. Play it, move clips, change the text and swap images. Keep going there, or ask your agent for changes and it updates the same edit.

4. Render the video​

To export an MP4, get your API keys and save one with shotstack login. Then ask your agent to render, or run:

shotstack render edit.json --env stage --watch

Renders in the stage environment are free and carry a watermark. Use --env v1 for production renders, which use credits.

Next steps​

  • Make it reusable. Ask your agent to save the edit as a template with merge fields, then render it with different data. See From draft to production.
  • Generate the media. Ask for an AI voice-over, music, images or clips. They're generated from prompts while the video renders. See Generating assets with AI.
  • Choose how your agent connects. See AI agents.