Documentation

API
REFERENCE.

Base URL: https://www.amillipay.com

installauthcreditsservicespay
Quick start
InstallationAuthenticationCredits
Services
Web SearchSummarizationCompany Research
API Reference
AgentsPayTransactionsDepositErrors
Installation

QUICK START

# install the SDK
npm install @amillipay/sdk
// initialize
import AmilliPay from '@amillipay/sdk'
const pay = new AmilliPay(process.env.AMILLIPAY_API_KEY)
 
const agent = await pay.agents.create({ name: 'My Bot' })
await pay.deposit({ agent_id: agent.id, amount_usd: 10 })
Authentication

API KEYS

Include your API key in every request header:

Authorization: Bearer amp_your_api_key
Credits

THE MATH

1 credit$0.001 USD
$10 deposit9,500 credits (after 5% fee)
$100 deposit95,000 credits
Min transaction1 credit
Transaction fee1%
Min deposit$10
Marketplace

SERVICES

Call any service directly. Your agent pays credits, gets results instantly.

POST/api/services/summarize
Summarize any text in plain English. Handles up to 10,000 words.
50 cr
$0.050 per call
Parameters
from_agent_idstringrequiredYour agent ID
textstringrequiredText to summarize
stylestringoptionalSummary style e.g. "bullet points"
Request
{
  "from_agent_id": "agt_your_agent",
  "text": "Long text...",
  "style": "executive summary"
}
Response
{
  "success": true,
  "credits_charged": 50,
  "result": {
    "summary": "Plain English summary",
    "key_points": ["point1", "point2"]
  }
}
POST/api/services/research
Get detailed company intelligence — overview, funding, news, competitors.
250 cr
$0.250 per call
Parameters
from_agent_idstringrequiredYour agent ID
companystringrequiredCompany name to research
Request
{
  "from_agent_id": "agt_your_agent",
  "company": "Anthropic"
}
Response
{
  "success": true,
  "credits_charged": 250,
  "result": {
    "company": "Anthropic",
    "overview": "...",
    "industry": "AI",
    "competitors": ["OpenAI", "Google"]
  }
}
Payment API

ENDPOINTS

Core endpoints for managing agent wallets and payments.

POST/v1/agents

Create a new agent wallet

Request
{
  "name": "My Research Bot"
}
Response
{
  "id": "agt_abc123",
  "balance": 0
}
GET/v1/agents/:id

Get agent balance and info

Response
{
  "id": "agt_abc123",
  "balance": 49990,
  "balance_usd": "49.990"
}
POST/v1/pay

Send payment between agents

Request
{
  "from": "agt_abc123",
  "to": "agt_service",
  "amount": 10,
  "memo": "Web search"
}
Response
{
  "id": "txn_xyz789",
  "amount": 10,
  "fee": 1,
  "status": "completed"
}
GET/v1/transactions

List transactions for your agents

Response
{
  "transactions": [...],
  "total": 42
}
POST/v1/deposit

Get Stripe checkout URL to fund an agent

Request
{
  "agent_id": "agt_abc123",
  "amount_usd": 50
}
Response
{
  "checkout_url": "https://checkout.stripe.com/...",
  "credits": 47500
}
Errors

ERROR CODES

401unauthorizedInvalid or missing API key
402insufficient_creditsAgent does not have enough credits
404agent_not_foundAgent ID does not exist or belongs to another account
422invalid_requestMissing required parameters
429rate_limitedToo many requests
500internal_errorSomething went wrong on our end