Skip to main content

Tutorial: Use the Compute API from Claude (MCP)

2 minTutorials

The developer path. This wires the network into Claude (Claude Code or Claude Desktop) as a tool, so an agent can offload bulk parallel sub-tasks to the network. The connector is parallelix-mcp, published on npm. Source: github.com/parallelixnetwork/parallelix-mcp.

  1. Create an API key. Open ai.parallelix.io/developers, connect your wallet, and sign in (a signature, no gas). Deposit $PRLX as credits if you have not already, then choose Create key. The raw key (pk_live_...) is shown once. Copy it.

  2. Add the connector to Claude. In Claude Code:

    CODELINES 3
    claude mcp add parallelix \
      --env PARALLELIX_API_KEY=pk_live_your_key \
      -- npx -y parallelix-mcp
    

    In Claude Desktop, add it to claude_desktop_config.json:

    CODELINES 9
    {
      "mcpServers": {
        "parallelix": {
          "command": "npx",
          "args": ["-y", "parallelix-mcp"],
          "env": { "PARALLELIX_API_KEY": "pk_live_your_key" }
        }
      }
    }
    
  3. Check the network. Ask Claude to call network_status. It lists the models the network is serving right now. Call usage to see your request count, credits spent, and remaining balance.

  4. Run a parallel job. Give Claude a list and one instruction, for example "classify the sentiment of each of these 200 reviews." It calls parallel_map, which fans the items across the online nodes at once and returns one result per item, each with a Proof-of-Execution hash. This is the path a single call cannot take: the work runs in parallel across the pool, not one item at a time.

  5. Or call the API directly. The same key works without Claude. Any OpenAI-compatible client points at https://api.parallelix.io/v1 by changing its base URL, or submit a batch yourself:

    CODELINES 5
    curl https://api.parallelix.io/v1/batch \
      -H "Authorization: Bearer pk_live_your_key" \
      -H "content-type: application/json" \
      -d '{"prompts":["summarize A","summarize B","summarize C"]}'
    # poll GET /v1/batch/{batchId} for per-item results + PoE
    

Every paid call is metered off-chain against your credit balance, and 85% settles on-chain to the operators whose nodes served it. The network runs open-source models (currently 7B-class): a cheap parallel executor for bulk independent sub-tasks, not a frontier model.