AiMeCredentialV1 ai.me-credential@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/ai/me-credential.v1.json

ai.me-credential@1 (OpenVibe.AI; L36 Y1): one of the person's own provider keys as the person reads it from GET /api/v1/me/credentials. It is never the key: `hint` is the last four characters, and `last_error` is a redacted line that never carries the key. `status` is what the last save-time or run-time check found: ok, failing or untested. `models_count` is how many models the provider listed when it was last tested. Own keys are free to their owner: no fee, no cap and no network budget.

Fields

FieldTypeRequiredDescriptionConstraints
providerenumyes
  • one of "anthropic", "openai", "gemini", "deepseek", "mistral", "xai", "groq", "cerebras", "together", "fireworks", "openrouter", "minimax", "custom"
hintstringyesThe key's last four characters, so the person can tell two keys apart. Never more.
  • pattern ^[\s\S]{4}$
base_urlstring | nullyesThe endpoint the person chose, or null for the provider's own (taken from the console presets).
  • maxLength 300
budget_usd_per_daynumber | nullyesThe person's own daily cap on this key; null or 0 means no cap. The network's budgets never apply to their own key.
  • minimum 0
statusenumyes
  • one of "ok", "failing", "untested"
checked_atstring | nullyes
  • format date-time
last_errorstring | nullyesWhy the key last failed, with the key and any other secret redacted. Never the key itself.
  • maxLength 500
models_countintegeryes
  • minimum 0
created_atstringyes
  • format date-time
updated_atstring
  • format date-time

Examples

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

Valid: anthropic
{
  "provider": "anthropic",
  "hint": "a1b2",
  "base_url": null,
  "budget_usd_per_day": 5,
  "status": "ok",
  "checked_at": "2026-10-31T09:00:00.000Z",
  "last_error": null,
  "models_count": 12,
  "created_at": "2026-10-31T08:59:00.000Z",
  "updated_at": "2026-10-31T09:00:00.000Z"
}
Valid: custom-untested
{
  "provider": "custom",
  "hint": "ZZ99",
  "base_url": "https://llm.example.com/v1",
  "budget_usd_per_day": null,
  "status": "untested",
  "checked_at": null,
  "last_error": null,
  "models_count": 0,
  "created_at": "2026-10-31T08:59:00.000Z"
}
Rejected: five-char-hint
{
  "provider": "openai",
  "hint": "…a1b2",
  "base_url": null,
  "budget_usd_per_day": null,
  "status": "ok",
  "checked_at": null,
  "last_error": null,
  "models_count": 1,
  "created_at": "2026-10-31T08:59:00.000Z"
}
Rejected: leaks-key
{
  "provider": "openai",
  "hint": "a1b2",
  "key": "sk-EXAMPLE",
  "base_url": null,
  "budget_usd_per_day": null,
  "status": "ok",
  "checked_at": null,
  "last_error": null,
  "models_count": 1,
  "created_at": "2026-10-31T08:59:00.000Z"
}

Validate

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