Skip to content

OATS: Open Annotation Task Schemas

Strict schemas for model outputs, workflows and annotation tasks.

curl https://oatschema.org/0.9.0/classification

Every schema is served at its permanent $id.

The schemas GitHub Docs

Unrelated to the W3C Web Annotation data model, formerly Open Annotation.

Schemas

The latest version is 0.9.0, released 6 November 2026. Changelog

As of 0.9.0, there are 12 schemas. Pick one to see its fields and an example record.

Classification

Represent the result of a classification. Supports predicted labels, confidence scores, and vocabulary.

$idhttps://oatschema.org/0.9.0/classification

Top-level fields

target string
producer string
score_explanation string
vocabulary array of string
vocabulary_url string
labels array of object required
attributes object

Classification docs

Example record
{  "score_explanation": "Model confidence probability, where 1.0 is 100% confident.",  "vocabulary": [      "animal",      "cat",      "dog",      "house",      "vehicle"  ],  "labels": [    {      "label": "animal",      "score": 0.98    },    {      "label": "cat",      "score": 0.95    },    {      "label": "house",      "score": 0.75    }  ]}
Full schema (136 lines)
classification.json Raw
Open the JSON

Built for model outputs

Models, pipelines and people write the same JSON for each task.

One shape
Swap producers or grade a model against human labels without converting.
Strict
Undefined fields are rejected, so hallucinated keys fail validation.
Bounded
Every string, array and object has a size limit.
Stable
A released version never changes, so results stay comparable.

Learn more about OATS and model outputs

Packages

The schemas, bundled for Python, JavaScript and Rust, exactly as released. They work offline, with typed schema names.

  • Python

    Validation built in. Bundles every schema version from 0.4.0.

    pip install 'oatschema[validate]'

    Get startedPyPISource

  • JavaScript

    Validation and TypeScript types with no dependencies, for Node.js, browsers, Deno and Bun.

    npm install oatschema

    Get startednpmSource

  • Rust

    Schemas compiled into your binary, named by a typed enum.

    cargo add oatschema

    Get startedcrates.ioSource

Using another language? Every schema is served at its $id, so any JSON Schema draft 2020-12 validator can load it. Quick start

Releases

Before 0.7.0: 0.6.0, 0.5.0, 0.4.0, 0.3.0, 0.2.0, 0.1.2. These use the identifiers https://dorsalhub.com/schemas/open/<name>, and DorsalHub serves them; their URLs here, such as /0.6.0/classification, redirect there.

How versions workChangelog