Change the fallback

SDK platic.aiProviders.update()

Choose how agents respond when a connected provider key fails. Changing the fallback does not modify or test the key.

Example

await platic.aiProviders.update("openai", { fallback: "none" });

Path parameters

ParameterTypeDescriptionRequired
providerstringopenai, google, anthropic, or xai✓

Request body

FieldTypeDescriptionRequired
fallbackstringplatform: they answer with Platica's account and those messages charge AI, except models that only work with your own key. none: they do not answer with this provider's models✓
{
  "fallback": "none"
}

Response

200 OK with the provider, in the shape of list AI providers.

{
  "status": "success",
  "message": "Fallback updated",
  "data": {
    "provider": "openai",
    "name": "OpenAI",
    "status": "connected",
    "health": "ok",
    "fallback": "none",
    "lastVerifiedAt": "2026-11-13T16:20:00.000Z",
    "lastError": null,
    "secretName": "OpenAI key",
    "models": [
      { "id": "gpt-6.1-sol", "name": "GPT-6.1 Sol", "status": "available", "code": null, "ownKeyOnly": false },
      { "id": "gpt-6.1-terra", "name": "GPT-6.1 Terra", "status": "available", "code": null, "ownKeyOnly": false },
      { "id": "gpt-6-luna", "name": "GPT-6 Luna", "status": "unavailable", "code": "MODEL_OR_DEPLOYMENT_NOT_FOUND", "ownKeyOnly": false }
    ]
  }
}

Errors

Statusdetails.codeWhen it happens
400INVALID_PROVIDER{provider} is not one of the four
400INVALID_REQUESTfallback is missing, is neither platform nor none, or the body has another field. details.issues says which
403FORBIDDENThe person behind the token cannot manage secrets
404PROVIDER_NOT_FOUNDThe provider has no key. When you connect it you can send fallback

Notes