DELETE/api/orgs/{org_id}/provider-connections/{provider}

Disconnect a provider account

Removes exactly the account named by setup_alias, including its stored credentials. The handle is required so a default account is never removed by accident. Never needs Pro; disconnecting the last paid connection of a Free org ends its grandfathered BYOK access. The owner of an account-scoped plan may disconnect it; otherwise an org admin or the org's own key.

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"

Query parameters

  • setup_aliasstringrequired

    The exact account handle to remove.

Responses

  • 200

    The account was removed.

    Response
    • removedbooleanrequired
    • providerenumrequired

      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_aliasstringrequired
  • 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

    No such account in this 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

    The body or query failed validation.

    Response
    • detailarray<object>required
      detail
      • typestring
      • locarray<string | integer>
      • msgstring

Request

curl -X DELETE https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/provider-connections/openai?setup_alias=openai-main \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "removed": true,
  "provider": "openai",
  "setup_alias": "openai-main"
}

https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/provider-connections/openai?setup_alias=openai-main