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.
pip install 'oatschema[validate]'
npm install oatschema
cargo add oatschema
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.
Audio Transcription
Store text transcribed from an audio source. Supports timed segments, speaker identification, and non-verbal events.
$idhttps:/
Top-level fields
track_id |
string | |
|---|---|---|
producer |
string | |
language |
string | |
duration |
number | |
score_explanation |
string | |
text |
string | |
segments |
array of object | |
attributes |
object |
{ "track_id": "1", "language": "eng", "text": "Welcome back! Today, my guest is the renowned chef, Jean-Pierre. Thank you, it's a pleasure. You know, the secret is simple, c'est une question de respect pour le produit. It's all about respecting the product.", "segments": [ { "text": "Welcome back! Today, my guest is the renowned chef, Jean-Pierre.", "start_time": 0.5, "end_time": 4.75, "speaker": { "id": "host_maria", "name": "Maria" }, "events": [ "music" ], "score": 0.98 }, { "text": "Thank you, it's a pleasure. You know, the secret is simple,", "start_time": 5.1, "end_time": 8.25, "speaker": { "id": "2", "name": "Jean-Pierre" }, "score": 0.95 }, { "text": "c'est une question de respect pour le produit.", "start_time": 8.25, "end_time": 10.9, "language": "fra", "speaker": { "id": "2", "name": "Jean-Pierre" }, "score": 0.92 }, { "text": "[laughter]", "start_time": 11.0, "end_time": 11.8, "speaker": { "id": "host_maria", "name": "Maria" }, "events": [ "laughter" ] }, { "text": "It's all about respecting the product.", "start_time": 12.0, "end_time": 14.5, "speaker": { "id": "2", "name": "Jean-Pierre" }, "score": 0.96 } ]}
Full schema (194 lines)
Open the JSON
Classification
Represent the result of a classification. Supports predicted labels, confidence scores, and vocabulary.
$idhttps:/
Top-level fields
target |
string | |
|---|---|---|
producer |
string | |
score_explanation |
string | |
vocabulary |
array of string | |
vocabulary_url |
string | |
labels |
array of object | required |
attributes |
object |
{ "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)
Open the JSON
Document Extraction
Represent the layout and content of a document, including text blocks, geometric coordinates, and page structure.
$idhttps:/
Top-level fields
extraction_type |
string | |
|---|---|---|
producer |
string | |
unit |
string | |
page_width |
number | array of object | |
page_height |
number | array of object | |
score_explanation |
string | |
blocks |
array of object | required |
attributes |
object |
{ "extraction_type": "mixed", "unit": "px", "page_width": [ { "value": 850, "pages": [1] }, { "value": 1100, "pages": [2] } ], "page_height": 1100, "blocks": [ { "block_type": "box", "id": "logo-box", "page_number": 1, "box": { "x": 50, "y": 50, "width": 200, "height": 80 }, "attributes": { "visual_class": "logo" } }, { "block_type": "multi_polygon", "id": "occluded-stamp", "page_number": 2, "multi_polygon": [ [ {"x": 100, "y": 100}, {"x": 200, "y": 100}, {"x": 200, "y": 150}, {"x": 100, "y": 150} ], [ {"x": 100, "y": 180}, {"x": 200, "y": 180}, {"x": 200, "y": 250}, {"x": 100, "y": 250} ] ] } ]}
Full schema (604 lines)
Open the JSON
Embedding
Store a vector and (optionally) the algorithm or embedding model which generated it. Supports both array (dense) and object (sparse) representations.
$idhttps:/
Top-level fields
model |
string | |
|---|---|---|
target |
string | |
vector |
array of number | object | required |
attributes |
object |
{ "model": "splade-v2-distilbert", "target": "product_description", "vector": { "dimensions": 30522, "indices": [ 101, 2054, 3091, 4002, 15033, 28991 ], "values": [ 0.45, 1.2, 0.8, 0.15, 2.1, 0.05 ] }, "attributes": { "sparsity_ratio": 0.9998 }}
Full schema (114 lines)
Open the JSON
Entity Extraction
Represent named entities, structural slots, or visual concepts extracted from unstructured data. Links raw evidence (character-offset text spans, document blocks, ranges of blocks, or geometric regions) to normalized values and business concepts, and can record directed relations between entities.
$idhttps:/
Top-level fields
unit |
string | |
|---|---|---|
producer |
string | |
vocabulary_url |
string | |
vocabulary |
array of string | |
score_explanation |
string | |
entities |
array of object | required |
relation_vocabulary_url |
string | |
relation_vocabulary |
array of string | |
relations |
array of object | |
attributes |
object |
{ "producer": "spaCy en_core_web_trf", "vocabulary": ["ORG", "DATE", "PERSON"], "unit": "px", "entities": [ { "id": "ent_101", "text": "Acme Corp", "label": "ORG", "score": 0.97, "location": [ { "type": "span", "start": 0, "end": 9 } ] }, { "id": "ent_102", "text": "21 November 2025", "label": "DATE", "value": "2025-11-21", "location": [ { "type": "span", "start": 14, "end": 30, "block_id": "block_0002" } ] }, { "id": "ent_103", "label": "SIGNATURE", "location": [ { "type": "block", "block_type": "multi_polygon", "page_number": 2, "multi_polygon": [ [ { "x": 410, "y": 720 }, { "x": 470, "y": 720 }, { "x": 470, "y": 760 } ], [ { "x": 480, "y": 722 }, { "x": 540, "y": 722 }, { "x": 540, "y": 758 }, { "x": 480, "y": 758 } ] ] } ] } ]}
Full schema (743 lines)
Open the JSON
Generic
A flexible schema for storing arbitrary key-value data.
$idhttps:/
Top-level fields
description |
string | |
|---|---|---|
producer |
string | |
data |
object | required |
{ "description": "Output from image quality analysis script v1.2", "data": { "is_blurry": false, "contrast_score": 0.87, "dominant_color_hex": "#1a4e8a", "resolution_width": 1920, "primary_subject": null }}
Full schema (55 lines)
Open the JSON
Geolocation
Represent a geographic feature. Defines a subset of GeoJSON (RFC 7946) optimized for predictable parsing and indexing. It restricts the root to a single 'Feature', supports all fixed-depth geometries (Point, Polygon, Multi-types), and enforces flat properties to prevent recursion and nesting attacks.
$idhttps:/
Top-level fields
type |
constant "Feature" | required |
|---|---|---|
id |
string | number | |
producer |
string | |
bbox |
bbox | |
geometry |
null | object | required |
properties |
null | object | required |
{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [ -0.5895, 51.3814 ] }, "properties": { "timestamp": "2025-09-17T11:45:00Z", "camera_make": "DJI", "camera_model": "Mavic 3 Pro" }}
Full schema (410 lines)
Open the JSON
LLM Output
Store a single interaction with an LLM (a Prompt/Response pair). Captures the input prompt, the resulting output, and the configuration parameters used at that moment.
$idhttps:/
Top-level fields
model |
string | required |
|---|---|---|
prompt |
string | |
response_data |
string | required |
language |
string | |
score |
number | |
score_explanation |
string | |
generation_params |
object | |
generation_metadata |
object | |
attributes |
object |
{ "model": "gpt-4o", "prompt": "Extract the invoice number, total amount, and due date from this document.", "response_data": "{\"invoice_id\": \"INV-9528\", \"total_due\": 1450.75, \"due_date\": \"2025-10-31\"}", "language": "eng", "score": 0.95, "score_explanation": "Extraction accuracy, from -1.0 (wrong) to 1.0 (correct).", "generation_params": { "system_prompt": "You are an expert financial document parser. You must only output a valid JSON object.", "temperature": 0.0, "max_tokens": 1000, "seed": "18446744073709551615", "response_format": { "type": "json_object" } }, "generation_metadata": { "response_id": "chatcmpl-9qA8ZypD4YcW1bF5c6e7g8H9iJkLmN", "created": "2025-09-17T11:45:00Z", "finish_reason": "stop", "system_fingerprint": "fp_a24b9d3f8e", "usage": { "prompt_tokens": 820, "completion_tokens": 45, "total_tokens": 865 } }}
Full schema (232 lines)
Open the JSON
Object Detection
Represent objects detected within a source. Supports bounding boxes, polygons, hierarchical relationships, and confidence scores.
$idhttps:/
Top-level fields
unit |
string | required |
|---|---|---|
producer |
string | |
vocabulary_url |
string | |
vocabulary |
array of string | |
score_explanation |
string | |
objects |
array of object | required |
attributes |
object |
{ "unit": "per_mille", "producer": "Manual Review", "score_explanation": "Reviewer confidence, where 1.0 is certain.", "vocabulary_url": "https://example.com/vocab/vehicles", "objects": [ { "id": "obj_1", "label": "car", "score": 1.0, "multi_polygon": [ [ { "x": 100, "y": 400 }, { "x": 300, "y": 400 }, { "x": 300, "y": 600 } ], [ { "x": 350, "y": 420 }, { "x": 450, "y": 420 }, { "x": 450, "y": 600 } ] ] }, { "id": "obj_2", "parent_id": "obj_1", "label": "wheel", "box": { "x": 120, "y": 540, "width": 60, "height": 60 } } ]}
Full schema (394 lines)
Open the JSON
Ranking
Represent a ranked list of items related to a query, such as search results, retrieved passages, recommendations or near-duplicate matches.
$idhttps:/
Top-level fields
target |
string | |
|---|---|---|
producer |
string | |
query |
string | |
collection |
string | |
score_explanation |
string | |
total_candidates |
integer | |
results |
array of object | required |
attributes |
object |
{ "target": "recording-match", "producer": "Chromaprint 1.5 + AcoustID", "collection": "musicbrainz-recordings", "score_explanation": "AcoustID match score.", "results": [ { "rank": 1, "id": "b1a9c0e9-d987-4042-ae91-78d6a3267d69", "title": "Clair de lune", "score": 0.94, "attributes": { "offset_seconds": 92.5, "matched_seconds": 18.0 } } ]}
Full schema (146 lines)
Open the JSON
Regression
Represent continuous numerical predictions. Supports point estimates, confidence intervals, and time-series forecasting.
$idhttps:/
Top-level fields
target |
string | |
|---|---|---|
unit |
string | |
producer |
string | |
score_explanation |
string | |
points |
array of object | required |
attributes |
object |
{ "target": "daily_rainfall", "unit": "mm", "producer": "forecast-model-v4", "score_explanation": "R-squared on the validation set, clipped to [-1, 1].", "points": [ { "timestamp": "2026-05-01T00:00:00Z", "statistic": "median", "value": 2.4, "score": 0.81 }, { "timestamp": "2026-05-01T00:00:00Z", "statistic": "quantile", "quantile_level": 0.9, "value": 6.1 }, { "timestamp": "2026-05-02T00:00:00Z", "statistic": "median", "value": null }, { "timestamp": "2026-05-03T00:00:00Z", "statistic": "median", "value": 0.0, "score": -0.12 } ]}
Full schema (200 lines)
Open the JSON
Temporal Segmentation
Represent labelled time intervals within a media source, such as chapters, scenes, shots, speaker turns or detected events. Segments may overlap, may nest, and need not cover the whole source.
$idhttps:/
Top-level fields
producer |
string | |
|---|---|---|
track_id |
string | |
duration |
number | |
vocabulary |
array of string | |
vocabulary_url |
string | |
score_explanation |
string | |
segments |
array of object | required |
attributes |
object |
{ "producer": "sports-event-detector-v2", "vocabulary_url": "https://example.com/vocabularies/football-events.json", "score_explanation": "Detector confidence probability.", "segments": [ { "label": "goal", "start_time": 1312.0, "end_time": 1312.0, "score": 0.97 }, { "label": "celebration", "start_time": 1312.4, "end_time": 1341.9, "score": 0.82, "attributes": { "team": "home" } }, { "label": "replay", "start_time": 1330.0, "end_time": 1362.5, "score": 0.76 } ]}
Full schema (175 lines)
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.
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]' -
JavaScript
Validation and TypeScript types with no dependencies, for Node.js, browsers, Deno and Bun.
npm install oatschema -
Rust
Schemas compiled into your binary, named by a typed enum.
cargo add oatschema
Using another language? Every schema is served at its $id, so any JSON Schema draft 2020-12 validator can load it. Quick start