AiMeCredentialPutV1 ai.me-credential-put@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-put.v1.json
ai.me-credential-put@1 (OpenVibe.AI; L36 Y1): the person stores or replaces their own provider key at PUT /api/v1/me/credentials/{provider}. Only the person's own Network token or their AI site session may send it. `key` is required the first time and whenever `base_url` changes; a later save may leave it out to keep the stored key. The key is sealed at rest, tested on save and never returned, logged or put in an error.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
provider | enum | yes | The provider. The route names it too; when both are present they must agree. A custom provider must name its endpoint in base_url. |
|
key | string | The provider key. Required the first time and whenever base_url changes; optional afterwards, when the stored key is kept. Never returned. |
| |
base_url | string | The endpoint, for a custom provider or to override the provider's own. https only, no credentials, query or fragment; reached through the guarded fetcher's egress rules. |
| |
budget_usd_per_day | number | The person's own daily cap on this key; 0 or absent means no cap. |
| |
models | object | The model this key should use per kind of work. `auto` is not a model: absent means the provider's default, and the person's ai.me-preferences choose between keys. |
| |
models.chat | string |
| ||
models.code | string |
| ||
models.vision | string |
| ||
models.image | string |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: anthropic
{
"provider": "anthropic",
"key": "sk-ant-test-0123456789",
"budget_usd_per_day": 2,
"models": {
"chat": "claude-haiku-5-5",
"vision": "claude-sonnet-5-5"
}
}Valid: custom
{
"provider": "custom",
"key": "sk-test-custom-0123456789",
"base_url": "https://llm.example.com/v1"
}Rejected: custom-without-base
{
"provider": "custom",
"key": "sk-test-custom-0123456789"
}Rejected: http-base
{
"provider": "custom",
"key": "sk-test-custom-0123456789",
"base_url": "http://llm.example.com/v1"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('ai.me-credential-put@1', value); // { valid, errors: [{ path, message }] }