AiCredentialFailedPayload ai.credential.failed@1

Generated at from openvibe-contracts v0.419.0 and openvibe-sdk v0.161.0.

Version
1.0.0
Owner
ai
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/events/payloads/ai.credential.failed.v1.json

ai.credential.failed v1 (OpenVibe.AI; L36 Y8): a provider refused one of a person's own keys with 401 or 403 during a run. The key's status becomes failing and this event tells the products that may show it. `error` is a redacted line that never carries the key. Envelope: on_behalf_of the person, subject { type: credential, id: <subject>:<provider> }, visibility internal, priority important, actor service:ai.

Fields

FieldTypeRequiredDescriptionConstraints
subjectstringyes
  • pattern ^usr_[0-9A-HJKMNP-TV-Z]{26}$
providerenumyes
  • one of "anthropic", "openai", "gemini", "deepseek", "mistral", "xai", "groq", "cerebras", "together", "fireworks", "openrouter", "minimax", "custom"
statusconstyes
  • = "failing"
checked_atstringyes
  • format date-time
errorstringyesThe redacted reason. Never the key.
  • minLength 1
  • maxLength 500

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: refused
{
  "subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "provider": "anthropic",
  "status": "failing",
  "checked_at": "2026-10-31T09:00:00.000Z",
  "error": "the provider refused the key (401)"
}
Rejected: leaks-key
{
  "subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "provider": "anthropic",
  "status": "failing",
  "checked_at": "2026-10-31T09:00:00.000Z",
  "error": "401 for sk-ant-EXAMPLE",
  "key": "sk-ant-EXAMPLE"
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('ai.credential.failed@1', value);   // { valid, errors: [{ path, message }] }