Skip to main content

TypeScript Integration

An official TypeScript SDK is on the roadmap. For now, use the REST API directly with fetch(). The examples below show you how.
Which endpoint? ASG exposes two protocols:
  • REST (/v1/mcp/tools/call) — recommended for quickstart and most integrations. See Python SDK for REST examples.
  • JSON-RPC (/mcp) — for MCP-native agent frameworks. The examples on this page use JSON-RPC since TypeScript is the primary MCP SDK language.
Both require the same Authorization: Bearer <api_key> header.

Quick Start

List Available Tools

Inference Example

Error Handling

Payment Proof Format

The X-Payment header contains a base64url-encoded JSON object:

Next Steps

Examples

More working examples

API Reference

Complete API documentation