Everything your agent needs. Nothing it doesn't.
REST API and SDK covering task creation, worker assignment, payment dispatch, and webhook callbacks. One integration surface. No ambiguity.
$ npm install @paymanai/sdk
import { Payman } from '@paymanai/sdk'; const client = new Payman({ apiKey: process.env.PAYMAN_API_KEY }); const task = await client.tasks.create({ type: 'verification', payload: data, budget: 0.50 });
// Returns: { txId: 'pmn_7x9f2k...', status: 'dispatched', settled: false }
From install to first payment
npm install @paymanai/sdk
const client = new Payman({ apiKey: process.env.PAYMAN_API_KEY, region: 'us-east-1' });
Three steps: install the SDK, authenticate with your API key, dispatch your first task. Each call returns a verifiable transaction ID tied to a real payment event — not a queued promise.
const result = await client.tasks.create({ type: 'label', payload: item, budget: 0.25, currency: 'USD' }); // result.txId is immutable and audit-ready
Every call returns a transaction ID
Each endpoint is scoped to one action. No polymorphic routes. Every response carries a txId bound to a real settlement event — traceable, not deferred.
POST /v1/tasks
POST /v1/payments/dispatch
POST /v1/webhooks
Trigger immediate settlement to a worker. Supports USD, EUR, and select stablecoins. Responds with settled: true on confirmation.
Register a callback URL for task.completed, payment.settled, and task.failed events. Each payload includes the original txId for reconciliation.
Create a task with type, payload, budget, and currency. Returns txId, workerId, and status on dispatch.
Agents handle failure without intervention
Default: 120 req/min per API key. Burst: 20 req/sec. Headers: X-RateLimit-Remaining, X-RateLimit-Reset.
Exponential backoff with jitter on 429 and 503. Idempotency-Key header prevents duplicate task creation on network retry.
SDKs available for Node.js, Python, and Go. Every error code maps to a documented retry strategy — 429 rate-limit, 402 insufficient-balance, 503 worker-unavailable — so your agent recovers autonomously.
