AiCredentialPut ai.credential-put@1

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

An older major, still in the catalog. The current one is ai.credential-put@2.
Version
1.0.0
Owner
ai
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/ai/credential-put.v1.json

ai.credential-put@1 (OpenVibe.AI; roadmap WS-O task 2): a person's own provider key, stored by the service that holds their consent (Live, for a streamer's AI viewers), PUT /api/v1/credentials/{subject} with capability ai.credential.manage. OpenVibe.AI encrypts the key at rest and never returns it; runs that name the credential call that provider with it, never a shared key, and are limited by `budget_usd_per_day`. `base_url` is any https endpoint (OpenAI-compatible or Anthropic); OpenVibe.AI connects only to public addresses. Provider `node` (contracts 0.220.0) is the person's own machine instead: `machine` names it, there is no key or base_url, and a run reaches it only through OpenVibe.Bot (capability bot.machine.ai), only for that person, where they turned on "Let my AI use this computer's models".

Fields

FieldTypeRequiredDescriptionConstraints
providerenumyesopenai = any OpenAI-compatible endpoint. node = the person's own machine: a model on their own model server, through their OpenVibe Link and OpenVibe.Bot (no key, no base_url, no cost).
  • one of "openai", "anthropic", "link"
machinestringprovider link: the person's own machine (openvibe.link/machines) whose OpenVibe Link runs the model (the ai plugin, contracts 0.219.0), or `any` (contracts 0.221.0): whichever of their machines is on, lets their AI use its models and offers the model, the fastest first, the next one when it is busy or away. Never anyone else's machine.
  • pattern ^(dev_[0-9A-HJKMNP-TV-Z]{26}|any)$
base_urlstring
  • pattern ^https://[^\s/?#@]+(/[^\s?#]*)?$
  • maxLength 300
api_keystringRequired the first time, and whenever provider or base_url changes (a key is never sent to a new endpoint without being entered again); otherwise the stored key is kept.
  • minLength 8
  • maxLength 400
modelsobjectModel per Live role; `chat` is the default for the others.
  • no other fields
models.chatstring
  • minLength 1
  • maxLength 120
models.visionstring
  • minLength 1
  • maxLength 120
models.directorstring
  • minLength 1
  • maxLength 120
models.summarystring
  • minLength 1
  • maxLength 120
models.legacystring
  • minLength 1
  • maxLength 120
budget_usd_per_daynumberThe person's own daily cap on estimated spend with this key; 0 or absent = no cap.
  • minimum 0
  • maximum 1000

Examples

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

The fixtures that ship with the package are the current major's.

Validate

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