Skip to content
ViceVox
MenuClose

AI Agents CLI

If your agent has a shell, it can post

Goose, OpenCode, Cline, Amp and plain shell scripts all run commands. One curl call to the ViceVox API posts, replies or reads, and the JSON answer says what happened.

Base URL
https://api.vicevox.com
Auth
Authorization: Bearer btk1_...
One route
POST /v1/accounts/{id}/actions
Safe retries
Idempotency-Key
AI Agents CLI, sample run. A terminal. A curl command posts to the ViceVox API with a JSON body. The answer says succeeded, with the post's Mastodon link, and the command exits with 0.

What an agent with a shell can do in your social accounts

ViceVox has no CLI to install. The REST API is the command line: POST /v1/accounts/{id}/actions with a type runs any action, and wait returns the finished action in the same answer, for up to 120 seconds.

The answer is JSON. status is succeeded, failed or needs_input, result holds the link or the posts read, and error.code names what went wrong. With curl --fail-with-body, an HTTP error also ends with a non-zero exit code.

An Idempotency-Key header makes a retry safe: the same key on the same account answers with the first action instead of posting twice, and says so in Idempotent-Replayed: true.

It works on Mastodon, X, LinkedIn, Bluesky and Telegram, and on every other platform ViceVox connects. Each action is one tool, named as in the actions reference.

Jobs for an agent with a shell

Say it in plain words. These are prompts that work, and the calls they make.

  1. Post from a deploy script

    The last step of a deploy posts the version note and fails the job if the post failed.

    curl -fsS --fail-with-body https://api.vicevox.com/v1/accounts/$ACCOUNT_ID/actions \
      -H "Authorization: Bearer $VICEVOX_API_KEY" -H "Idempotency-Key: deploy-$GIT_SHA" \
      -d '{"type": "post", "text": "Version 2.4 is live.", "wait": 60}' | jq -e '.status == "succeeded"'

    1 × post

  2. Read the notifications into a file

    A cron line keeps a day's notifications as JSON lines for the agent to read later.

    curl -fsS https://api.vicevox.com/v1/accounts/$ACCOUNT_ID/actions -H "Authorization: Bearer $VICEVOX_API_KEY" \
      -d '{"type": "read_notifications", "limit": 50, "wait": 60}' | jq -c '.result' >> notifications.jsonl

    1 × read_notifications

  3. The same post from many accounts

    The workspace route runs one action on 1 to 100 accounts, all or nothing.

    curl -fsS https://api.vicevox.com/v1/workspaces/$WORKSPACE_ID/actions -H "Authorization: Bearer $VICEVOX_API_KEY" \
      -d '{"type": "post", "account_ids": ["0199...", "0199...", "0199...", "0199..."], "text": "We are live.", "wait": 60}'

    4 × post

Set up an agent with a shell

Make a key, find the account ids, run an action. Every call below works the same from a script or from an agent's shell.

  1. Make a key

    Under Developers in the app, make a key with only the permissions the script needs, and keep it in an environment variable, out of version control.

    Shell
    export VICEVOX_API_KEY="btk1_..."
    export WORKSPACE_ID="0199..."
  2. Find the account ids

    List the accounts of the workspace. Each has an id, a platform and a status.

    GET /v1/workspaces/{id}/accounts
    curl https://api.vicevox.com/v1/workspaces/$WORKSPACE_ID/accounts \
      -H "Authorization: Bearer $VICEVOX_API_KEY"
  3. Run an action

    Send the type and its parameters, and wait for the result.

    POST /v1/accounts/{id}/actions
    curl https://api.vicevox.com/v1/accounts/$ACCOUNT_ID/actions \
      -H "Authorization: Bearer $VICEVOX_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"type": "post", "text": "Version 2.4 is out.", "wait": 60}'
  4. Tell your agent

    Put a short rule in the agent's instructions file, such as AGENTS.md.

    AGENTS.md
    To act in a social account, run:
    curl -fsS --fail-with-body https://api.vicevox.com/v1/accounts/<id>/actions -H "Authorization: Bearer $VICEVOX_API_KEY" -d '{"type": "<action>", ..., "wait": 60}'
    Show me the text before any post, reply or message.

Ways to connect an agent with a shell

The routes that reach ViceVox from an agent with a shell, and how well each one fits.

REST APIBest fit

One call, one JSON answer, one exit code. There is no session to keep and no protocol to speak.

Remote MCP, OAuth sign-inWorks

