i2v.ai CLI
Check model parameters from your terminal or script media jobs with local files, USD quotes, and structured output. The i2v.ai CLI requires Node.js 20 or later.
curl -fsSLo i2v-cli.mjs https://i2v.ai/cli/i2v-cli.mjs
node i2v-cli.mjs list --type image
node i2v-cli.mjs doc gpt-image-2These catalog commands run without an API key. Add --json to get structured output for scripts.
Set your key in the terminal and open your project directory. Use plan to check the model parameters and account quote before submitting.
Get an API key# Set the key in the shell that starts your agent
export I2V_API_KEY="YOUR_API_KEY"
node i2v-cli.mjs doc gpt-image-2
node i2v-cli.mjs plan gpt-image-2 --input '{"prompt":"A ceramic mug on an oak table"}'
# Use your approved budget and the expectedRevision from plan
BUDGET_USD="YOUR_APPROVED_USD_BUDGET"
REVISION="MODEL_REVISION_FROM_PLAN"
node i2v-cli.mjs run gpt-image-2 --input '{"prompt":"A ceramic mug on an oak table"}' \
--max-cost-usd "$BUDGET_USD" --expected-revision "$REVISION" --no-wait
node i2v-cli.mjs status TASK_ID --wait 120 --out ./mug.pngSet --max-cost-usd to a budget you approve. Read the task ID in the receipt, then use status to save the file. If the task ID is lost, use recover with the original submission key and credential.
curl.exe -fsSLo i2v-cli.mjs https://i2v.ai/cli/i2v-cli.mjs
$env:I2V_API_KEY = "YOUR_API_KEY"
node .\i2v-cli.mjs list --type imageUse the remote URL in an MCP client that supports Streamable HTTP. Choose OAuth where supported, or configure your API key as a Bearer token in the client.
Client setup and connection testhttps://i2v.ai/api/mcpFor a client that launches a local MCP server, download the CLI and configure the command below. Set I2V_API_KEY in its environment. Set I2V_WORKSPACE_DIR to enable uploads and downloads in that project.
node /absolute/path/i2v-cli.mjs mcp{
"mcpServers": {
"i2v": {
"command": "node",
"args": [
"/absolute/path/i2v-cli.mjs",
"mcp"
]
}
}
}Yes. list, doc and price read the public catalog. Quote, balance, upload, generation and task status use your account.
Use status with the task ID. If you only have the original idempotency key, use recover with the same credential.
Yes. @i2v-ai/cli 1.2.1 is published on npm. Run npx --yes @i2v-ai/cli, or install it globally to use the i2v command. Node.js 20 or later is required.
Local stdio can save results inside the configured workspace. A remote MCP connection returns result URLs.
Set a task budget with --max-cost-usd and manage cumulative spending in API Key settings. With OAuth, grant write access only to clients that should submit tasks.