Agent setup

Use Vidgo from your AI coding agent

Give your agent the Vidgo docs over MCP and an API key. It can then look up models, write the integration and run generation tasks for you.

Get an API key

What your agent gets

Docs MCP server

Search and read every Vidgo docs page, model parameter and OpenAPI spec. Read-only, no sign-in.

https://docs.vidgo.ai/mcp

Docs for agents

An llms.txt index of the docs, plus a Markdown copy of every page for agents without MCP.

https://docs.vidgo.ai/llms.txt

API key

One key for every model. Keep it in an environment variable so the agent never writes it into code.

VIDGO_API_KEY

Quick start: paste one prompt

Works in any coding agent. It adds the docs MCP server, reads the docs index, and checks for VIDGO_API_KEY before making any paid request.

prompt.md
Set up the Vidgo API (AI image, video, audio, music and 3D generation) for this project.

1. Add the Vidgo docs MCP server (https://docs.vidgo.ai/mcp, HTTP, no auth) with the method for the agent you are:
   - Claude Code: claude mcp add --transport http vidgo https://docs.vidgo.ai/mcp
   - Codex: add [mcp_servers.vidgo] with url = "https://docs.vidgo.ai/mcp" to ~/.codex/config.toml
   - Cursor: add {"mcpServers":{"vidgo":{"url":"https://docs.vidgo.ai/mcp"}}} to .cursor/mcp.json
   - OpenCode: add {"mcp":{"servers":{"vidgo":{"type":"remote","url":"https://docs.vidgo.ai/mcp"}}}} to opencode.json
   If the server only loads after a restart, tell me and continue with step 2.
2. Read https://docs.vidgo.ai/llms.txt. Any docs page is also available as Markdown by adding .md to its URL.
3. Use the API key from the VIDGO_API_KEY environment variable. Never hard-code, log or commit it. If it is not set, ask me to create one at https://vidgo.ai/apis/dashboard/api-key.
4. To generate, POST https://api.vidgo.ai/api/generate/submit with "Authorization: Bearer $VIDGO_API_KEY" and a JSON body {"model": "vendor/model/mode", "input": {...}, "callback_url": "optional"}. Model IDs look like kwaivgi/kling-v4.0/text-to-video. Pick the model and its input fields from its docs page (search the docs MCP, or see https://vidgo.ai/apis/models). Each submit spends credits.
5. Save data.task_id, then GET https://api.vidgo.ai/api/generate/status/{task_id} every 5 seconds until data.status is "finished" or "failed", or use callback_url to get a webhook. Download data.files[].file_url right away; files expire after 24 hours.

When you are done, reply "Vidgo is ready", say whether the MCP server is connected, and wait for my first request.

Setup by agent

Claude Code

Anthropic's coding agent for the terminal, IDEs and desktop.

  1. 01 · Add the docs MCP server

    Terminal
    claude mcp add --transport http vidgo https://docs.vidgo.ai/mcp

    Run this in your project. Add --scope user to make it available in every project.

  2. 02 · Check the connection

    Run this, or type /mcp inside Claude Code. vidgo should show as connected.

    claude mcp list
  3. 03 · Set your API key

    Create a key on the API key page, then export it in the shell that starts your agent:

    macOS / Linux
    # ~/.zshrc or ~/.bashrc
    export VIDGO_API_KEY="your-vidgo-api-key"
    Windows
    # PowerShell (applies to new terminals)
    setx VIDGO_API_KEY "your-vidgo-api-key"

    Claude Code passes your shell environment to the commands it runs. To keep the key per project instead, put it in .claude/settings.local.json (local settings; make sure the file is in .gitignore):

    .claude/settings.local.json
    {
      "env": {
        "VIDGO_API_KEY": "your-vidgo-api-key"
      }
    }
  4. 04 · Try these prompts

    • Use Vidgo to generate a 5-second Kling 4.0 text-to-video of a paper boat on a rainy neon street, 16:9, and poll until it finishes. Save the MP4 to ./output.
    • Search the Vidgo docs for an image editing model that takes a reference image, then write a TypeScript function that submits the edit and returns the result URL.
    • Add a webhook route to this app that receives Vidgo callback_url requests and stores the file URLs of finished tasks.
    • Compare the Vidgo image-to-video models that support 1080p and recommend one for 10-second product clips. Cite the docs pages.
    • Write a script that reads prompts.txt, submits each line to a Vidgo text-to-image model, waits for every task and downloads the images.
    • Check my Vidgo credit balance, then estimate what the batch above will cost before running it.

Codex

OpenAI's coding agent for the terminal, IDE extension and app.

  1. 01 · Add the docs MCP server

    ~/.codex/config.toml
    [mcp_servers.vidgo]
    url = "https://docs.vidgo.ai/mcp"
    Or from the terminal
    codex mcp add vidgo --url https://docs.vidgo.ai/mcp

    Codex connects to Streamable HTTP servers directly with url, so mcp-remote is not needed.

  2. 02 · Check the connection

    Run this, or type /mcp inside Codex.

    codex mcp list
  3. 03 · Set your API key

    Create a key on the API key page, then export it in the shell that starts your agent:

    macOS / Linux
    # ~/.zshrc or ~/.bashrc
    export VIDGO_API_KEY="your-vidgo-api-key"
    Windows
    # PowerShell (applies to new terminals)
    setx VIDGO_API_KEY "your-vidgo-api-key"

    Codex passes VIDGO_API_KEY to the commands it runs. If you set shell_environment_policy.ignore_default_excludes = false, Codex drops variables whose names contain KEY, so add VIDGO_API_KEY back with shell_environment_policy.set or turn that option off.

  4. 04 · Try these prompts

    • Use Vidgo to generate a 5-second Kling 4.0 text-to-video of a paper boat on a rainy neon street, 16:9, and poll until it finishes. Save the MP4 to ./output.
    • Search the Vidgo docs for an image editing model that takes a reference image, then write a TypeScript function that submits the edit and returns the result URL.
    • Add a webhook route to this app that receives Vidgo callback_url requests and stores the file URLs of finished tasks.
    • Compare the Vidgo image-to-video models that support 1080p and recommend one for 10-second product clips. Cite the docs pages.
    • Write a script that reads prompts.txt, submits each line to a Vidgo text-to-image model, waits for every task and downloads the images.
    • Check my Vidgo credit balance, then estimate what the batch above will cost before running it.

Cursor

The AI code editor. Agent mode uses MCP tools automatically.

  1. 01 · Add the docs MCP server

    .cursor/mcp.json
    {
      "mcpServers": {
        "vidgo": {
          "url": "https://docs.vidgo.ai/mcp"
        }
      }
    }

    Use .cursor/mcp.json in the project, or ~/.cursor/mcp.json to enable it in every project.

  2. 02 · Check the connection

    Open Cursor Settings, find the MCP section and check that vidgo is enabled and lists its tools.

  3. 03 · Set your API key

    Create a key on the API key page, then export it in the shell that starts your agent:

    macOS / Linux
    # ~/.zshrc or ~/.bashrc
    export VIDGO_API_KEY="your-vidgo-api-key"
    Windows
    # PowerShell (applies to new terminals)
    setx VIDGO_API_KEY "your-vidgo-api-key"

    Set the variable in your shell profile or system environment, then restart Cursor so the agent's terminal can read it.

  4. 04 · Try these prompts

    • Use Vidgo to generate a 5-second Kling 4.0 text-to-video of a paper boat on a rainy neon street, 16:9, and poll until it finishes. Save the MP4 to ./output.
    • Search the Vidgo docs for an image editing model that takes a reference image, then write a TypeScript function that submits the edit and returns the result URL.
    • Add a webhook route to this app that receives Vidgo callback_url requests and stores the file URLs of finished tasks.
    • Compare the Vidgo image-to-video models that support 1080p and recommend one for 10-second product clips. Cite the docs pages.
    • Write a script that reads prompts.txt, submits each line to a Vidgo text-to-image model, waits for every task and downloads the images.
    • Check my Vidgo credit balance, then estimate what the batch above will cost before running it.

OpenCode

Open-source coding agent for the terminal, desktop and IDE.

  1. 01 · Add the docs MCP server

    opencode.json
    {
      "$schema": "https://opencode.ai/config.json",
      "mcp": {
        "servers": {
          "vidgo": {
            "type": "remote",
            "url": "https://docs.vidgo.ai/mcp"
          }
        }
      }
    }
    Or from the terminal (add --global for every project)
    opencode mcp add vidgo --url https://docs.vidgo.ai/mcp

    Put opencode.json in the project root. The vidgo server needs no sign-in, so OpenCode connects without OAuth.

  2. 02 · Check the connection

    Run this, or type /mcps inside OpenCode.

    opencode mcp list
  3. 03 · Set your API key

    Create a key on the API key page, then export it in the shell that starts your agent:

    macOS / Linux
    # ~/.zshrc or ~/.bashrc
    export VIDGO_API_KEY="your-vidgo-api-key"
    Windows
    # PowerShell (applies to new terminals)
    setx VIDGO_API_KEY "your-vidgo-api-key"

    OpenCode passes your shell environment to the commands it runs. Export the key before starting opencode.

  4. 04 · Try these prompts

    • Use Vidgo to generate a 5-second Kling 4.0 text-to-video of a paper boat on a rainy neon street, 16:9, and poll until it finishes. Save the MP4 to ./output.
    • Search the Vidgo docs for an image editing model that takes a reference image, then write a TypeScript function that submits the edit and returns the result URL.
    • Add a webhook route to this app that receives Vidgo callback_url requests and stores the file URLs of finished tasks.
    • Compare the Vidgo image-to-video models that support 1080p and recommend one for 10-second product clips. Cite the docs pages.
    • Write a script that reads prompts.txt, submits each line to a Vidgo text-to-image model, waits for every task and downloads the images.
    • Check my Vidgo credit balance, then estimate what the batch above will cost before running it.

Docs MCP tools

The server at docs.vidgo.ai/mcp uses Streamable HTTP and needs no authentication. It exposes these tools:

ToolWhat it does
search_vidgo_apiSearches the docs and returns matching pages, model IDs and code examples.
query_docs_filesystem_vidgo_apiRuns read-only commands such as rg, tree and head over the docs pages and OpenAPI specs.
submit_feedbackReports a wrong or outdated docs page to the Vidgo docs team.

Docs for agents

The API your agent will call

Every generation model uses one asynchronous flow: submit a task with a vendor/model/mode ID, then poll its status or pass a callback_url. Files in the result expire after 24 hours.

Submit
curl https://api.vidgo.ai/api/generate/submit \
  -H "Authorization: Bearer $VIDGO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kwaivgi/kling-v4.0/text-to-video",
    "input": {
      "prompt": "A paper boat drifting down a rainy neon street, slow dolly shot",
      "duration": 5,
      "aspect_ratio": "16:9"
    }
  }'
Poll status
curl https://api.vidgo.ai/api/generate/status/TASK_ID \
  -H "Authorization: Bearer $VIDGO_API_KEY"