Skip to main content

Overview

Tako supports the Machine Payments Protocol (MPP) — an open standard for machine-to-machine payments via HTTP 402. This allows AI agents to discover and pay for Tako API access automatically, without requiring API keys or account signup.

How It Works

  1. Discovery — Agents find Tako’s available endpoints at https://tako.com/.well-known/mpp.json
  2. 402 Challenge — When an agent calls an MPP endpoint without payment, Tako returns 402 Payment Required with pricing info
  3. Payment — The agent pays via Stripe or Tempo stablecoins
  4. Access — The agent retries with a payment credential and gets the response
Agent frameworks like mppx handle this flow automatically — from the agent’s perspective, it’s a single API call.

Available Endpoints

EndpointMethodPriceDescription
/api/mpp/v1/search/fastPOST$0.037Fast data search
/api/mpp/v1/visualizePOST$0.037Visualize data from a search query
/api/mpp/v1/thinviz/createPOST$0.004Create a ThinViz card from components
Prices are derived from the Pro plan rate ($25/mo for 7,500 credits) with a 10% agent markup.

Payment Methods

  • Stripe — Pay via Stripe PaymentIntent. Agents need a pre-configured Stripe customer with a payment method.
  • Tempo — Pay via Tempo stablecoin on-chain transaction.

Authentication Flow

# 1. Agent calls endpoint with no auth
POST /api/mpp/v1/search/fast

# 2. Tako returns 402 with challenge headers
HTTP/1.1 402 Payment Required
WWW-Authenticate: MPP realm="tako"
MPP-Price: 0.036667 USD
MPP-Payment-Methods: stripe, tempo

# 3. Agent pays and retries with credential
POST /api/mpp/v1/search/fast
Authorization: MPP stripe pi_xxxxx

# 4. Tako verifies payment and returns response
HTTP/1.1 200 OK
Payment-Receipt: <receipt-token>

Request format

MPP endpoints accept the same request body as their non-MPP counterparts. For example, /api/mpp/v1/search/fast accepts the same body as /v1/knowledge_search:
{
  "query": "Tesla stock price",
  "search_effort": "fast",
  "source_indexes": ["tako"]
}

Discovery Manifest

Agents can discover all MPP-enabled endpoints at:
GET https://tako.com/.well-known/mpp.json
Response:
{
  "version": "1.0",
  "provider": "tako",
  "description": "Tako data visualization and research platform",
  "endpoints": [
    {
      "path": "/api/mpp/v1/search/fast",
      "method": "POST",
      "price": {"amount": "0.036667", "currency": "USD"},
      "response_type": "sync",
      "description": "Fast data search"
    }
  ],
  "payment_methods": ["stripe", "tempo"]
}

Idempotency

To handle network failures, include an Idempotency-Key header. If the payment was processed but the response was lost, retrying with the same key returns the cached response instead of charging again.
POST /api/mpp/v1/search/fast
Authorization: MPP stripe pi_xxxxx
Idempotency-Key: my-unique-request-id

Error Codes

StatusMeaning
402Payment required — includes MPP challenge headers
400Malformed credential or unsupported payment method
409Payment credential already used (replay)
401Invalid receipt token (poll endpoints)