Providers API (TypeScript)

Methods, examples, and parameters for client.providers.

Module Overview

Inspect provider health, regions, and routing configuration for each backend.

Available Methods

  • client.providers.list() - List providers and their states.
  • client.providers.retrieve() - Read one provider by ID.
  • client.providers.health() - Check provider health probes.

Examples

TypeScript
import { TheRouter.ai } from "@therouter/sdk";

const client = new TheRouter.ai({ apiKey: process.env.THEROUTER_API_KEY! });

const providers = await client.providers.list();
const health = await client.providers.health();

console.log(providers.data.length, health.summary);
providers-response.json
{
  "id": "req_01HXYZ123",
  "module": "providers",
  "status": "ok"
}

Parameter Types

NameTypeRequiredDescription
provider_id
stringProvider identifier.
region
stringRegion filter such as us-east-2.
status
stringhealth status filter.
SDK parity
Method signatures are aligned across SDKs so migration between TypeScript and Python stays predictable.