Docs

AutoTube Agent API + MCP

Quickstart

Use a human session to mint an agent key, then call the dedicated `/v1/agent` surface with scoped machine credentials.

curl -X POST https://api-production-d8ea.up.railway.app/v1/agent/projects \
  -H "Authorization: Bearer atk_live_your_agent_key" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: proj-001" \
  -d '{
    "channelId": "ch_123",
    "topic": "The state of autonomous content operations",
    "publishToLinkedChannel": true
  }'

Base URLs

Agent API

https://api-production-d8ea.up.railway.app/v1/agent

Hosted MCP

https://api-production-d8ea.up.railway.app/v1/agent/mcp

Discovery

https://api-production-d8ea.up.railway.app/v1/agent/capabilities

Authentication

All machine requests use a dedicated agent key, not a human JWT and not the older general API token.

This launch ships as a public beta surface.

Authorization: Bearer atk_live_...

Scopes

agent:channels:readagent:channels:writeagent:projects:readagent:projects:writeagent:publish

x402 Flow

Paid agent writes are x402-priced and enforced in beta `required` mode. Priced mutations return a protocol-level `402 Payment Required` response until the agent settles the request.

HTTP/1.1 402 Payment Required
Content-Type: application/json

{
  "x402Version": 2,
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x...",
      "amount": "..."
    }
  ]
}

Pricing

projects.create$3.50

Starts a new production run

projects.resume$1.50

Restarts a failed or paused run

projects.publish$0.50

Queues publish for a completed project on a linked channel

Hosted MCP

Remote-capable clients can connect straight to the hosted MCP endpoint and reuse the same agent key headers.

{
  "mcpServers": {
    "autotube": {
      "url": "https://api-production-d8ea.up.railway.app/v1/agent/mcp",
      "headers": {
        "Authorization": "Bearer atk_live_your_agent_key"
      }
    }
  }
}

Local Stdio Bridge

The `@autotube/agent-mcp` package mirrors the same tools over stdio and can auto-pay x402 if you provide a Base-compatible private key.

AUTOTUBE_AGENT_API_URL=https://api-production-d8ea.up.railway.app/v1/agent
AUTOTUBE_AGENT_KEY=atk_live_your_agent_key
AUTOTUBE_X402_PRIVATE_KEY=0xyour_base_wallet_key
pnpm --filter @autotube/agent-mcp build
node packages/agent-mcp/dist/cli.js

Operational Constraints

  • Publishing only works for channels that have already been linked to YouTube through an interactive human flow.
  • Machine access is intentionally limited to channels, projects, outputs, and publish orchestration.
  • Billing mutations, SSO, org admin, worker-pool admin, promo admin, and secret management are not exposed to agent keys.
  • Paid mutating calls should send an `Idempotency-Key` header so retries do not duplicate work.
  • The hosted MCP endpoint and the stdio bridge both use the same `/v1/agent` contract.