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
| Name | Type | Required | Description |
|---|---|---|---|
provider_id | string | Provider identifier. | |
region | string | Region filter such as us-east-2. | |
status | string | health status filter. |
SDK parity
Method signatures are aligned across SDKs so migration between TypeScript and Python stays predictable.