WikiImagesSuggestResult wiki.images-suggest-result@1

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

Version
1.0.0
Owner
wiki
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/wiki/images-suggest-result.v1.json

wiki.images-suggest-result@1: what wiki.images.suggest answers. Each suggestion says where a picture came from and keeps its licence and author (Commons and Openverse), the OpenVibe.Pics page and its uploader, the page's own Media object, or — only when nothing real exists and the subject is not a real person — an AI illustration labelled 'Illustration made with <model>'. A suggestion is a candidate, not an attachment: the editor chooses one, the file goes to Media, and only then does it become a page attachment.

Fields

FieldTypeRequiredDescriptionConstraints
article_idstringyes
  • pattern ^pg_[0-9A-HJKMNP-TV-Z]{26}$
taskconstyesThe AI task that found the pictures.
  • = "wiki.article.images"
querystring
  • maxLength 300
subject_is_personbooleanTrue when the article is about a real person: no AI illustration is suggested.
run_idstring | null
  • maxLength 200
notestring | nullWhy nothing more was suggested (no licensed picture found, the AI is not configured, the subject is a person).
  • maxLength 300
suggestionsarray of objectyes
  • maxItems 12
  • items: no other fields
suggestions[].providerenumyes
  • one of "commons", "openverse", "pics", "media", "ai"
suggestions[].roleenumyes
  • one of "lead", "figure"
suggestions[].media_idstring | nullSet for provider media, or once a chosen suggestion is in Media.
  • pattern ^med_[0-9A-HJKMNP-TV-Z]{26}$
suggestions[].urlstring | nullThe picture file to fetch (https) or to show when Media already serves it.
  • maxLength 2048
suggestions[].page_urlstring | nullThe picture's page at its source (Commons' file page, Openverse's result, the Pics picture, the Media object).
  • maxLength 2048
suggestions[].titlestring | null
  • maxLength 300
suggestions[].authorstring | nullThe author or uploader, kept for the credit line.
  • maxLength 200
suggestions[].licensestring | null
  • maxLength 200
suggestions[].license_urlstring | null
  • maxLength 2048
suggestions[].widthinteger | null
  • minimum 1
suggestions[].heightinteger | null
  • minimum 1
suggestions[].altstring | null
  • maxLength 400
suggestions[].captionstring | null
  • maxLength 400
suggestions[].creditstring | nullThe line a figure shows: author, licence, or 'Illustration made with <model>' for an AI image.
  • maxLength 400
suggestions[].aiboolean
suggestions[].modelstring | null
  • maxLength 200
suggestions[].data_urlstring | nullAn AI illustration's bytes as a data: URL when the provider returned no hosted URL.
  • maxLength 8000000

Examples

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

Valid: mixed
{
  "article_id": "pg_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "task": "wiki.article.images",
  "query": "OpenVibe Link machine",
  "subject_is_person": false,
  "run_id": "run_01JAB2C3D4E5F6G7H8J9K0MNPS",
  "note": null,
  "suggestions": [
    {
      "provider": "commons",
      "role": "lead",
      "media_id": null,
      "url": "https://upload.wikimedia.org/wikipedia/commons/8/8a/OpenVibe_Link.jpg",
      "page_url": "https://commons.wikimedia.org/wiki/File:OpenVibe_Link.jpg",
      "title": "OpenVibe Link running on a laptop",
      "author": "Ada Example",
      "license": "CC BY-SA 4.0",
      "license_url": "https://creativecommons.org/licenses/by-sa/4.0/",
      "width": 1280,
      "height": 800,
      "alt": "The OpenVibe Link window on a laptop",
      "caption": "OpenVibe Link running on a laptop",
      "credit": "Picture: Ada Example, CC BY-SA 4.0",
      "ai": false
    },
    {
      "provider": "ai",
      "role": "figure",
      "media_id": null,
      "url": null,
      "title": "A diagram of the relay",
      "author": null,
      "license": null,
      "license_url": null,
      "width": 1024,
      "height": 1024,
      "alt": "An illustration of a relay between two machines",
      "caption": "An illustration of the relay",
      "credit": "Illustration made with anthropic/claude-opus-5-5",
      "ai": true,
      "model": "anthropic/claude-opus-5-5",
      "data_url": "data:image/png;base64,iVBORw0KGgo="
    }
  ]
}
Rejected: no-provider
{
  "article_id": "pg_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "task": "wiki.article.images",
  "suggestions": [
    {
      "role": "lead"
    }
  ]
}

Validate

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