POST/api/orgs/{org_id}/provider-connections/reorder

Reorder provider accounts

Assigns priority = index to every account of the org in one atomic write (lower is tried first). The order must list every current account exactly once across all providers: a missing account or a duplicate is 400, an unknown one 404, and nothing is written. Never needs Pro.

認証: AuthorizationヘッダーにBearer形式のAPIキー

パスパラメータ

  • org_idstring必須

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

リクエストボディ

  • orderarray<object>必須

    Every account of the org, in the desired order.

    order
    • providerenum必須

      A provider an organization can connect its own key for. kenari, kiosapi, tokenharbor, groq and nvidia_nim are free-tier providers open to every plan.

      "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_aliasstring必須

レスポンス

  • 200

    The routing state of every account in the new order.

    レスポンス
    • accountsarray<object>必須
      accounts
      • providerstring必須
      • setup_aliasstring必須
      • priorityinteger必須
      • exhaustion_fallbackboolean必須
      • ratelimit_failoverboolean必須
      • failover_only_onarray | null必須
  • 400

    An account is missing from the order, appears twice, or names an unknown provider.

    レスポンス
    • errorstring必須

      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.

    レスポンス
    • errorstring必須

      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).

    レスポンス
    • errorstring必須

      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.

    レスポンス
    • errorstring必須

      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

    The body or query failed validation.

    レスポンス
    • detailarray<object>必須
      detail
      • typestring
      • locarray<string | integer>
      • msgstring

リクエスト

curl -X POST https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/provider-connections/reorder \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "order": [
    {
      "provider": "anthropic",
      "setup_alias": "anthropic"
    },
    {
      "provider": "openai",
      "setup_alias": "openai-main"
    },
    {
      "provider": "bedrock",
      "setup_alias": "bedrock-eu"
    }
  ]
}'

レスポンス

{
  "accounts": [
    {
      "provider": "anthropic",
      "setup_alias": "anthropic",
      "priority": 0,
      "exhaustion_fallback": true,
      "ratelimit_failover": true,
      "failover_only_on": null
    },
    {
      "provider": "openai",
      "setup_alias": "openai-main",
      "priority": 1,
      "exhaustion_fallback": true,
      "ratelimit_failover": true,
      "failover_only_on": null
    },
    {
      "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/reorder