Skip to main content
Natural has official SDKs for building agents, in Python and TypeScript.

Available tools

Python SDK

pip install naturalpay: Build agents in Python

TypeScript SDK

npm install @naturalpay/sdk: Build agents in TypeScript/JavaScript

Installation

Quick start

Agent authentication

Both SDKs accept either credential type in NATURAL_API_KEY (see Authentication):
  • Agent key (ak_ntl_…): Bound to one agent. Requests resolve as that agent automatically, so do not pass an agent ID (a conflicting one is rejected). An instance ID is required for money movement (payments and payment cancellation, Direct, transfers, deposits, withdrawals, and payment-request fulfillment) so each agent run is auditable. In Python, pass instance_id to the client constructor and build a client per run. In TypeScript, set it on the constructor or per call.
  • API key (sk_ntl_…): Party-scoped. Calls act as your party and cannot act as an agent (see Authentication).

With an agent key

Available resources

Both SDKs provide these resources. Python names them in snake_case (payment_requests), TypeScript in camelCase (paymentRequests):

Test in the sandbox

Both SDKs run against the sandbox unchanged: use a sandbox key and the sandbox base URL. The sandbox-only simulations resource drives the counterparty side of every flow.
See Sandbox from MCP, CLI, and SDKs for the full simulation surface.
  • MCP: Connect Claude, Cursor, and other AI hosts to Natural
  • CLI: For terminal and CI use
  • Dashboard: Onboarding and managing your account
  • REST API: Direct HTTP access to the Natural API