List Providers

List providers currently configured and available to your key.

GET/v1/providers

Query Parameters

NameTypeRequiredDescription
include_health
stringSet to "true" to include health and latency snapshot for each provider. When omitted, status is "unknown" and the health field is not returned.
type
stringFilter providers by type. Valid values: "anthropic", "openai", "bedrock", "azure", "vertex-ai". Invalid types return an empty data array.

Request Example

bash
curl https://api.therouter.ai/v1/providers \
  -H "Authorization: Bearer $THEROUTER_API_KEY"

Response

json
{
  "data": [
    {
      "id": "openai-api",
      "name": "OpenAI",
      "type": "openai",
      "status": "unknown",
      "models_count": 12
    },
    {
      "id": "bedrock-us-east-2",
      "name": "AWS Bedrock (us-east-2)",
      "type": "bedrock",
      "status": "unknown",
      "models_count": 8
    }
  ]
}

Response with Health

When include_health=true is passed, each provider includes a health snapshot and a derived status.

bash
curl "https://api.therouter.ai/v1/providers?include_health=true" \
  -H "Authorization: Bearer $THEROUTER_API_KEY"
json
{
  "data": [
    {
      "id": "openai-api",
      "name": "OpenAI",
      "type": "openai",
      "status": "healthy",
      "models_count": 12,
      "health": {
        "latency_p50": 45,
        "latency_p99": 45,
        "error_rate": 0.0,
        "last_checked_at": "2026-02-26T10:00:00.000Z"
      }
    },
    {
      "id": "bedrock-eu-west-1",
      "name": "AWS Bedrock (eu-west-1)",
      "type": "bedrock",
      "status": "unhealthy",
      "models_count": 0,
      "health": {
        "latency_p50": 0,
        "latency_p99": 0,
        "error_rate": 1.0,
        "last_checked_at": "2026-02-26T10:00:00.000Z"
      }
    }
  ]
}

Status Derivation

When include_health=true, each provider's status is derived from its health check results using these thresholds:

NameTypeRequiredDescription
healthy
statusRequiredError rate < 5% AND latency < 500ms.
degraded
statusRequiredError rate < 20% AND latency < 2000ms (but not healthy).
unhealthy
statusRequiredError rate >= 20% OR latency >= 2000ms, or health check failed.
unknown
statusRequiredReturned when include_health is not set.

Response Fields

NameTypeRequiredDescription
id
stringRequiredProvider identifier (e.g., "openai-api", "bedrock-us-east-2").
name
stringRequiredHuman-readable display name (e.g., "AWS Bedrock (us-east-2)").
type
stringRequiredProvider type: "anthropic", "openai", "bedrock", "azure", or "vertex-ai".
status
stringRequiredOne of "healthy", "degraded", "unhealthy", or "unknown". Returns "unknown" when include_health is not set.
models_count
integerRequiredNumber of models routed through this provider as primary.
health
objectHealth snapshot. Only present when include_health=true. Contains latency_p50, latency_p99 (ms), error_rate (0.0-1.0), and last_checked_at (ISO 8601).
Notes
Without include_health=true, the endpoint returns instantly from in-memory data. With health checks enabled, response time depends on provider latency (up to 2s worst case). Provider health can be used to explain routing fallback behavior.