AiCreation ai.creation@1

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

Version
1.0.0
Owner
ai
Visibility
public
Status
active
Compatibility
backward
Decision
ADR-001
Schema
https://openvibe.network/contracts/ai/creation.v1.json

ai.creation@1: one thing AI can make on OpenVibe, as the catalogue lists it. GET /api/v1/creations (public, cached, CORS open) answers every creation that is live now, built from OpenVibe.AI's registered workflows and tasks: a creation appears only while the workflow or task behind it is active, so a paused or retired workflow leaves the list. `gives` and `returns` are the person-facing sentences, not the workflow's JSON schema. `workflow` names the AI workflow that does the work; `task` names a registered AI task when the creation is a task rather than a workflow (the task's own workflow still does the work). At least one of them is set. `access` says who may start it: a guest, a signed-in person, and whether the 18+ floor applies. `costs_coins` says a run may charge the person's OpenVibe balance after their free allowance. `start_url` is where a person starts it.

Fields

FieldTypeRequiredDescriptionConstraints
idstringyesStable id, never reused: the catalogue's key for this creation.
  • pattern ^[a-z][a-z0-9-]{1,63}$
productenumyesThe OpenVibe product the result lands in.
  • one of "ai", "blog", "codes", "community", "design", "food", "games", "live", "media", "meme", "news", "pics", "quest", "rent", "reviews", "space", "tools", "trade", "wiki"
namestringyesOne plain line a person reads, in the imperative: "Write a blog post".
  • minLength 3
  • maxLength 80
givesstringyesWhat the person gives it, in plain words (a topic, a picture, a listing, source links).
  • minLength 3
  • maxLength 300
returnsstringyesWhat comes back, in plain words (a draft, an article, a set of files, a check).
  • minLength 3
  • maxLength 300
workflowstring | nullyesThe OpenVibe.AI workflow key that does the work (for example blog.draft_post), or null when the creation is only a registered task.
  • pattern ^[a-z][a-z0-9_-]*\.[a-z0-9_.-]{1,100}$
taskstring | nullyesA registered AI task key (for example design.icon), or null when the creation is the workflow itself.
  • pattern ^[a-z][a-z0-9_-]*\.[a-z0-9_.-]{1,100}$
accessobjectyes
  • no other fields
access.guestbooleanyesA person who is not signed in may start it.
access.signed_inbooleanyesA signed-in person may start it.
access.floor_18booleanyesThe 18+ confirmation is required first.
costs_coinsbooleanyesA run may charge the person's OpenVibe balance after their free allowance; false only when it is free to them.
start_urlstringyesWhere a person starts it.
  • pattern ^https://
  • format uri

Examples

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

Valid: blog-post
{
  "id": "blog-post",
  "product": "blog",
  "name": "Write a blog post",
  "gives": "A topic, and optionally a brief, a tone and who it is for.",
  "returns": "A Markdown draft with a title, a standfirst and cited sources, saved as a draft you can edit.",
  "workflow": "blog.draft_post",
  "task": null,
  "access": {
    "guest": false,
    "signed_in": true,
    "floor_18": false
  },
  "costs_coins": true,
  "start_url": "https://openvibe.blog/write"
}
Valid: icon-task
{
  "id": "icon",
  "product": "design",
  "name": "Draw an icon",
  "gives": "A name for the icon and what it stands for.",
  "returns": "Up to four line drawings in OpenVibe's hand, each with its solid twin, checked before you see them.",
  "workflow": "ai.chat",
  "task": "design.icon",
  "access": {
    "guest": true,
    "signed_in": true,
    "floor_18": false
  },
  "costs_coins": true,
  "start_url": "https://openvibe.design/icons"
}
Rejected: missing-access
{
  "id": "blog-post",
  "product": "blog",
  "name": "Write a blog post",
  "gives": "A topic.",
  "returns": "A draft.",
  "workflow": "blog.draft_post",
  "task": null,
  "costs_coins": true,
  "start_url": "https://openvibe.blog/write"
}
Rejected: no-workflow-or-task
{
  "id": "blog-post",
  "product": "blog",
  "name": "Write a blog post",
  "gives": "A topic.",
  "returns": "A draft.",
  "workflow": null,
  "task": null,
  "access": {
    "guest": false,
    "signed_in": true,
    "floor_18": false
  },
  "costs_coins": true,
  "start_url": "https://openvibe.blog/write"
}

Validate

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