Skip to main content

OpenAI SDK

The OpenAI Node.js SDK works out of the box.

Installation

Basic Usage

Multi-Provider

Streaming


Anthropic SDK

The Anthropic Node.js SDK works natively.

Installation

Basic Usage

Streaming


ARouter SDK

The first-party @arouter/sdk provides additional features like key management and usage tracking.

Installation

Chat Completion

Streaming

Key Management

Use a management key (lr_mgmt_) to create and manage API keys.

Wallet JWT + x402 Payments

AI agents with crypto wallets can authenticate via SIWx and pay for credits via x402. The SDK caches a wallet JWT and uses it as the Bearer token for subsequent requests.

EVM (Base)

Solana

SIWx Only (No Auto-Payment)

See the x402 Payments Guide for the full protocol flow.