POST/api/orgs/{org_id}/provider-connections/{provider}/accounts/{setup_alias}/routing

Set provider account routing

Partial patch: only fields present in the body are written; at least one is required (400). failover_only_on makes the account a fallback for exactly the listed failures (its rungs are never dialled first); it is refused with 422 unless some model Waterfall of the org already places this account below another rung. Takes effect on the next gateway refresh. Never needs Pro.

Authentication: Bearer API key in the Authorization header

Path parameters

  • org_idstringrequired

    Your organization id (uuid). GET /api/whoami returns it.

  • providerenumrequired

    The provider to connect.

    "openai""anthropic""azure_openai""openrouter""gemini""bedrock""fireworks""modal""vertex""zai""qwen""tencent""meta""cerebras""wafer""huawei""mistral""dashscope""xai""deepseek""typesafe""kenari""kiosapi""tokenharbor""groq""nvidia_nim"
  • setup_aliasstringrequired

    The account handle.

Request body

  • priorityinteger | null

    Pool position; lower is tried first.

  • exhaustion_fallbackboolean | null
  • ratelimit_failoverboolean | null
  • failover_only_onarray | null

    Omitted leaves it unchanged; null resets to unrestricted; a non-empty list restricts the account to those failures.

Responses

  • 200

    The account's routing state after the write.

    Response
    • providerstringrequired
    • setup_aliasstringrequired
    • priorityintegerrequired
    • exhaustion_fallbackbooleanrequired
    • ratelimit_failoverbooleanrequired
    • failover_only_onarray | nullrequired
  • 400

    The request is malformed or names an unsupported value.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 401

    Missing, unknown or revoked API key.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 403

    The key is valid but may not perform this action (for example an inference key on a provisioning-key route, or a feature outside your plan).

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 404

    The resource does not exist or belongs to another organization.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 422

    Unknown or empty failover_only_on, an unknown field, or fallback rules on an account no Waterfall places below another rung (an Error body in that last case).

Request

curl -X POST https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/provider-connections/openai/accounts/bedrock-eu/routing \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "priority": 2,
  "failover_only_on": [
    "throttled",
    "provider_quota"
  ]
}'

Response

{
  "provider": "bedrock",
  "setup_alias": "bedrock-eu",
  "priority": 2,
  "exhaustion_fallback": true,
  "ratelimit_failover": true,
  "failover_only_on": [
    "throttled",
    "provider_quota"
  ]
}

https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/provider-connections/openai/accounts/bedrock-eu/routing