Перейти к содержимомуAI Media Studio
Открыть студию

AI Media Studio for developers

AI Media Studio has a public REST API, a command-line tool and an MCP server, so you can generate images and videos from your own code or from an AI coding agent. Every call uses the same models and the same workspace credits as the web app. Full reference: developer docs.

Last reviewed .

Does AI Media Studio have an API?

Yes. The REST API lives at https://app.ai-media-studio.com/api/v1 and authenticates with a bearer API key. Workspace owners and admins create keys in the app under workspace settings, API, and choose the scopes each key gets.

MethodEndpointWhat it does
POST/api/v1/images/generateGenerate or edit an image
POST/api/v1/videos/generateGenerate a video from text or an image
GET/api/v1/modelsList the image and video models your key can use
POST/api/v1/uploadsUpload a source image for edits or image-to-video

Key scopes: image:generate, video:generate, media:read, media:write.

curl -X POST https://app.ai-media-studio.com/api/v1/images/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "a red panda astronaut, studio lighting"}'

Which models can I call?

Image models: Nano Banana 2.1, Nano Banana Pro, GPT Image 2.5, Muse Image.

Video models: Kling O3 Pro, Kling v3 Pro, Seedance 2.0, Grok Imagine Video 1.5.

GET /api/v1/models returns the current list with credit costs, so your code does not need to hardcode it. For a readable overview of what each model costs per image or per second of video, see the AI model price list.

Is there a command-line tool?

Yes. Install the CLI from npm and log in with your API key:

npm install -g @ai-media-studio/cli
aims login --key aims_xxx

Can I use AI Media Studio from Claude Code, Cursor or Codex?

Yes. The @ai-media-studio/mcp server works with Claude Code, Cursor, Codex and Claude Desktop. In Claude Code:

claude mcp add aims \
  -e AIMS_API_KEY=aims_... \
  -- npx -y -p @ai-media-studio/mcp@latest aims-mcp

Agent skills are also available:

npx skills add liebhardt-io/aims-agent

How is API usage billed?

API calls draw from the same monthly workspace credits as the web app, at the same per-model credit cost. Paid plans start at $19/month.

How do I generate and download an image from the terminal or an AI agent?

One worked session, from a new API key to an image file on disk. Every aims command below comes from the CLI docs and MCP docs.

  1. Create an API key in the app under workspace settings, API. It starts with aims_. Give it the image:generate scope (add video:generate for video and media:write to upload your own photos).

  2. CLI: install the CLI and log in. The key is stored in ~/.aims/config.json; you can also set AIMS_API_KEY.

    npm install -g @ai-media-studio/cli
    aims login --key aims_xxx

    Check the key and preview the request without spending credits:

    aims whoami --json
    aims image "a red panda astronaut, studio lighting" --dry-run --json
  3. Generate the image. --print url prints only the result URL; use --json instead for the full result.

    aims image "a red panda astronaut, studio lighting" \
      --aspect-ratio 16:9 \
      --print url
  4. Download the file from the printed URL with any HTTP client, for example:

    curl -o red-panda.png "PASTE_THE_PRINTED_URL"

MCP instead of the CLI: register the server with the claude mcp add command above and restart Claude Code, or add this to the MCP config of Cursor, Codex, Claude Desktop or a project .mcp.json:

{
  "mcpServers": {
    "aims": {
      "command": "npx",
      "args": ["-y", "-p", "@ai-media-studio/mcp@latest", "aims-mcp"],
      "env": { "AIMS_API_KEY": "aims_..." }
    }
  }
}

Then ask in plain language. The agent calls generate_image and generate_video and returns the result URLs:

Use aims to generate a 16:9 image of a red panda
astronaut, then make a 6-second video panning across it.

Save the returned URLs the same way as in step 4. For a local photo, run aims upload ./photo.png --print url and pass the returned URL to edit_image or generate_video.

Developer FAQ

Which API key scopes does AI Media Studio have?

AI Media Studio API keys have four scopes: image:generate for POST /api/v1/images/generate, video:generate for POST /api/v1/videos/generate, media:write for POST /api/v1/uploads, and media:read. Workspace owners and admins create keys under workspace settings, API, and pick the scopes for each key.

How do I install the AI Media Studio MCP server?

In Claude Code, run: claude mcp add aims -e AIMS_API_KEY=aims_... -- npx -y -p @ai-media-studio/mcp@latest aims-mcp, then restart Claude Code. For Cursor, Codex, Claude Desktop or a project .mcp.json, add a server named aims with the command npx, the arguments -y -p @ai-media-studio/mcp@latest aims-mcp, and AIMS_API_KEY in its environment. The server exposes generate_image, edit_image, generate_video, upload_image, list_models and get_account.

Is there an AI Media Studio command-line tool?

Yes. Install it with npm install -g @ai-media-studio/cli, log in with aims login --key aims_xxx, then run aims image, aims edit, aims video or aims upload. Add --json for machine-readable output, --print url to print only result URLs, and --dry-run to preview a request without spending credits.

What are the AI Media Studio API rate limits?

Every plan has the same generation rate limit: 60 image generation requests and 20 video generation requests per 10 minutes, counted per workspace for API keys. This is a limit on how many requests you can send, not a guarantee of generation speed. A request over the limit gets HTTP 429 with a Retry-After header.

Does the API cost extra?

No. API, CLI and MCP calls draw from the same monthly workspace credits as the web app, at the same per-model credit cost. There is no separate API fee; paid plans start at $19/month.