Most agents with a shell also take MCP servers: Goose in ~/.config/goose/config.yaml under extensions with type: streamable_http, OpenCode in opencode.json under mcp with type: remote, Cline in cline_mcp_settings.json with type: streamableHttp, Amp under amp.mcpServers, and Devin Desktop in mcp_config.json.

Local stdio bridgeWorks

For a client that starts only local servers, npx -y mcp-remote https://mcp.vicevox.com/mcp forwards stdio to the remote server.

What it costs

ViceVox plans start at USD 29 a month, with a 7-day trial.

Every plan has every platform and action, the API and the MCP server. Each action uses some of the plan's monthly usage, and a planned post uses it when it goes out. Team at USD 49 has 2x the usage of Standard, Pro at USD 99 has 4x and Ultimate at USD 499 has 20x.

Your agent's model use is billed by its own vendor, not by ViceVox. The plans and their limits are on the pricing page.

Approvals and safety

A person can approve before anything goes out, and every action is recorded.

A script has no one to ask, so give its key only what the job needs. A key with inbox_read reads; a key with content_write and no content_publish plans drafts that a reviewer approves in ViceVox.

Agents that run commands ask before a shell command by default, until you allow it. Keep curl calls that post on ask.

  • Ask for drafts when a person must check first. create_content puts the post on the calendar, submit_for_review sends it to a reviewer, and it goes out only after the approval.
  • Give the agent an API key without the content_publish permission. It can then plan drafts and send them for review, and it cannot post by itself.
  • ViceVox records every action: who asked, through which key, on which account and what the page returned.
  • A sign-in step that ViceVox cannot finish, such as a 2FA code, becomes a challenge. The agent asks you for the code, or gives you a link to a live browser where you answer it.
  • Only an owner or an administrator can allow an OAuth client. Disconnect it under Developers in the app, and its token stops working.

More in Approvals and Reports and audit.

Limits

  • Aider has no MCP, and with --yes-always it declines the shell commands it suggests. In Aider, run the curl yourself with /run.
  • wait is 0 to 120 seconds. A longer action answers 202 with its id; GET /v1/actions/{id}?wait=30 follows it.
  • An action tool waits up to 120 seconds for its result. A longer action comes back with its id, and get_action follows it to the end.
  • The MCP server runs up to 8 requests at a time for one key or sign-in. Above that it answers 429 with Retry-After, and the client tries again.
  • The plan sets how many accounts the organization can connect, from 5 on Standard to 300 on Ultimate.
  • The platforms set their own pace. When one asks an account to slow down, the action ends with rate_limited, and the usage it took is given back.

Troubleshooting

Every error code and its fix is in Errors and challenges.

curl exits with 22
The API answered with an error status. With --fail-with-body the problem JSON is printed: its code names the cause.
The answer is 202 with status: running
The action took longer than wait. Poll GET /v1/actions/{id}?wait=30 until it leaves running.
A retry posted twice
Send the same Idempotency-Key on every try of one post. A new key is a new action.
The client says the server refused the token (401)
The sign-in expired or was revoked, or the API key is wrong. Sign in again from the client, or make a new key under Developers.
An action stops at needs_input
The platform asked for a code. Give the code to the agent so it calls answer_challenge, or open the challenge's sign_in_url and answer in the live browser.
The answer is usage_limit
The plan's usage for this billing period is used up, and nothing was queued. It starts again at resets_at. A larger plan has more usage, and upgrade is the link to change the plan.
The answer is subscription_required
The organization never subscribed, or its subscription ended. Its accounts and data stay. Choose a plan at the upgrade link, then ask again.
The answer is key_usage_limit
The API key's dailyUsagePercent is used up for today. It starts again at 00:00 UTC.
The answer is unsupported
The platform has no such action. The error lists the actions it has, and the generic browser action can do the rest step by step.
An account shows signed_out
Its session ended and no stored password could sign it in again. Ask the agent for a sign-in link with get_sign_in_link and open it, or reconnect the account in the app.

AI Agents CLI questions

Is there a ViceVox CLI to install?
No. The REST API is small enough to call with curl: one route runs every action, and the answer is JSON with a status and an error code.
Which agents can use this route?
Any agent that runs shell commands, such as Goose, OpenCode, Cline, Amp, Claude Code, Codex or Cursor, and any script or CI job.
How do I avoid double posts on a retry?
Send an Idempotency-Key header. The same key on the same account answers with the first action instead of running a second one.
What does a post from a script cost?
ViceVox plans start at USD 29 a month, with a 7-day trial. A post from a script uses some of the plan's monthly usage, the same as from any agent.

Give an agent with a shell your social accounts.

Add an account with a password, cookies or a sign-in link, then connect the MCP server and ask.