PUT/api/orgs/{org_id}/provider/credential

Store or rotate the provider house key

Hands the platform the key it should hold and serve your endpoint with. Write-only: the secret goes to a vault and is never returned, only its last four characters appear on the provider view. A provider on auth_mode: none switches to house_key in the same call; one already on house_key rotates. Org admin session or the org's own key; 422 for a native provider, whose credential is not a stored key.

Authentication: Bearer API key in the Authorization header

Path parameters

  • org_idstringrequired

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

Request body

  • secretstringrequired

    The key your endpoint issues for the platform. Never returned.

Responses

  • 200

    The updated provider row.

    Response
    • slugstringrequired
    • display_namestringrequired
    • familyenumrequired
      "native""openai_compatible"
    • base_urlstring | nullrequired

      The OpenAI-compatible base URL the gateway calls.

    • auth_modeenumrequired

      house_key: the platform holds your key. none: no stored key. native: a built-in integration whose credential the platform manages.

      "house_key""none""native"
    • statusenumrequired

      Provider lifecycle.

      "onboarding""canary""live""offboarded"
    • max_concurrencyinteger | nullrequired
    • advertised_tpsnumber | nullrequired
    • data_policyobjectrequired

      Self-declared prompt-data handling. retention_days is required when retains_prompts is true and must be omitted otherwise; zero_data_retention requires retains_prompts and trains_on_data both false.

      data_policy
      • retains_promptsbooleanrequired
      • retention_daysinteger | null

        Days prompts are kept.

      • trains_on_databooleanrequired
      • zero_data_retentionbooleanrequired
      • policy_urlstring | null

        Public https URL of the policy.

    • contactobjectrequired
      contact
      • emailstringrequired

        Where the platform reaches you when a lane misbehaves.

      • escalationstring | null

        Free-form escalation instructions (pager, shared channel, phone).

      • status_pagestring | null

        Public https status page.

    • logo_urlstring | nullrequired
    • credential_last4string | nullrequired

      Last four characters of the stored house key. The key itself is never returned.

    • has_credentialbooleanrequired
    • stripe_account_idstring | nullrequired

      Linked Stripe Connect account.

    • payouts_enabledbooleanrequired

      Whether Stripe reports the linked account payout-ready.

  • 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

    The body failed validation (secret shorter than 12 or longer than 4096 characters), or the provider is native.

Request

curl -X PUT https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/provider/credential \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "secret": "sk-acme-live-3b9e0c7d1f2a4e6b8c5d9f3a"
}'

Response

{
  "slug": "acme-inference",
  "display_name": "Acme Inference",
  "family": "openai_compatible",
  "base_url": "https://api.acme-inference.example/v1",
  "auth_mode": "house_key",
  "status": "canary",
  "max_concurrency": 256,
  "advertised_tps": 80,
  "data_policy": {
    "retains_prompts": false,
    "retention_days": null,
    "trains_on_data": false,
    "zero_data_retention": true,
    "policy_url": null
  },
  "contact": {
    "email": "oncall@acme-inference.example",
    "escalation": null,
    "status_page": null
  },
  "logo_url": null,
  "credential_last4": "9f3a",
  "has_credential": true,
  "stripe_account_id": null,
  "payouts_enabled": false
}

https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/provider/credential