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
curl -X PATCH https://api.platic.ai/v1/ai-providers/openai \
-H "Authorization: Bearer $PLATIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "fallback": "none" }' await platic.aiProviders.update("openai", { fallback: "none" }); Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
provider | string | openai, google, anthropic, or xai | ✓ |
Request body
| Field | Type | Description | Required |
|---|---|---|---|
fallback | string | platform: 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
| Status | details.code | When it happens |
|---|---|---|
400 | INVALID_PROVIDER | {provider} is not one of the four |
400 | INVALID_REQUEST | fallback is missing, is neither platform nor none, or the body has another field. details.issues says which |
403 | FORBIDDEN | The person behind the token cannot manage secrets |
404 | PROVIDER_NOT_FOUND | The provider has no key. When you connect it you can send fallback |
Notes
- From an AI agent, the tool is
update_ai_provider.