{
  "components": {
    "schemas": {
      "AgreementAnnotator": {
        "additionalProperties": false,
        "description": "One annotator's footprint in a `ProjectAgreement` (how many items they touched).",
        "properties": {
          "display_name": {
            "title": "Display Name",
            "type": "string"
          },
          "email": {
            "title": "Email",
            "type": "string"
          },
          "items": {
            "title": "Items",
            "type": "integer"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "user_id",
          "email",
          "display_name",
          "items"
        ],
        "title": "AgreementAnnotator",
        "type": "object"
      },
      "AnnotationCreate": {
        "description": "A new annotation version.",
        "properties": {
          "duration_ms": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "label_schema_version_id": {
            "format": "uuid",
            "title": "Label Schema Version Id",
            "type": "string"
          },
          "result": {
            "$ref": "#/components/schemas/AnnotationResult"
          },
          "submit": {
            "default": false,
            "title": "Submit",
            "type": "boolean"
          },
          "task_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Id"
          }
        },
        "required": [
          "result",
          "label_schema_version_id"
        ],
        "title": "AnnotationCreate",
        "type": "object"
      },
      "AnnotationKind": {
        "description": "Which line of work a version belongs to (``annotation_kind`` PG enum).\n\nOnly `primary` versions are the item's annotation; `consensus` (QA-1) and\n`gold` (QA-4) versions are per-annotator attempts kept beside it.",
        "enum": [
          "primary",
          "consensus",
          "gold"
        ],
        "title": "AnnotationKind",
        "type": "string"
      },
      "AnnotationRead": {
        "description": "One annotation version as returned by the API.",
        "properties": {
          "author_model_version_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author Model Version Id"
          },
          "author_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author User Id"
          },
          "blob_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Blob Path"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "item_id": {
            "format": "uuid",
            "title": "Item Id",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/AnnotationKind",
            "default": "primary"
          },
          "label_schema_version_id": {
            "format": "uuid",
            "title": "Label Schema Version Id",
            "type": "string"
          },
          "result": {
            "additionalProperties": true,
            "title": "Result",
            "type": "object"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "task_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Id"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "item_id",
          "task_id",
          "version",
          "source",
          "status",
          "author_user_id",
          "author_model_version_id",
          "label_schema_version_id",
          "duration_ms",
          "result"
        ],
        "title": "AnnotationRead",
        "type": "object"
      },
      "AnnotationResult": {
        "additionalProperties": false,
        "description": "Top-level annotation result stored in `annotation.result` (DATA-8).",
        "properties": {
          "classification": {
            "additionalProperties": true,
            "title": "Classification",
            "type": "object"
          },
          "media_type": {
            "$ref": "#/components/schemas/MediaType"
          },
          "schema_version": {
            "title": "Schema Version",
            "type": "integer"
          },
          "shapes": {
            "items": {
              "discriminator": {
                "mapping": {
                  "bbox": "#/components/schemas/BBoxShape",
                  "keypoints": "#/components/schemas/KeypointsShape",
                  "mask": "#/components/schemas/MaskShape",
                  "point": "#/components/schemas/PointShape",
                  "polygon": "#/components/schemas/PolygonShape",
                  "polyline": "#/components/schemas/PolylineShape",
                  "ranking": "#/components/schemas/RankingShape",
                  "rating": "#/components/schemas/RatingShape",
                  "rbox": "#/components/schemas/RBoxShape",
                  "relation": "#/components/schemas/RelationShape",
                  "segment": "#/components/schemas/SegmentShape",
                  "span": "#/components/schemas/SpanShape"
                },
                "propertyName": "type"
              },
              "oneOf": [
                {
                  "$ref": "#/components/schemas/BBoxShape"
                },
                {
                  "$ref": "#/components/schemas/RBoxShape"
                },
                {
                  "$ref": "#/components/schemas/PolygonShape"
                },
                {
                  "$ref": "#/components/schemas/PolylineShape"
                },
                {
                  "$ref": "#/components/schemas/PointShape"
                },
                {
                  "$ref": "#/components/schemas/MaskShape"
                },
                {
                  "$ref": "#/components/schemas/KeypointsShape"
                },
                {
                  "$ref": "#/components/schemas/SpanShape"
                },
                {
                  "$ref": "#/components/schemas/RelationShape"
                },
                {
                  "$ref": "#/components/schemas/RankingShape"
                },
                {
                  "$ref": "#/components/schemas/RatingShape"
                },
                {
                  "$ref": "#/components/schemas/SegmentShape"
                }
              ]
            },
            "title": "Shapes",
            "type": "array"
          }
        },
        "required": [
          "schema_version",
          "media_type"
        ],
        "title": "AnnotationResult",
        "type": "object"
      },
      "AnnotationSource": {
        "description": "Who produced an annotation version (``annotation_source`` PG enum).",
        "enum": [
          "human",
          "model"
        ],
        "title": "AnnotationSource",
        "type": "string"
      },
      "AnnotationStats": {
        "additionalProperties": false,
        "properties": {
          "by_source": {
            "additionalProperties": {
              "type": "integer"
            },
            "title": "By Source",
            "type": "object"
          },
          "latest_by_status": {
            "additionalProperties": {
              "type": "integer"
            },
            "title": "Latest By Status",
            "type": "object"
          },
          "versions": {
            "title": "Versions",
            "type": "integer"
          }
        },
        "required": [
          "versions",
          "by_source",
          "latest_by_status"
        ],
        "title": "AnnotationStats",
        "type": "object"
      },
      "AnnotationStatus": {
        "description": "Annotation review state (``annotation_status`` PG enum).",
        "enum": [
          "draft",
          "submitted",
          "approved",
          "rejected"
        ],
        "title": "AnnotationStatus",
        "type": "string"
      },
      "AnnotatorQuality": {
        "additionalProperties": false,
        "description": "One annotator's accuracy against gold references (QA-4).",
        "properties": {
          "classification_accuracy": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Classification Accuracy"
          },
          "display_name": {
            "title": "Display Name",
            "type": "string"
          },
          "email": {
            "title": "Email",
            "type": "string"
          },
          "gold_items": {
            "title": "Gold Items",
            "type": "integer"
          },
          "mean_iou": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mean Iou"
          },
          "score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Score"
          },
          "shape_f1": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shape F1"
          },
          "span_f1": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Span F1"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "user_id",
          "email",
          "display_name",
          "gold_items",
          "classification_accuracy",
          "shape_f1",
          "mean_iou",
          "span_f1",
          "score"
        ],
        "title": "AnnotatorQuality",
        "type": "object"
      },
      "AnnotatorQualityResponse": {
        "additionalProperties": false,
        "description": "`GET /projects/{id}/quality/annotators` response body (QA-4).",
        "properties": {
          "annotators": {
            "items": {
              "$ref": "#/components/schemas/AnnotatorQuality"
            },
            "title": "Annotators",
            "type": "array"
          }
        },
        "required": [
          "annotators"
        ],
        "title": "AnnotatorQualityResponse",
        "type": "object"
      },
      "AnnotatorStats": {
        "additionalProperties": false,
        "properties": {
          "approved": {
            "default": 0,
            "title": "Approved",
            "type": "integer"
          },
          "display_name": {
            "title": "Display Name",
            "type": "string"
          },
          "rejected": {
            "default": 0,
            "title": "Rejected",
            "type": "integer"
          },
          "submitted": {
            "default": 0,
            "title": "Submitted",
            "type": "integer"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "user_id",
          "display_name"
        ],
        "title": "AnnotatorStats",
        "type": "object"
      },
      "ApiKeyCreate": {
        "additionalProperties": false,
        "description": "Payload to mint an API key (AUTH-4).\n\n`scopes` is a subset of `read` / `write` / `admin`; `user_id` (superuser\nonly) issues the key for another user or a service account.",
        "properties": {
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "title": "Scopes",
            "type": "array"
          },
          "user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          }
        },
        "required": [
          "name"
        ],
        "title": "ApiKeyCreate",
        "type": "object"
      },
      "ApiKeyCreated": {
        "additionalProperties": false,
        "description": "The freshly minted key, carrying the bearer `token` exactly once.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "organization_id": {
            "format": "uuid",
            "title": "Organization Id",
            "type": "string"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "title": "Scopes",
            "type": "array"
          },
          "token": {
            "title": "Token",
            "type": "string"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "organization_id",
          "user_id",
          "name",
          "scopes",
          "expires_at",
          "last_used_at",
          "revoked_at",
          "created_by",
          "created_at",
          "token"
        ],
        "title": "ApiKeyCreated",
        "type": "object"
      },
      "ApiKeyRead": {
        "additionalProperties": false,
        "description": "API key metadata; the token itself is only returned at creation.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "organization_id": {
            "format": "uuid",
            "title": "Organization Id",
            "type": "string"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "title": "Scopes",
            "type": "array"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "organization_id",
          "user_id",
          "name",
          "scopes",
          "expires_at",
          "last_used_at",
          "revoked_at",
          "created_by",
          "created_at"
        ],
        "title": "ApiKeyRead",
        "type": "object"
      },
      "AttributeDef": {
        "additionalProperties": false,
        "description": "One attribute definition, attached to a class or to top-level classification.",
        "properties": {
          "default": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Default"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "options": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Options"
          },
          "required": {
            "default": false,
            "title": "Required",
            "type": "boolean"
          },
          "type": {
            "$ref": "#/components/schemas/AttributeType"
          }
        },
        "required": [
          "name",
          "type"
        ],
        "title": "AttributeDef",
        "type": "object"
      },
      "AttributeType": {
        "description": "Kind of value an attribute holds.",
        "enum": [
          "text",
          "number",
          "select",
          "multiselect",
          "boolean"
        ],
        "title": "AttributeType",
        "type": "string"
      },
      "AuditEventRead": {
        "additionalProperties": false,
        "description": "One append-only audit row.",
        "properties": {
          "action": {
            "title": "Action",
            "type": "string"
          },
          "actor_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actor Id"
          },
          "after": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "After"
          },
          "before": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Before"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "ip": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ip"
          },
          "organization_id": {
            "format": "uuid",
            "title": "Organization Id",
            "type": "string"
          },
          "target_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Id"
          },
          "target_type": {
            "title": "Target Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "organization_id",
          "actor_id",
          "action",
          "target_type",
          "target_id",
          "ip",
          "before",
          "after",
          "created_at"
        ],
        "title": "AuditEventRead",
        "type": "object"
      },
      "AuthProviders": {
        "additionalProperties": false,
        "description": "Which sign-in methods this installation offers.",
        "properties": {
          "local": {
            "default": true,
            "title": "Local",
            "type": "boolean"
          },
          "oidc": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OidcProviderInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "saml": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OidcProviderInfo"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "AuthProviders",
        "type": "object"
      },
      "BBoxShape": {
        "additionalProperties": false,
        "description": "Axis-aligned bounding box: `bbox` is `[x_min, y_min, x_max, y_max]` in pixels (QA-6).",
        "properties": {
          "attributes": {
            "additionalProperties": true,
            "title": "Attributes",
            "type": "object"
          },
          "bbox": {
            "maxItems": 4,
            "minItems": 4,
            "prefixItems": [
              {
                "type": "number"
              },
              {
                "type": "number"
              },
              {
                "type": "number"
              },
              {
                "type": "number"
              }
            ],
            "title": "Bbox",
            "type": "array"
          },
          "class": {
            "title": "Class",
            "type": "string"
          },
          "confidence": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "frame": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Frame"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "keyframe": {
            "default": true,
            "title": "Keyframe",
            "type": "boolean"
          },
          "outside": {
            "default": false,
            "title": "Outside",
            "type": "boolean"
          },
          "page": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page"
          },
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text"
          },
          "track_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Track Id"
          },
          "type": {
            "const": "bbox",
            "default": "bbox",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "class",
          "bbox"
        ],
        "title": "BBoxShape",
        "type": "object"
      },
      "Body_saml_acs_api_v1_auth_saml_acs_post": {
        "properties": {
          "SAMLResponse": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Samlresponse"
          }
        },
        "title": "Body_saml_acs_api_v1_auth_saml_acs_post",
        "type": "object"
      },
      "Body_upload_import_job_api_v1_projects__project_id__imports_upload_post": {
        "properties": {
          "attribute_mapping": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attribute Mapping"
          },
          "class_mapping": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Class Mapping"
          },
          "dry_run": {
            "default": false,
            "title": "Dry Run",
            "type": "boolean"
          },
          "file": {
            "contentMediaType": "application/octet-stream",
            "title": "File",
            "type": "string"
          },
          "format": {
            "title": "Format",
            "type": "string"
          },
          "label_schema_version_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label Schema Version Id"
          },
          "status": {
            "$ref": "#/components/schemas/ImportStatus",
            "default": "submitted"
          }
        },
        "required": [
          "file",
          "format"
        ],
        "title": "Body_upload_import_job_api_v1_projects__project_id__imports_upload_post",
        "type": "object"
      },
      "BulkApprove": {
        "additionalProperties": false,
        "description": "Approve the latest `submitted` version of each item (WF-4 verdict\nwithout a correction). Items not awaiting review are skipped.",
        "properties": {
          "action": {
            "const": "approve",
            "title": "Action",
            "type": "string"
          },
          "comment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Comment"
          },
          "item_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 500,
            "minItems": 1,
            "title": "Item Ids",
            "type": "array"
          }
        },
        "required": [
          "action",
          "item_ids"
        ],
        "title": "BulkApprove",
        "type": "object"
      },
      "BulkAssign": {
        "additionalProperties": false,
        "description": "Point the items' live `type` tasks at `assignee_id` (or nobody), and /\nor set their priority and deadline. An item without a live task of that\ntype gets one opened when its status allows annotation (`annotate`) or\nreview (`review`); items being worked on right now (`in_progress`) are\nskipped rather than pulled from under the annotator.",
        "properties": {
          "action": {
            "const": "assign",
            "title": "Action",
            "type": "string"
          },
          "assignee_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assignee Id"
          },
          "deadline": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deadline"
          },
          "item_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 500,
            "minItems": 1,
            "title": "Item Ids",
            "type": "array"
          },
          "priority": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Priority"
          },
          "type": {
            "$ref": "#/components/schemas/TaskType",
            "default": "annotate"
          }
        },
        "required": [
          "action",
          "item_ids"
        ],
        "title": "BulkAssign",
        "type": "object"
      },
      "BulkReject": {
        "additionalProperties": false,
        "description": "Reject the latest `submitted` version of each item (WF-4) with one\nshared `comment`, which every item's thread gets — a rejection always\ntells the annotator why. Items not awaiting review are skipped.",
        "properties": {
          "action": {
            "const": "reject",
            "title": "Action",
            "type": "string"
          },
          "comment": {
            "maxLength": 10000,
            "minLength": 1,
            "title": "Comment",
            "type": "string"
          },
          "item_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 500,
            "minItems": 1,
            "title": "Item Ids",
            "type": "array"
          }
        },
        "required": [
          "action",
          "item_ids",
          "comment"
        ],
        "title": "BulkReject",
        "type": "object"
      },
      "BulkResult": {
        "additionalProperties": false,
        "description": "Outcome of a bulk request: how many items changed, and which did not.",
        "properties": {
          "applied": {
            "title": "Applied",
            "type": "integer"
          },
          "skipped": {
            "items": {
              "$ref": "#/components/schemas/BulkSkipped"
            },
            "title": "Skipped",
            "type": "array"
          }
        },
        "required": [
          "applied",
          "skipped"
        ],
        "title": "BulkResult",
        "type": "object"
      },
      "BulkReturn": {
        "additionalProperties": false,
        "description": "Return the items' `in_progress` tasks to the open queue: the lock is\ndropped and the assignee cleared, as if the holder had released it.",
        "properties": {
          "action": {
            "const": "return",
            "title": "Action",
            "type": "string"
          },
          "item_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 500,
            "minItems": 1,
            "title": "Item Ids",
            "type": "array"
          }
        },
        "required": [
          "action",
          "item_ids"
        ],
        "title": "BulkReturn",
        "type": "object"
      },
      "BulkSkipped": {
        "additionalProperties": false,
        "description": "One item the action did not apply to, and why.",
        "properties": {
          "item_id": {
            "format": "uuid",
            "title": "Item Id",
            "type": "string"
          },
          "reason": {
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "item_id",
          "reason"
        ],
        "title": "BulkSkipped",
        "type": "object"
      },
      "BulkTag": {
        "additionalProperties": false,
        "description": "Add and / or remove free-form tags on the items (`item.meta.tags`).",
        "properties": {
          "action": {
            "const": "tag",
            "title": "Action",
            "type": "string"
          },
          "add": {
            "items": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[^\\s,]+$",
              "type": "string"
            },
            "title": "Add",
            "type": "array"
          },
          "item_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 500,
            "minItems": 1,
            "title": "Item Ids",
            "type": "array"
          },
          "remove": {
            "items": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[^\\s,]+$",
              "type": "string"
            },
            "title": "Remove",
            "type": "array"
          }
        },
        "required": [
          "action",
          "item_ids"
        ],
        "title": "BulkTag",
        "type": "object"
      },
      "CacheRebuildRequest": {
        "additionalProperties": false,
        "description": "Body of `POST /projects/{id}/cache/rebuild` (SRC-6).",
        "properties": {
          "purge": {
            "default": false,
            "title": "Purge",
            "type": "boolean"
          }
        },
        "title": "CacheRebuildRequest",
        "type": "object"
      },
      "ClaimRequest": {
        "description": "Optional JSON body for `POST /tasks/next`, alternative to the query parameter.",
        "properties": {
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaskType"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "ClaimRequest",
        "type": "object"
      },
      "ClassCount": {
        "additionalProperties": false,
        "properties": {
          "count": {
            "title": "Count",
            "type": "integer"
          },
          "label": {
            "title": "Label",
            "type": "string"
          }
        },
        "required": [
          "label",
          "count"
        ],
        "title": "ClassCount",
        "type": "object"
      },
      "ClassDef": {
        "additionalProperties": false,
        "description": "One annotation class: its display, tools and attributes.",
        "properties": {
          "attributes": {
            "items": {
              "$ref": "#/components/schemas/AttributeDef"
            },
            "title": "Attributes",
            "type": "array"
          },
          "color": {
            "title": "Color",
            "type": "string"
          },
          "display_name": {
            "title": "Display Name",
            "type": "string"
          },
          "hotkey": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hotkey"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "scale": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScaleDef"
              },
              {
                "type": "null"
              }
            ]
          },
          "skeleton": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SkeletonDef"
              },
              {
                "type": "null"
              }
            ]
          },
          "tools": {
            "items": {
              "$ref": "#/components/schemas/ToolType"
            },
            "title": "Tools",
            "type": "array"
          }
        },
        "required": [
          "name",
          "display_name",
          "color",
          "tools"
        ],
        "title": "ClassDef",
        "type": "object"
      },
      "ClassificationAgreement": {
        "additionalProperties": false,
        "description": "Agreement for one classification field, pooled over items with a value (QA-2).",
        "properties": {
          "field": {
            "title": "Field",
            "type": "string"
          },
          "fleiss_kappa": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fleiss Kappa"
          },
          "items": {
            "title": "Items",
            "type": "integer"
          },
          "krippendorff_alpha": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Krippendorff Alpha"
          }
        },
        "required": [
          "field",
          "items",
          "fleiss_kappa",
          "krippendorff_alpha"
        ],
        "title": "ClassificationAgreement",
        "type": "object"
      },
      "CommentCreate": {
        "additionalProperties": false,
        "description": "Payload to add a comment to an item's thread.",
        "properties": {
          "anchor": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Anchor"
          },
          "annotation_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Annotation Id"
          },
          "body": {
            "maxLength": 4000,
            "minLength": 1,
            "title": "Body",
            "type": "string"
          },
          "parent_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id"
          }
        },
        "required": [
          "body"
        ],
        "title": "CommentCreate",
        "type": "object"
      },
      "CommentRead": {
        "additionalProperties": false,
        "description": "Comment as returned by the API.",
        "properties": {
          "anchor": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Anchor"
          },
          "annotation_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Annotation Id"
          },
          "author_id": {
            "format": "uuid",
            "title": "Author Id",
            "type": "string"
          },
          "body": {
            "title": "Body",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "item_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Item Id"
          },
          "parent_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "resolved_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolved At"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "item_id",
          "annotation_id",
          "parent_id",
          "author_id",
          "body",
          "anchor",
          "resolved_at",
          "created_at",
          "updated_at"
        ],
        "title": "CommentRead",
        "type": "object"
      },
      "CommentResolve": {
        "additionalProperties": false,
        "description": "Payload to resolve or reopen a comment.",
        "properties": {
          "resolved": {
            "title": "Resolved",
            "type": "boolean"
          }
        },
        "required": [
          "resolved"
        ],
        "title": "CommentResolve",
        "type": "object"
      },
      "ConnectorCheckResult": {
        "additionalProperties": false,
        "description": "Result of testing a connector's connectivity (SRC-7).",
        "properties": {
          "messages": {
            "items": {
              "type": "string"
            },
            "title": "Messages",
            "type": "array"
          },
          "ok": {
            "title": "Ok",
            "type": "boolean"
          }
        },
        "required": [
          "ok",
          "messages"
        ],
        "title": "ConnectorCheckResult",
        "type": "object"
      },
      "ConnectorCreate": {
        "additionalProperties": false,
        "description": "Payload to register a new storage connector.\n\n`secret_ref` is a Key Vault / secret-store reference, never a raw secret\n(SEC/AUTH-7).",
        "properties": {
          "config": {
            "additionalProperties": true,
            "title": "Config",
            "type": "object"
          },
          "identity_type": {
            "$ref": "#/components/schemas/ConnectorIdentity"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "secret_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Secret Ref"
          },
          "type": {
            "$ref": "#/components/schemas/ConnectorType"
          }
        },
        "required": [
          "name",
          "type",
          "identity_type"
        ],
        "title": "ConnectorCreate",
        "type": "object"
      },
      "ConnectorIdentity": {
        "description": "How a connector authenticates to its backend.",
        "enum": [
          "managed_identity",
          "service_principal",
          "account_key",
          "sas_token",
          "iam_role",
          "access_key",
          "none"
        ],
        "title": "ConnectorIdentity",
        "type": "string"
      },
      "ConnectorRead": {
        "additionalProperties": false,
        "description": "Connector as returned by the API; `secret_ref` is never exposed, only its presence.",
        "properties": {
          "config": {
            "additionalProperties": true,
            "title": "Config",
            "type": "object"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "events_enabled": {
            "default": false,
            "title": "Events Enabled",
            "type": "boolean"
          },
          "has_secret": {
            "title": "Has Secret",
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "identity_type": {
            "$ref": "#/components/schemas/ConnectorIdentity"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "organization_id": {
            "format": "uuid",
            "title": "Organization Id",
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/ConnectorType"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "organization_id",
          "name",
          "type",
          "identity_type",
          "has_secret",
          "config",
          "created_at",
          "updated_at"
        ],
        "title": "ConnectorRead",
        "type": "object"
      },
      "ConnectorType": {
        "description": "Storage backend a connector talks to.",
        "enum": [
          "azure_blob",
          "s3",
          "gcs",
          "local",
          "http",
          "sharepoint",
          "databricks_volume"
        ],
        "title": "ConnectorType",
        "type": "string"
      },
      "ConnectorUpdate": {
        "additionalProperties": false,
        "description": "Partial update payload for a connector; all fields optional.",
        "properties": {
          "config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config"
          },
          "identity_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ConnectorIdentity"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "secret_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Secret Ref"
          },
          "type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ConnectorType"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "ConnectorUpdate",
        "type": "object"
      },
      "ConsensusAnnotationRead": {
        "additionalProperties": false,
        "description": "The annotation version `resolve` stores, mirroring `annotations.py`'s `AnnotationRead`.",
        "properties": {
          "author_model_version_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author Model Version Id"
          },
          "author_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author User Id"
          },
          "blob_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Blob Path"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "item_id": {
            "format": "uuid",
            "title": "Item Id",
            "type": "string"
          },
          "label_schema_version_id": {
            "format": "uuid",
            "title": "Label Schema Version Id",
            "type": "string"
          },
          "result": {
            "additionalProperties": true,
            "title": "Result",
            "type": "object"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "task_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Id"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "item_id",
          "task_id",
          "version",
          "source",
          "status",
          "author_user_id",
          "author_model_version_id",
          "label_schema_version_id",
          "duration_ms",
          "result"
        ],
        "title": "ConsensusAnnotationRead",
        "type": "object"
      },
      "ConsensusAnnotatorRead": {
        "additionalProperties": false,
        "description": "One consensus annotator's latest submitted version on an item.",
        "properties": {
          "annotation_id": {
            "format": "uuid",
            "title": "Annotation Id",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "display_name": {
            "title": "Display Name",
            "type": "string"
          },
          "email": {
            "title": "Email",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "user_id",
          "email",
          "display_name",
          "annotation_id",
          "version",
          "status",
          "created_at"
        ],
        "title": "ConsensusAnnotatorRead",
        "type": "object"
      },
      "ConsensusRead": {
        "additionalProperties": false,
        "description": "`GET /items/{id}/consensus` response body (QA-1, QA-2, QA-3).",
        "properties": {
          "agreement": {
            "$ref": "#/components/schemas/ItemAgreement"
          },
          "annotators": {
            "items": {
              "$ref": "#/components/schemas/ConsensusAnnotatorRead"
            },
            "title": "Annotators",
            "type": "array"
          },
          "conflicts": {
            "items": {
              "type": "string"
            },
            "title": "Conflicts",
            "type": "array"
          },
          "expected": {
            "title": "Expected",
            "type": "integer"
          },
          "preview": {
            "$ref": "#/components/schemas/AnnotationResult"
          }
        },
        "required": [
          "expected",
          "annotators",
          "agreement",
          "preview",
          "conflicts"
        ],
        "title": "ConsensusRead",
        "type": "object"
      },
      "CorrectionClassMetrics": {
        "additionalProperties": false,
        "description": "The same counts for one class, with its precision / recall.",
        "properties": {
          "added": {
            "title": "Added",
            "type": "integer"
          },
          "adjusted": {
            "title": "Adjusted",
            "type": "integer"
          },
          "deleted": {
            "title": "Deleted",
            "type": "integer"
          },
          "kept": {
            "title": "Kept",
            "type": "integer"
          },
          "mean_iou_adjusted": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mean Iou Adjusted"
          },
          "model": {
            "title": "Model",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "precision": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Precision"
          },
          "recall": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recall"
          },
          "relabeled": {
            "title": "Relabeled",
            "type": "integer"
          }
        },
        "required": [
          "model",
          "kept",
          "adjusted",
          "relabeled",
          "deleted",
          "added",
          "name",
          "precision",
          "recall",
          "mean_iou_adjusted"
        ],
        "title": "CorrectionClassMetrics",
        "type": "object"
      },
      "CorrectionMetrics": {
        "additionalProperties": false,
        "description": "`GET /models/{id}/versions/{vid}/metrics` (ML-5).",
        "properties": {
          "classes": {
            "items": {
              "$ref": "#/components/schemas/CorrectionClassMetrics"
            },
            "title": "Classes",
            "type": "array"
          },
          "items_accepted_unchanged": {
            "title": "Items Accepted Unchanged",
            "type": "integer"
          },
          "items_corrected": {
            "title": "Items Corrected",
            "type": "integer"
          },
          "items_pending": {
            "title": "Items Pending",
            "type": "integer"
          },
          "items_predicted": {
            "title": "Items Predicted",
            "type": "integer"
          },
          "mean_iou_adjusted": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mean Iou Adjusted"
          },
          "model_version_id": {
            "format": "uuid",
            "title": "Model Version Id",
            "type": "string"
          },
          "precision": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Precision"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "recall": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recall"
          },
          "shapes": {
            "$ref": "#/components/schemas/CorrectionShapeCounts"
          }
        },
        "required": [
          "model_version_id",
          "project_id",
          "items_predicted",
          "items_corrected",
          "items_pending",
          "items_accepted_unchanged",
          "shapes",
          "precision",
          "recall",
          "mean_iou_adjusted",
          "classes"
        ],
        "title": "CorrectionMetrics",
        "type": "object"
      },
      "CorrectionShapeCounts": {
        "additionalProperties": false,
        "description": "Fate of a model version's shapes once a human finished the item.",
        "properties": {
          "added": {
            "title": "Added",
            "type": "integer"
          },
          "adjusted": {
            "title": "Adjusted",
            "type": "integer"
          },
          "deleted": {
            "title": "Deleted",
            "type": "integer"
          },
          "kept": {
            "title": "Kept",
            "type": "integer"
          },
          "model": {
            "title": "Model",
            "type": "integer"
          },
          "relabeled": {
            "title": "Relabeled",
            "type": "integer"
          }
        },
        "required": [
          "model",
          "kept",
          "adjusted",
          "relabeled",
          "deleted",
          "added"
        ],
        "title": "CorrectionShapeCounts",
        "type": "object"
      },
      "DatasetFilter": {
        "additionalProperties": false,
        "description": "Which items a snapshot or export covers (EXP-2). Empty means every annotated item.\n\nEvery field is a further restriction on the *latest* annotation version\nof each item; the field list is documented in CONTRACTS.md → snapshot.",
        "properties": {
          "annotated_after": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Annotated After"
          },
          "annotated_before": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Annotated Before"
          },
          "annotation_status": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/AnnotationStatus"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Annotation Status"
          },
          "annotator_ids": {
            "anyOf": [
              {
                "items": {
                  "format": "uuid",
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Annotator Ids"
          },
          "classes": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Classes"
          },
          "item_status": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/app__models__item__ItemStatus"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Item Status"
          },
          "path_prefix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Path Prefix"
          },
          "source": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/AnnotationSource"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          }
        },
        "title": "DatasetFilter",
        "type": "object"
      },
      "DependencyStatus": {
        "properties": {
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          },
          "ok": {
            "title": "Ok",
            "type": "boolean"
          }
        },
        "required": [
          "ok"
        ],
        "title": "DependencyStatus",
        "type": "object"
      },
      "EraseRequest": {
        "additionalProperties": false,
        "description": "`confirm_email` must repeat the user's current e-mail, as a guard.",
        "properties": {
          "confirm_email": {
            "title": "Confirm Email",
            "type": "string"
          },
          "redact_comments": {
            "default": false,
            "title": "Redact Comments",
            "type": "boolean"
          }
        },
        "required": [
          "confirm_email"
        ],
        "title": "EraseRequest",
        "type": "object"
      },
      "EventDeliveryResult": {
        "additionalProperties": false,
        "description": "What one storage-event delivery queued (SRC-3).",
        "properties": {
          "ignored": {
            "title": "Ignored",
            "type": "integer"
          },
          "job_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Job Ids",
            "type": "array"
          },
          "matched": {
            "title": "Matched",
            "type": "integer"
          },
          "received": {
            "title": "Received",
            "type": "integer"
          }
        },
        "required": [
          "received",
          "matched",
          "ignored",
          "job_ids"
        ],
        "title": "EventDeliveryResult",
        "type": "object"
      },
      "EventTokenRead": {
        "additionalProperties": false,
        "description": "A freshly minted storage-event token (SRC-3), shown once.",
        "properties": {
          "path": {
            "title": "Path",
            "type": "string"
          },
          "token": {
            "title": "Token",
            "type": "string"
          }
        },
        "required": [
          "token",
          "path"
        ],
        "title": "EventTokenRead",
        "type": "object"
      },
      "ExportDownload": {
        "additionalProperties": false,
        "description": "A short-lived signed URL for a succeeded export's archive (EXP-5).",
        "properties": {
          "expires_in": {
            "title": "Expires In",
            "type": "integer"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url",
          "expires_in"
        ],
        "title": "ExportDownload",
        "type": "object"
      },
      "ExportRequest": {
        "additionalProperties": false,
        "description": "Body for queuing an export job (EXP-5).\n\nEither `snapshot_id` (export exactly that frozen set) or `filter` (export\nthe latest annotation of every matching item right now). `split` picks\none partition of a split snapshot (EXP-3); it needs `snapshot_id`.",
        "properties": {
          "filter": {
            "$ref": "#/components/schemas/DatasetFilter"
          },
          "format": {
            "title": "Format",
            "type": "string"
          },
          "label_schema_version_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label Schema Version Id"
          },
          "snapshot_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Snapshot Id"
          },
          "split": {
            "anyOf": [
              {
                "enum": [
                  "train",
                  "val",
                  "test"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Split"
          }
        },
        "required": [
          "format"
        ],
        "title": "ExportRequest",
        "type": "object"
      },
      "ExtendRequest": {
        "description": "Optional JSON body for `POST /tasks/{task_id}/extend`.",
        "properties": {
          "lock_ttl_seconds": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lock Ttl Seconds"
          }
        },
        "title": "ExtendRequest",
        "type": "object"
      },
      "ExtractTextRequest": {
        "additionalProperties": false,
        "description": "Body of `POST /projects/{id}/extract-text` (CONTRACTS.md *PDF text mode*).",
        "properties": {
          "force": {
            "default": false,
            "title": "Force",
            "type": "boolean"
          },
          "item_ids": {
            "anyOf": [
              {
                "items": {
                  "format": "uuid",
                  "type": "string"
                },
                "maxItems": 1000,
                "minItems": 1,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Item Ids"
          }
        },
        "title": "ExtractTextRequest",
        "type": "object"
      },
      "FuseResolve": {
        "additionalProperties": false,
        "description": "Resolve by fusing every submitted consensus version (QA-3).",
        "properties": {
          "comment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Comment"
          },
          "iou_threshold": {
            "default": 0.5,
            "exclusiveMinimum": 0.0,
            "maximum": 1.0,
            "title": "Iou Threshold",
            "type": "number"
          },
          "method": {
            "const": "fuse",
            "default": "fuse",
            "title": "Method",
            "type": "string"
          },
          "min_votes": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Votes"
          }
        },
        "title": "FuseResolve",
        "type": "object"
      },
      "GoldSetRequest": {
        "additionalProperties": false,
        "description": "`PUT /items/{id}/gold` payload: an approved primary version of this item.",
        "properties": {
          "annotation_id": {
            "format": "uuid",
            "title": "Annotation Id",
            "type": "string"
          }
        },
        "required": [
          "annotation_id"
        ],
        "title": "GoldSetRequest",
        "type": "object"
      },
      "GoldTasksRequest": {
        "additionalProperties": false,
        "description": "`POST /projects/{id}/gold/tasks` payload.\n\nDefaults (both omitted) to every member with role `annotator` times every\nitem with a gold reference.",
        "properties": {
          "item_ids": {
            "anyOf": [
              {
                "items": {
                  "format": "uuid",
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Item Ids"
          },
          "priority": {
            "default": 0,
            "title": "Priority",
            "type": "integer"
          },
          "user_ids": {
            "anyOf": [
              {
                "items": {
                  "format": "uuid",
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Ids"
          }
        },
        "title": "GoldTasksRequest",
        "type": "object"
      },
      "GoldTasksResult": {
        "additionalProperties": false,
        "description": "How many (item, user) gold tasks a `gold/tasks` request opened or skipped.",
        "properties": {
          "opened": {
            "title": "Opened",
            "type": "integer"
          },
          "skipped": {
            "title": "Skipped",
            "type": "integer"
          }
        },
        "required": [
          "opened",
          "skipped"
        ],
        "title": "GoldTasksResult",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "HealthResponse": {
        "properties": {
          "status": {
            "const": "ok",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "title": "HealthResponse",
        "type": "object"
      },
      "ImportRequest": {
        "additionalProperties": false,
        "description": "Body for queuing an import job (EXP-6).\n\n`path` names the file, `.zip` archive or `/`-terminated prefix on\n`connector_id` (default: the project's source connector). `dry_run`\nparses and matches without writing anything — the preview to run first.",
        "properties": {
          "attribute_mapping": {
            "additionalProperties": {
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": "object"
            },
            "title": "Attribute Mapping",
            "type": "object"
          },
          "class_mapping": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Class Mapping",
            "type": "object"
          },
          "connector_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Connector Id"
          },
          "dry_run": {
            "default": false,
            "title": "Dry Run",
            "type": "boolean"
          },
          "format": {
            "title": "Format",
            "type": "string"
          },
          "label_schema_version_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label Schema Version Id"
          },
          "path": {
            "minLength": 1,
            "title": "Path",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ImportStatus",
            "default": "submitted"
          }
        },
        "required": [
          "format",
          "path"
        ],
        "title": "ImportRequest",
        "type": "object"
      },
      "ImportStatus": {
        "description": "Annotation status an import writes (a subset of `annotation_status`).",
        "enum": [
          "submitted",
          "draft"
        ],
        "title": "ImportStatus",
        "type": "string"
      },
      "InteractivePoint": {
        "additionalProperties": false,
        "description": "A click, in original-image pixels.",
        "properties": {
          "x": {
            "minimum": 0.0,
            "title": "X",
            "type": "number"
          },
          "y": {
            "minimum": 0.0,
            "title": "Y",
            "type": "number"
          }
        },
        "required": [
          "x",
          "y"
        ],
        "title": "InteractivePoint",
        "type": "object"
      },
      "InteractiveRequest": {
        "additionalProperties": false,
        "description": "`POST /items/{id}/interactive`: one prompt for a `segment` model.\n\nExactly one of `point` / `box` — the model turns it into a polygon. The\ntext prompt the reference service also understands is deliberately not\nexposed yet: nothing in the annotator asks for it.",
        "properties": {
          "box": {
            "anyOf": [
              {
                "maxItems": 4,
                "minItems": 4,
                "prefixItems": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  }
                ],
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Box"
          },
          "model_id": {
            "format": "uuid",
            "title": "Model Id",
            "type": "string"
          },
          "point": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/InteractivePoint"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "model_id"
        ],
        "title": "InteractiveRequest",
        "type": "object"
      },
      "InteractiveResult": {
        "additionalProperties": false,
        "description": "The polygon the model proposed; the browser adds it as a normal shape.",
        "properties": {
          "confidence": {
            "title": "Confidence",
            "type": "number"
          },
          "points": {
            "items": {
              "maxItems": 2,
              "minItems": 2,
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "type": "array"
            },
            "title": "Points",
            "type": "array"
          },
          "type": {
            "const": "polygon",
            "default": "polygon",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "points",
          "confidence"
        ],
        "title": "InteractiveResult",
        "type": "object"
      },
      "ItemAgreement": {
        "additionalProperties": false,
        "description": "Agreement over one item's consensus versions (embedded in `GET /items/{id}/consensus`).",
        "properties": {
          "classification": {
            "items": {
              "$ref": "#/components/schemas/ClassificationAgreement"
            },
            "title": "Classification",
            "type": "array"
          },
          "pairs": {
            "items": {
              "$ref": "#/components/schemas/PairAgreement"
            },
            "title": "Pairs",
            "type": "array"
          },
          "shapes": {
            "$ref": "#/components/schemas/ShapeAgreement"
          },
          "spans": {
            "$ref": "#/components/schemas/SpanAgreement"
          }
        },
        "required": [
          "shapes",
          "spans"
        ],
        "title": "ItemAgreement",
        "type": "object"
      },
      "ItemCreate": {
        "additionalProperties": false,
        "description": "Payload to register a new item under a project (project id comes from the route).",
        "properties": {
          "connector_id": {
            "format": "uuid",
            "title": "Connector Id",
            "type": "string"
          },
          "etag": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Etag"
          },
          "height": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Height"
          },
          "media_type": {
            "$ref": "#/components/schemas/MediaType"
          },
          "meta": {
            "additionalProperties": true,
            "title": "Meta",
            "type": "object"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "size_bytes": {
            "title": "Size Bytes",
            "type": "integer"
          },
          "width": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Width"
          }
        },
        "required": [
          "connector_id",
          "path",
          "media_type",
          "size_bytes"
        ],
        "title": "ItemCreate",
        "type": "object"
      },
      "ItemRead": {
        "additionalProperties": false,
        "description": "Item as returned by the API, with an optional short-lived signed media URL.",
        "properties": {
          "connector_id": {
            "format": "uuid",
            "title": "Connector Id",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "etag": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Etag"
          },
          "height": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Height"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "media_type": {
            "$ref": "#/components/schemas/MediaType"
          },
          "media_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Media Url"
          },
          "meta": {
            "additionalProperties": true,
            "title": "Meta",
            "type": "object"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "size_bytes": {
            "title": "Size Bytes",
            "type": "integer"
          },
          "status": {
            "$ref": "#/components/schemas/ItemStatus-Output"
          },
          "thumbnail_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thumbnail Url"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "width": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Width"
          }
        },
        "required": [
          "id",
          "project_id",
          "connector_id",
          "path",
          "media_type",
          "etag",
          "size_bytes",
          "width",
          "height",
          "meta",
          "status",
          "created_at",
          "updated_at"
        ],
        "title": "ItemRead",
        "type": "object"
      },
      "ItemStats": {
        "additionalProperties": false,
        "properties": {
          "by_status": {
            "additionalProperties": {
              "type": "integer"
            },
            "title": "By Status",
            "type": "object"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "total",
          "by_status"
        ],
        "title": "ItemStats",
        "type": "object"
      },
      "ItemStatus-Output": {
        "description": "Lifecycle state of an item, per the workflow state machine (§7).",
        "enum": [
          "new",
          "prelabeled",
          "annotating",
          "submitted",
          "in_review",
          "approved",
          "rejected",
          "skipped"
        ],
        "title": "ItemStatus",
        "type": "string"
      },
      "ItemView": {
        "additionalProperties": false,
        "description": "`GET /items/{id}/views`: one companion view, signed (§5 multimodal).",
        "properties": {
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "media_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MediaType"
              },
              {
                "type": "null"
              }
            ]
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          }
        },
        "required": [
          "path"
        ],
        "title": "ItemView",
        "type": "object"
      },
      "JobRead": {
        "additionalProperties": false,
        "description": "Job as returned by the API, e.g. `GET /jobs/{id}` for status and progress.",
        "properties": {
          "attempts": {
            "title": "Attempts",
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "payload": {
            "additionalProperties": true,
            "title": "Payload",
            "type": "object"
          },
          "progress": {
            "title": "Progress",
            "type": "integer"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "result": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "$ref": "#/components/schemas/JobStatus-Output"
          },
          "type": {
            "$ref": "#/components/schemas/JobType-Output"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "type",
          "status",
          "progress",
          "payload",
          "result",
          "error",
          "attempts",
          "started_at",
          "finished_at",
          "created_at",
          "updated_at"
        ],
        "title": "JobRead",
        "type": "object"
      },
      "JobStatus-Input": {
        "description": "Background job lifecycle state (``job_status`` PG enum).",
        "enum": [
          "queued",
          "running",
          "succeeded",
          "failed",
          "cancelled"
        ],
        "title": "JobStatus",
        "type": "string"
      },
      "JobStatus-Output": {
        "description": "Lifecycle state of a job.",
        "enum": [
          "queued",
          "running",
          "succeeded",
          "failed",
          "cancelled"
        ],
        "title": "JobStatus",
        "type": "string"
      },
      "JobType-Input": {
        "description": "Kind of background job (``job_type`` PG enum).",
        "enum": [
          "scan_source",
          "tile_image",
          "prelabel",
          "export",
          "snapshot",
          "import",
          "thumbnail",
          "rebuild_cache",
          "extract_text"
        ],
        "title": "JobType",
        "type": "string"
      },
      "JobType-Output": {
        "description": "Kind of background work a job performs.",
        "enum": [
          "scan_source",
          "tile_image",
          "prelabel",
          "export",
          "snapshot",
          "import",
          "thumbnail",
          "rebuild_cache",
          "extract_text"
        ],
        "title": "JobType",
        "type": "string"
      },
      "KeypointsShape": {
        "additionalProperties": false,
        "description": "One skeleton instance: `[x, y, v]` per point of the class's skeleton, in\nits order. `v` is COCO visibility: 0 not labelled, 1 occluded, 2 visible.\nThe count is checked against the class's skeleton in `validate_against_schema`.",
        "properties": {
          "attributes": {
            "additionalProperties": true,
            "title": "Attributes",
            "type": "object"
          },
          "class": {
            "title": "Class",
            "type": "string"
          },
          "confidence": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "frame": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Frame"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "keyframe": {
            "default": true,
            "title": "Keyframe",
            "type": "boolean"
          },
          "outside": {
            "default": false,
            "title": "Outside",
            "type": "boolean"
          },
          "page": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page"
          },
          "points": {
            "items": {
              "maxItems": 3,
              "minItems": 3,
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                },
                {
                  "type": "integer"
                }
              ],
              "type": "array"
            },
            "title": "Points",
            "type": "array"
          },
          "track_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Track Id"
          },
          "type": {
            "const": "keypoints",
            "default": "keypoints",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "class",
          "points"
        ],
        "title": "KeypointsShape",
        "type": "object"
      },
      "LabelSchemaDefinition": {
        "additionalProperties": false,
        "description": "The full label schema stored in `label_schema_version.definition`.",
        "properties": {
          "classes": {
            "items": {
              "$ref": "#/components/schemas/ClassDef"
            },
            "title": "Classes",
            "type": "array"
          },
          "classification": {
            "items": {
              "$ref": "#/components/schemas/AttributeDef"
            },
            "title": "Classification",
            "type": "array"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "version",
          "classes"
        ],
        "title": "LabelSchemaDefinition",
        "type": "object"
      },
      "LabelSchemaVersionRead": {
        "additionalProperties": false,
        "description": "One immutable version of a project's label schema (TOOL-4).",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "definition": {
            "additionalProperties": true,
            "title": "Definition",
            "type": "object"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "label_schema_id": {
            "format": "uuid",
            "title": "Label Schema Id",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "label_schema_id",
          "version",
          "definition",
          "created_at"
        ],
        "title": "LabelSchemaVersionRead",
        "type": "object"
      },
      "LicenseInfo": {
        "additionalProperties": false,
        "description": "Licence status as seen by an administrator.\n\n``tier`` is the edition (LIC-32): without a key in force (or with an\ninvalid one) it is ``\"community\"`` and the key's fields are ``None``.\n``seat_limit`` includes the overage and is ``None`` when the build\nenforces no limit (LIC-23, LIC-24).",
        "properties": {
          "active_users": {
            "title": "Active Users",
            "type": "integer"
          },
          "business_features": {
            "items": {
              "type": "string"
            },
            "title": "Business Features",
            "type": "array"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "features": {
            "items": {
              "type": "string"
            },
            "title": "Features",
            "type": "array"
          },
          "grace_ends_at": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Grace Ends At"
          },
          "host_mismatch": {
            "title": "Host Mismatch",
            "type": "boolean"
          },
          "hosts": {
            "items": {
              "type": "string"
            },
            "title": "Hosts",
            "type": "array"
          },
          "license_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "License Id"
          },
          "licensee": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Licensee"
          },
          "owner_only": {
            "title": "Owner Only",
            "type": "boolean"
          },
          "restricted": {
            "title": "Restricted",
            "type": "boolean"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "seat_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seat Limit"
          },
          "seats": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats"
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "tier": {
            "title": "Tier",
            "type": "string"
          },
          "trial_used": {
            "title": "Trial Used",
            "type": "boolean"
          }
        },
        "required": [
          "status",
          "tier",
          "licensee",
          "seats",
          "expires_at",
          "features",
          "business_features",
          "owner_only",
          "trial_used",
          "license_id",
          "source",
          "active_users",
          "seat_limit",
          "grace_ends_at",
          "restricted",
          "hosts",
          "host_mismatch",
          "revoked_at"
        ],
        "title": "LicenseInfo",
        "type": "object"
      },
      "LicenseKeyUpdate": {
        "additionalProperties": false,
        "description": "`PUT /license` body: a key to keep in the database (LIC-26).",
        "properties": {
          "key": {
            "maxLength": 8192,
            "minLength": 1,
            "title": "Key",
            "type": "string"
          }
        },
        "required": [
          "key"
        ],
        "title": "LicenseKeyUpdate",
        "type": "object"
      },
      "LicenseRefreshStatus": {
        "additionalProperties": false,
        "description": "`GET` / `POST /license/refresh` (LIC-27): what is sent, and how the last try went.",
        "properties": {
          "attempted_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attempted At"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "last_payload": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Payload"
          },
          "payload": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payload"
          },
          "server_configured": {
            "title": "Server Configured",
            "type": "boolean"
          },
          "succeeded_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Succeeded At"
          }
        },
        "required": [
          "enabled",
          "server_configured",
          "payload",
          "attempted_at",
          "succeeded_at",
          "error",
          "last_payload"
        ],
        "title": "LicenseRefreshStatus",
        "type": "object"
      },
      "LoginRequest": {
        "additionalProperties": false,
        "description": "Local login credentials (AUTH-2).",
        "properties": {
          "email": {
            "title": "Email",
            "type": "string"
          },
          "otp": {
            "anyOf": [
              {
                "maxLength": 32,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Otp"
          },
          "password": {
            "title": "Password",
            "type": "string"
          }
        },
        "required": [
          "email",
          "password"
        ],
        "title": "LoginRequest",
        "type": "object"
      },
      "MaskRLE": {
        "additionalProperties": false,
        "description": "Uncompressed run-length encoding of a binary mask (COCO-style: alternating\n\nbackground/foreground run lengths, starting with background).",
        "properties": {
          "counts": {
            "items": {
              "type": "integer"
            },
            "title": "Counts",
            "type": "array"
          },
          "size": {
            "maxItems": 2,
            "minItems": 2,
            "prefixItems": [
              {
                "type": "integer"
              },
              {
                "type": "integer"
              }
            ],
            "title": "Size",
            "type": "array"
          }
        },
        "required": [
          "size",
          "counts"
        ],
        "title": "MaskRLE",
        "type": "object"
      },
      "MaskShape": {
        "additionalProperties": false,
        "description": "A pixel mask, encoded as run-length encoding.",
        "properties": {
          "attributes": {
            "additionalProperties": true,
            "title": "Attributes",
            "type": "object"
          },
          "class": {
            "title": "Class",
            "type": "string"
          },
          "confidence": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "frame": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Frame"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "keyframe": {
            "default": true,
            "title": "Keyframe",
            "type": "boolean"
          },
          "outside": {
            "default": false,
            "title": "Outside",
            "type": "boolean"
          },
          "page": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page"
          },
          "rle": {
            "$ref": "#/components/schemas/MaskRLE"
          },
          "track_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Track Id"
          },
          "type": {
            "const": "mask",
            "default": "mask",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "class",
          "rle"
        ],
        "title": "MaskShape",
        "type": "object"
      },
      "MediaType": {
        "description": "Kind of media an item holds.",
        "enum": [
          "image",
          "video",
          "audio",
          "text",
          "pdf",
          "llm",
          "timeseries"
        ],
        "title": "MediaType",
        "type": "string"
      },
      "MemberCreate": {
        "additionalProperties": false,
        "description": "Payload to add a member to a project — owner only.\n\nExactly one of `user_id` / `email` identifies the user to add; the other\nmust be omitted.",
        "properties": {
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "path_prefixes": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Path Prefixes"
          },
          "role": {
            "$ref": "#/components/schemas/ProjectRole"
          },
          "user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          }
        },
        "required": [
          "role"
        ],
        "title": "MemberCreate",
        "type": "object"
      },
      "MemberRead": {
        "additionalProperties": false,
        "description": "A project member, joined with the `user` row for display fields.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "display_name": {
            "title": "Display Name",
            "type": "string"
          },
          "email": {
            "title": "Email",
            "type": "string"
          },
          "path_prefixes": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Path Prefixes"
          },
          "role": {
            "$ref": "#/components/schemas/ProjectRole"
          },
          "source": {
            "default": "manual",
            "enum": [
              "manual",
              "idp"
            ],
            "title": "Source",
            "type": "string"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "user_id",
          "email",
          "display_name",
          "role",
          "created_at"
        ],
        "title": "MemberRead",
        "type": "object"
      },
      "MemberUpdate": {
        "additionalProperties": false,
        "description": "Payload to change a member's role and / or folders — owner only; keys present change.",
        "properties": {
          "path_prefixes": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Path Prefixes"
          },
          "role": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProjectRole"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "MemberUpdate",
        "type": "object"
      },
      "MfaCode": {
        "additionalProperties": false,
        "description": "A six-digit code from the authenticator app, or a recovery code where allowed.",
        "properties": {
          "code": {
            "maxLength": 32,
            "minLength": 1,
            "title": "Code",
            "type": "string"
          }
        },
        "required": [
          "code"
        ],
        "title": "MfaCode",
        "type": "object"
      },
      "MfaRecoveryCodes": {
        "additionalProperties": false,
        "description": "Single-use recovery codes, shown once.",
        "properties": {
          "recovery_codes": {
            "items": {
              "type": "string"
            },
            "title": "Recovery Codes",
            "type": "array"
          }
        },
        "required": [
          "recovery_codes"
        ],
        "title": "MfaRecoveryCodes",
        "type": "object"
      },
      "MfaSetup": {
        "additionalProperties": false,
        "description": "`POST /auth/mfa/setup`: the seed to add to an authenticator app.",
        "properties": {
          "otpauth_uri": {
            "title": "Otpauth Uri",
            "type": "string"
          },
          "secret": {
            "title": "Secret",
            "type": "string"
          }
        },
        "required": [
          "secret",
          "otpauth_uri"
        ],
        "title": "MfaSetup",
        "type": "object"
      },
      "MfaStatus": {
        "additionalProperties": false,
        "description": "`GET /auth/mfa`: the caller's MFA state (AUTH-2).",
        "properties": {
          "available": {
            "title": "Available",
            "type": "boolean"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "pending": {
            "title": "Pending",
            "type": "boolean"
          },
          "recovery_codes_left": {
            "title": "Recovery Codes Left",
            "type": "integer"
          }
        },
        "required": [
          "enabled",
          "pending",
          "recovery_codes_left",
          "available"
        ],
        "title": "MfaStatus",
        "type": "object"
      },
      "MlIdentity": {
        "description": "How the platform authenticates to it.",
        "enum": [
          "none",
          "bearer",
          "basic",
          "service_principal",
          "managed_identity"
        ],
        "title": "MlIdentity",
        "type": "string"
      },
      "MlPlatformCheckResult": {
        "additionalProperties": false,
        "description": "`POST /ml-platforms/{id}/check`: failures are `ok: false`, never an error status.",
        "properties": {
          "info": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Info"
          },
          "messages": {
            "items": {
              "type": "string"
            },
            "title": "Messages",
            "type": "array"
          },
          "ok": {
            "title": "Ok",
            "type": "boolean"
          }
        },
        "required": [
          "ok",
          "messages"
        ],
        "title": "MlPlatformCheckResult",
        "type": "object"
      },
      "MlPlatformCreate": {
        "additionalProperties": false,
        "description": "Register a platform. `secret_ref` is a secret-store reference (AUTH-7).",
        "properties": {
          "config": {
            "additionalProperties": true,
            "title": "Config",
            "type": "object"
          },
          "identity_type": {
            "$ref": "#/components/schemas/MlIdentity"
          },
          "kind": {
            "$ref": "#/components/schemas/MlPlatformKind"
          },
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "secret_ref": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Secret Ref"
          },
          "tracking_uri": {
            "maxLength": 2000,
            "minLength": 1,
            "title": "Tracking Uri",
            "type": "string"
          }
        },
        "required": [
          "name",
          "kind",
          "tracking_uri",
          "identity_type"
        ],
        "title": "MlPlatformCreate",
        "type": "object"
      },
      "MlPlatformKind": {
        "description": "Which MLflow host a platform is. Mirrors `app.models.MlPlatformKind`.",
        "enum": [
          "mlflow",
          "databricks",
          "azureml"
        ],
        "title": "MlPlatformKind",
        "type": "string"
      },
      "MlPlatformRead": {
        "additionalProperties": false,
        "description": "A platform as the API returns it: `secret_ref` never, only `has_secret`.",
        "properties": {
          "config": {
            "additionalProperties": true,
            "title": "Config",
            "type": "object"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "has_secret": {
            "title": "Has Secret",
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "identity_type": {
            "$ref": "#/components/schemas/MlIdentity"
          },
          "kind": {
            "$ref": "#/components/schemas/MlPlatformKind"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "organization_id": {
            "format": "uuid",
            "title": "Organization Id",
            "type": "string"
          },
          "tracking_uri": {
            "title": "Tracking Uri",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "organization_id",
          "name",
          "kind",
          "tracking_uri",
          "identity_type",
          "has_secret",
          "config",
          "created_at",
          "updated_at"
        ],
        "title": "MlPlatformRead",
        "type": "object"
      },
      "MlPlatformUpdate": {
        "additionalProperties": false,
        "description": "Partial update; the merged row is validated as a whole.",
        "properties": {
          "config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config"
          },
          "identity_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MlIdentity"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "secret_ref": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Secret Ref"
          },
          "tracking_uri": {
            "anyOf": [
              {
                "maxLength": 2000,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tracking Uri"
          }
        },
        "title": "MlPlatformUpdate",
        "type": "object"
      },
      "MlRun": {
        "additionalProperties": false,
        "description": "A run the platform started on an ML platform (retrain on Databricks).",
        "properties": {
          "ml_platform_id": {
            "format": "uuid",
            "title": "Ml Platform Id",
            "type": "string"
          },
          "run_id": {
            "title": "Run Id",
            "type": "string"
          },
          "run_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Url"
          }
        },
        "required": [
          "ml_platform_id",
          "run_id",
          "run_url"
        ],
        "title": "MlRun",
        "type": "object"
      },
      "ModelCheckResult": {
        "additionalProperties": false,
        "description": "Result of testing a model endpoint's connectivity (BYOM-3).",
        "properties": {
          "info": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Info"
          },
          "messages": {
            "items": {
              "type": "string"
            },
            "title": "Messages",
            "type": "array"
          },
          "ok": {
            "title": "Ok",
            "type": "boolean"
          }
        },
        "required": [
          "ok",
          "messages"
        ],
        "title": "ModelCheckResult",
        "type": "object"
      },
      "ModelCreate": {
        "additionalProperties": false,
        "description": "Payload to register a new model endpoint.\n\n`secret_ref` is a secret-store reference, never a raw credential\n(SEC/AUTH-7): the key or token for `api_key` / `bearer`, the client\nsecret for `service_principal`, and absent for `none` and\n`managed_identity`. Entra identities also need `identity_config`.",
        "properties": {
          "endpoint_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Endpoint Url"
          },
          "identity_config": {
            "$ref": "#/components/schemas/ModelIdentityConfig"
          },
          "identity_type": {
            "$ref": "#/components/schemas/ModelIdentity",
            "default": "none"
          },
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "secret_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Secret Ref"
          },
          "task": {
            "$ref": "#/components/schemas/ModelTask"
          }
        },
        "required": [
          "name",
          "task"
        ],
        "title": "ModelCreate",
        "type": "object"
      },
      "ModelDerivation": {
        "description": "How a version came from its parent (EXP-8).",
        "enum": [
          "trained",
          "distilled",
          "quantized"
        ],
        "title": "ModelDerivation",
        "type": "string"
      },
      "ModelFamily": {
        "additionalProperties": false,
        "description": "Every version connected to a model's versions through parent links.",
        "properties": {
          "versions": {
            "items": {
              "$ref": "#/components/schemas/ModelFamilyVersion"
            },
            "title": "Versions",
            "type": "array"
          }
        },
        "required": [
          "versions"
        ],
        "title": "ModelFamily",
        "type": "object"
      },
      "ModelFamilyVersion": {
        "additionalProperties": false,
        "description": "A version in a derivation graph, with the model it belongs to (EXP-8).",
        "properties": {
          "class_mapping": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "title": "Class Mapping",
            "type": "object"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "derivation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelDerivation"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "metrics": {
            "additionalProperties": true,
            "title": "Metrics",
            "type": "object"
          },
          "model_id": {
            "format": "uuid",
            "title": "Model Id",
            "type": "string"
          },
          "model_name": {
            "title": "Model Name",
            "type": "string"
          },
          "model_task": {
            "$ref": "#/components/schemas/ModelTask"
          },
          "parent_version_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Version Id"
          },
          "snapshot_digest": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Snapshot Digest"
          },
          "snapshot_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Snapshot Id"
          },
          "training_run": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Training Run"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "model_id",
          "version",
          "class_mapping",
          "metrics",
          "created_at",
          "model_name",
          "model_task"
        ],
        "title": "ModelFamilyVersion",
        "type": "object"
      },
      "ModelIdentity": {
        "description": "How the platform authenticates to a model endpoint (BYOM-3).\n\nKept in sync with `app.services.models.ModelIdentity` by value; the\nschema layer may not import `services/`, so the enum is duplicated here.",
        "enum": [
          "none",
          "api_key",
          "bearer",
          "service_principal",
          "managed_identity"
        ],
        "title": "ModelIdentity",
        "type": "string"
      },
      "ModelIdentityConfig": {
        "additionalProperties": false,
        "description": "The non-secret half of an Entra identity (BYOM-3).\n\n`scope` is the token audience, e.g. `https://ml.azure.com/.default` for an\nAzure ML online endpoint or `https://cognitiveservices.azure.com/.default`\nfor Azure OpenAI / AI Foundry. `tenant_id` and `client_id` name a service\nprincipal; for a managed identity, `client_id` picks a user-assigned one\n(omitted: the system-assigned or workload identity).",
        "properties": {
          "client_id": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Id"
          },
          "scope": {
            "anyOf": [
              {
                "maxLength": 512,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scope"
          },
          "tenant_id": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tenant Id"
          }
        },
        "title": "ModelIdentityConfig",
        "type": "object"
      },
      "ModelRead": {
        "additionalProperties": false,
        "description": "Model as returned by the API; `secret_ref` is never exposed, only its presence.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "endpoint_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Endpoint Url"
          },
          "has_secret": {
            "title": "Has Secret",
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "identity_config": {
            "$ref": "#/components/schemas/ModelIdentityConfig"
          },
          "identity_type": {
            "$ref": "#/components/schemas/ModelIdentity"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "organization_id": {
            "format": "uuid",
            "title": "Organization Id",
            "type": "string"
          },
          "task": {
            "$ref": "#/components/schemas/ModelTask"
          }
        },
        "required": [
          "id",
          "organization_id",
          "name",
          "task",
          "endpoint_url",
          "identity_type",
          "has_secret",
          "identity_config",
          "created_at"
        ],
        "title": "ModelRead",
        "type": "object"
      },
      "ModelTask": {
        "description": "Kind of prediction task a registered model performs.",
        "enum": [
          "detect",
          "segment",
          "classify",
          "ner",
          "llm",
          "ocr"
        ],
        "title": "ModelTask",
        "type": "string"
      },
      "ModelUpdate": {
        "additionalProperties": false,
        "description": "Partial update payload for a model; all fields optional.",
        "properties": {
          "endpoint_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Endpoint Url"
          },
          "identity_config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelIdentityConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "identity_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelIdentity"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "secret_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Secret Ref"
          },
          "task": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelTask"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "ModelUpdate",
        "type": "object"
      },
      "ModelVersionCreate": {
        "additionalProperties": false,
        "description": "Payload to add a version to a model.\n\n`version` defaults to the next integer after the model's current\nhighest version (starting at 1) when omitted.",
        "properties": {
          "class_mapping": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "title": "Class Mapping",
            "type": "object"
          },
          "derivation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelDerivation"
              },
              {
                "type": "null"
              }
            ]
          },
          "metrics": {
            "additionalProperties": true,
            "title": "Metrics",
            "type": "object"
          },
          "parent_version_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Version Id"
          },
          "snapshot_digest": {
            "anyOf": [
              {
                "pattern": "^[0-9a-f]{64}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Snapshot Digest"
          },
          "snapshot_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Snapshot Id"
          },
          "training_run": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Training Run"
          },
          "version": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          }
        },
        "title": "ModelVersionCreate",
        "type": "object"
      },
      "ModelVersionImport": {
        "additionalProperties": false,
        "description": "`POST /models/{id}/versions/import`: a version from an MLflow run.\n\nName the run directly, or a registered model version whose run is read.",
        "properties": {
          "class_mapping": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "title": "Class Mapping",
            "type": "object"
          },
          "ml_platform_id": {
            "format": "uuid",
            "title": "Ml Platform Id",
            "type": "string"
          },
          "model_version": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Version"
          },
          "registered_model": {
            "anyOf": [
              {
                "maxLength": 500,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Registered Model"
          },
          "run_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Id"
          },
          "version": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          }
        },
        "required": [
          "ml_platform_id"
        ],
        "title": "ModelVersionImport",
        "type": "object"
      },
      "ModelVersionRead": {
        "additionalProperties": false,
        "description": "A model version as returned by the API.",
        "properties": {
          "class_mapping": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "title": "Class Mapping",
            "type": "object"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "derivation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelDerivation"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "metrics": {
            "additionalProperties": true,
            "title": "Metrics",
            "type": "object"
          },
          "model_id": {
            "format": "uuid",
            "title": "Model Id",
            "type": "string"
          },
          "parent_version_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Version Id"
          },
          "snapshot_digest": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Snapshot Digest"
          },
          "snapshot_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Snapshot Id"
          },
          "training_run": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Training Run"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "model_id",
          "version",
          "class_mapping",
          "metrics",
          "created_at"
        ],
        "title": "ModelVersionRead",
        "type": "object"
      },
      "NotificationRead": {
        "additionalProperties": false,
        "description": "One notification as returned by the API.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "payload": {
            "additionalProperties": true,
            "title": "Payload",
            "type": "object"
          },
          "read_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Read At"
          },
          "type": {
            "$ref": "#/components/schemas/NotificationType"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "user_id",
          "type",
          "payload",
          "read_at",
          "created_at"
        ],
        "title": "NotificationRead",
        "type": "object"
      },
      "NotificationType": {
        "description": "Mirrors the ``notification_type`` enum in the data model.",
        "enum": [
          "mention",
          "reply",
          "review"
        ],
        "title": "NotificationType",
        "type": "string"
      },
      "OcrRequest": {
        "additionalProperties": false,
        "description": "`POST /items/{id}/ocr`: the words of one page of a scanned PDF.",
        "properties": {
          "model_id": {
            "format": "uuid",
            "title": "Model Id",
            "type": "string"
          },
          "page": {
            "description": "1-based page number",
            "minimum": 1.0,
            "title": "Page",
            "type": "integer"
          }
        },
        "required": [
          "model_id",
          "page"
        ],
        "title": "OcrRequest",
        "type": "object"
      },
      "OcrResult": {
        "additionalProperties": false,
        "description": "The words an `ocr` model read on a page. Nothing is stored.",
        "properties": {
          "engine": {
            "title": "Engine",
            "type": "string"
          },
          "height": {
            "title": "Height",
            "type": "number"
          },
          "page": {
            "title": "Page",
            "type": "integer"
          },
          "width": {
            "title": "Width",
            "type": "number"
          },
          "words": {
            "items": {
              "$ref": "#/components/schemas/OcrWord"
            },
            "title": "Words",
            "type": "array"
          }
        },
        "required": [
          "page",
          "width",
          "height",
          "engine",
          "words"
        ],
        "title": "OcrResult",
        "type": "object"
      },
      "OcrWord": {
        "additionalProperties": false,
        "description": "One word; `bbox` `[x_min, y_min, x_max, y_max]` in the page's points.",
        "properties": {
          "bbox": {
            "maxItems": 4,
            "minItems": 4,
            "prefixItems": [
              {
                "type": "number"
              },
              {
                "type": "number"
              },
              {
                "type": "number"
              },
              {
                "type": "number"
              }
            ],
            "title": "Bbox",
            "type": "array"
          },
          "text": {
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "text",
          "bbox"
        ],
        "title": "OcrWord",
        "type": "object"
      },
      "OidcProviderInfo": {
        "additionalProperties": false,
        "description": "The configured single sign-on provider, as the login page sees it (AUTH-1).",
        "properties": {
          "display_name": {
            "title": "Display Name",
            "type": "string"
          },
          "login_path": {
            "default": "/auth/oidc/login",
            "title": "Login Path",
            "type": "string"
          }
        },
        "required": [
          "display_name"
        ],
        "title": "OidcProviderInfo",
        "type": "object"
      },
      "OrganizationalUseNotice": {
        "description": "Whether this Community install looks like it is being used by an organisation.",
        "properties": {
          "looks_organizational": {
            "title": "Looks Organizational",
            "type": "boolean"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "reasons": {
            "items": {
              "type": "string"
            },
            "title": "Reasons",
            "type": "array"
          }
        },
        "required": [
          "looks_organizational",
          "reasons",
          "message"
        ],
        "title": "OrganizationalUseNotice",
        "type": "object"
      },
      "Page_AuditEventRead_": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AuditEventRead"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items"
        ],
        "title": "Page[AuditEventRead]",
        "type": "object"
      },
      "Page_ConnectorRead_": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ConnectorRead"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items"
        ],
        "title": "Page[ConnectorRead]",
        "type": "object"
      },
      "Page_ItemRead_": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ItemRead"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items"
        ],
        "title": "Page[ItemRead]",
        "type": "object"
      },
      "Page_JobRead_": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/JobRead"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items"
        ],
        "title": "Page[JobRead]",
        "type": "object"
      },
      "Page_MlPlatformRead_": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/MlPlatformRead"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items"
        ],
        "title": "Page[MlPlatformRead]",
        "type": "object"
      },
      "Page_ModelRead_": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ModelRead"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items"
        ],
        "title": "Page[ModelRead]",
        "type": "object"
      },
      "Page_ModelVersionRead_": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ModelVersionRead"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items"
        ],
        "title": "Page[ModelVersionRead]",
        "type": "object"
      },
      "Page_NotificationRead_": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/NotificationRead"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items"
        ],
        "title": "Page[NotificationRead]",
        "type": "object"
      },
      "Page_ProjectRead_": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ProjectRead"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items"
        ],
        "title": "Page[ProjectRead]",
        "type": "object"
      },
      "Page_SnapshotRead_": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SnapshotRead"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items"
        ],
        "title": "Page[SnapshotRead]",
        "type": "object"
      },
      "Page_TaskRead_": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/TaskRead"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items"
        ],
        "title": "Page[TaskRead]",
        "type": "object"
      },
      "Page_WebhookDeliveryRead_": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/WebhookDeliveryRead"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items"
        ],
        "title": "Page[WebhookDeliveryRead]",
        "type": "object"
      },
      "Page_WebhookRead_": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/WebhookRead"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items"
        ],
        "title": "Page[WebhookRead]",
        "type": "object"
      },
      "PairAgreement": {
        "additionalProperties": false,
        "description": "Agreement between one pair of annotators.\n\n`items` is `None` on `ItemAgreement` (one item; the count would always be\n1) and the number of shared items on `ProjectAgreement`.",
        "properties": {
          "a": {
            "format": "uuid",
            "title": "A",
            "type": "string"
          },
          "b": {
            "format": "uuid",
            "title": "B",
            "type": "string"
          },
          "cohen_kappa": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cohen Kappa"
          },
          "items": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Items"
          },
          "mean_iou": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mean Iou"
          },
          "shape_f1": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shape F1"
          },
          "span_f1_exact": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Span F1 Exact"
          },
          "span_f1_overlap": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Span F1 Overlap"
          }
        },
        "required": [
          "a",
          "b",
          "cohen_kappa",
          "mean_iou",
          "shape_f1",
          "span_f1_exact",
          "span_f1_overlap"
        ],
        "title": "PairAgreement",
        "type": "object"
      },
      "PersonalAnnotation": {
        "additionalProperties": false,
        "description": "Metadata only: the result is project content, not personal data.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "item_id": {
            "format": "uuid",
            "title": "Item Id",
            "type": "string"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "item_id",
          "version",
          "status",
          "kind",
          "duration_ms",
          "created_at"
        ],
        "title": "PersonalAnnotation",
        "type": "object"
      },
      "PersonalApiKey": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "title": "Scopes",
            "type": "array"
          }
        },
        "required": [
          "id",
          "name",
          "scopes",
          "created_at",
          "expires_at",
          "last_used_at",
          "revoked_at"
        ],
        "title": "PersonalApiKey",
        "type": "object"
      },
      "PersonalAuditEvent": {
        "additionalProperties": false,
        "properties": {
          "action": {
            "title": "Action",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "ip": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ip"
          },
          "target_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Id"
          },
          "target_type": {
            "title": "Target Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "action",
          "target_type",
          "target_id",
          "ip",
          "created_at"
        ],
        "title": "PersonalAuditEvent",
        "type": "object"
      },
      "PersonalComment": {
        "additionalProperties": false,
        "properties": {
          "annotation_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Annotation Id"
          },
          "body": {
            "title": "Body",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "item_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Item Id"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "resolved_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolved At"
          }
        },
        "required": [
          "id",
          "project_id",
          "item_id",
          "annotation_id",
          "body",
          "created_at",
          "resolved_at"
        ],
        "title": "PersonalComment",
        "type": "object"
      },
      "PersonalDataExport": {
        "additionalProperties": false,
        "description": "Everything the platform holds about one person (SEC-6 access).",
        "properties": {
          "annotations": {
            "items": {
              "$ref": "#/components/schemas/PersonalAnnotation"
            },
            "title": "Annotations",
            "type": "array"
          },
          "api_keys": {
            "items": {
              "$ref": "#/components/schemas/PersonalApiKey"
            },
            "title": "Api Keys",
            "type": "array"
          },
          "audit_events": {
            "items": {
              "$ref": "#/components/schemas/PersonalAuditEvent"
            },
            "title": "Audit Events",
            "type": "array"
          },
          "comments": {
            "items": {
              "$ref": "#/components/schemas/PersonalComment"
            },
            "title": "Comments",
            "type": "array"
          },
          "generated_at": {
            "format": "date-time",
            "title": "Generated At",
            "type": "string"
          },
          "memberships": {
            "items": {
              "$ref": "#/components/schemas/PersonalMembership"
            },
            "title": "Memberships",
            "type": "array"
          },
          "notifications": {
            "items": {
              "$ref": "#/components/schemas/PersonalNotification"
            },
            "title": "Notifications",
            "type": "array"
          },
          "tasks": {
            "items": {
              "$ref": "#/components/schemas/PersonalTask"
            },
            "title": "Tasks",
            "type": "array"
          },
          "user": {
            "$ref": "#/components/schemas/PersonalProfile"
          }
        },
        "required": [
          "generated_at",
          "user"
        ],
        "title": "PersonalDataExport",
        "type": "object"
      },
      "PersonalMembership": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "project_name": {
            "title": "Project Name",
            "type": "string"
          },
          "role": {
            "title": "Role",
            "type": "string"
          }
        },
        "required": [
          "project_id",
          "project_name",
          "role",
          "created_at"
        ],
        "title": "PersonalMembership",
        "type": "object"
      },
      "PersonalNotification": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "payload": {
            "additionalProperties": true,
            "title": "Payload",
            "type": "object"
          },
          "read_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Read At"
          },
          "type": {
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "payload",
          "read_at",
          "created_at"
        ],
        "title": "PersonalNotification",
        "type": "object"
      },
      "PersonalProfile": {
        "additionalProperties": false,
        "description": "The user row without credentials: flags stand in for secrets.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "display_name": {
            "title": "Display Name",
            "type": "string"
          },
          "email": {
            "title": "Email",
            "type": "string"
          },
          "erased_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Erased At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "idp_linked": {
            "title": "Idp Linked",
            "type": "boolean"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "is_service": {
            "title": "Is Service",
            "type": "boolean"
          },
          "is_superuser": {
            "title": "Is Superuser",
            "type": "boolean"
          },
          "last_seen_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Seen At"
          },
          "mfa_enabled": {
            "title": "Mfa Enabled",
            "type": "boolean"
          },
          "organization_id": {
            "format": "uuid",
            "title": "Organization Id",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "organization_id",
          "email",
          "display_name",
          "is_active",
          "is_superuser",
          "is_service",
          "idp_linked",
          "mfa_enabled",
          "last_seen_at",
          "erased_at",
          "created_at",
          "updated_at"
        ],
        "title": "PersonalProfile",
        "type": "object"
      },
      "PersonalTask": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "item_id": {
            "format": "uuid",
            "title": "Item Id",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "type": {
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "item_id",
          "type",
          "status"
        ],
        "title": "PersonalTask",
        "type": "object"
      },
      "PickResolve": {
        "additionalProperties": false,
        "description": "Resolve by copying one annotator's submitted consensus version verbatim.",
        "properties": {
          "annotation_id": {
            "format": "uuid",
            "title": "Annotation Id",
            "type": "string"
          },
          "method": {
            "const": "pick",
            "default": "pick",
            "title": "Method",
            "type": "string"
          }
        },
        "required": [
          "annotation_id"
        ],
        "title": "PickResolve",
        "type": "object"
      },
      "PointShape": {
        "additionalProperties": false,
        "description": "A single labelled point.",
        "properties": {
          "attributes": {
            "additionalProperties": true,
            "title": "Attributes",
            "type": "object"
          },
          "class": {
            "title": "Class",
            "type": "string"
          },
          "confidence": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "frame": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Frame"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "keyframe": {
            "default": true,
            "title": "Keyframe",
            "type": "boolean"
          },
          "outside": {
            "default": false,
            "title": "Outside",
            "type": "boolean"
          },
          "page": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page"
          },
          "point": {
            "maxItems": 2,
            "minItems": 2,
            "prefixItems": [
              {
                "type": "number"
              },
              {
                "type": "number"
              }
            ],
            "title": "Point",
            "type": "array"
          },
          "track_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Track Id"
          },
          "type": {
            "const": "point",
            "default": "point",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "class",
          "point"
        ],
        "title": "PointShape",
        "type": "object"
      },
      "PolygonShape": {
        "additionalProperties": false,
        "description": "Closed region: `points` is an open polygon (first point not repeated at the end).",
        "properties": {
          "attributes": {
            "additionalProperties": true,
            "title": "Attributes",
            "type": "object"
          },
          "class": {
            "title": "Class",
            "type": "string"
          },
          "confidence": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "frame": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Frame"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "keyframe": {
            "default": true,
            "title": "Keyframe",
            "type": "boolean"
          },
          "outside": {
            "default": false,
            "title": "Outside",
            "type": "boolean"
          },
          "page": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page"
          },
          "points": {
            "items": {
              "maxItems": 2,
              "minItems": 2,
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "type": "array"
            },
            "title": "Points",
            "type": "array"
          },
          "track_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Track Id"
          },
          "type": {
            "const": "polygon",
            "default": "polygon",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "class",
          "points"
        ],
        "title": "PolygonShape",
        "type": "object"
      },
      "PolylineShape": {
        "additionalProperties": false,
        "description": "Open path of at least two points.",
        "properties": {
          "attributes": {
            "additionalProperties": true,
            "title": "Attributes",
            "type": "object"
          },
          "class": {
            "title": "Class",
            "type": "string"
          },
          "confidence": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "frame": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Frame"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "keyframe": {
            "default": true,
            "title": "Keyframe",
            "type": "boolean"
          },
          "outside": {
            "default": false,
            "title": "Outside",
            "type": "boolean"
          },
          "page": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page"
          },
          "points": {
            "items": {
              "maxItems": 2,
              "minItems": 2,
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "type": "array"
            },
            "title": "Points",
            "type": "array"
          },
          "track_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Track Id"
          },
          "type": {
            "const": "polyline",
            "default": "polyline",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "class",
          "points"
        ],
        "title": "PolylineShape",
        "type": "object"
      },
      "PrelabelCreate": {
        "description": "An external producer's pre-label (API-8): a model-authored draft.",
        "properties": {
          "label_schema_version_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label Schema Version Id"
          },
          "model_version_id": {
            "format": "uuid",
            "title": "Model Version Id",
            "type": "string"
          },
          "result": {
            "$ref": "#/components/schemas/AnnotationResult"
          }
        },
        "required": [
          "model_version_id",
          "result"
        ],
        "title": "PrelabelCreate",
        "type": "object"
      },
      "PrelabelFilter": {
        "additionalProperties": false,
        "description": "Which items a pre-labelling job covers (ML-2).\n\nDefaults to the items a customer would normally want touched: unstarted\nand previously pre-labelled ones. Items with a human annotation version\nare never selected, whichever statuses are listed here (ML-10).",
        "properties": {
          "item_status": {
            "items": {
              "$ref": "#/components/schemas/app__schemas__item__ItemStatus"
            },
            "title": "Item Status",
            "type": "array"
          },
          "path_prefix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Path Prefix"
          }
        },
        "title": "PrelabelFilter",
        "type": "object"
      },
      "PrelabelRequest": {
        "additionalProperties": false,
        "description": "Body for queuing a pre-labelling job (ML-2).\n\n`limit` caps how many items are sent to the model in this run — a dry\nrun over a handful of items before committing to the whole project\n(BYOM-7).",
        "properties": {
          "confidence_threshold": {
            "default": 0.0,
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Confidence Threshold",
            "type": "number"
          },
          "filter": {
            "$ref": "#/components/schemas/PrelabelFilter"
          },
          "label_schema_version_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label Schema Version Id"
          },
          "limit": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit"
          },
          "model_version_id": {
            "format": "uuid",
            "title": "Model Version Id",
            "type": "string"
          },
          "prioritize_uncertain": {
            "default": false,
            "title": "Prioritize Uncertain",
            "type": "boolean"
          }
        },
        "required": [
          "model_version_id"
        ],
        "title": "PrelabelRequest",
        "type": "object"
      },
      "ProjectAgreement": {
        "additionalProperties": false,
        "description": "Project-wide inter-annotator agreement (`GET /projects/{id}/agreement`, QA-2).",
        "properties": {
          "annotators": {
            "items": {
              "$ref": "#/components/schemas/AgreementAnnotator"
            },
            "title": "Annotators",
            "type": "array"
          },
          "classification": {
            "items": {
              "$ref": "#/components/schemas/ClassificationAgreement"
            },
            "title": "Classification",
            "type": "array"
          },
          "items": {
            "title": "Items",
            "type": "integer"
          },
          "pairs": {
            "items": {
              "$ref": "#/components/schemas/PairAgreement"
            },
            "title": "Pairs",
            "type": "array"
          },
          "shapes": {
            "$ref": "#/components/schemas/ShapeAgreement"
          },
          "spans": {
            "$ref": "#/components/schemas/SpanAgreement"
          }
        },
        "required": [
          "shapes",
          "spans",
          "items"
        ],
        "title": "ProjectAgreement",
        "type": "object"
      },
      "ProjectCreate": {
        "additionalProperties": false,
        "description": "Payload to create a new project (organization id comes from the auth context).",
        "properties": {
          "cache_connector_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Connector Id"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "label_schema_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label Schema Id"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "result_connector_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result Connector Id"
          },
          "settings": {
            "additionalProperties": true,
            "title": "Settings",
            "type": "object"
          },
          "source_connector_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Connector Id"
          },
          "source_glob": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Glob"
          },
          "source_prefix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Prefix"
          },
          "workflow": {
            "$ref": "#/components/schemas/WorkflowConfig"
          }
        },
        "required": [
          "name"
        ],
        "title": "ProjectCreate",
        "type": "object"
      },
      "ProjectRead": {
        "additionalProperties": false,
        "description": "Project as returned by the API.",
        "properties": {
          "cache_connector_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Connector Id"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "label_schema_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label Schema Id"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "organization_id": {
            "format": "uuid",
            "title": "Organization Id",
            "type": "string"
          },
          "result_connector_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result Connector Id"
          },
          "settings": {
            "additionalProperties": true,
            "title": "Settings",
            "type": "object"
          },
          "source_connector_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Connector Id"
          },
          "source_glob": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Glob"
          },
          "source_prefix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Prefix"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "workflow": {
            "$ref": "#/components/schemas/WorkflowConfig"
          }
        },
        "required": [
          "id",
          "organization_id",
          "name",
          "description",
          "label_schema_id",
          "source_connector_id",
          "result_connector_id",
          "cache_connector_id",
          "source_prefix",
          "source_glob",
          "workflow",
          "settings",
          "created_at",
          "updated_at"
        ],
        "title": "ProjectRead",
        "type": "object"
      },
      "ProjectRole": {
        "description": "A user's role on a single project (mirrors `app.models.ProjectRole`).",
        "enum": [
          "owner",
          "annotator",
          "reviewer",
          "viewer"
        ],
        "title": "ProjectRole",
        "type": "string"
      },
      "ProjectStats": {
        "additionalProperties": false,
        "properties": {
          "annotations": {
            "$ref": "#/components/schemas/AnnotationStats"
          },
          "annotators": {
            "items": {
              "$ref": "#/components/schemas/AnnotatorStats"
            },
            "title": "Annotators",
            "type": "array"
          },
          "classes": {
            "items": {
              "$ref": "#/components/schemas/ClassCount"
            },
            "title": "Classes",
            "type": "array"
          },
          "items": {
            "$ref": "#/components/schemas/ItemStats"
          },
          "review": {
            "$ref": "#/components/schemas/ReviewStats"
          },
          "tasks": {
            "$ref": "#/components/schemas/TaskStats"
          },
          "throughput": {
            "items": {
              "$ref": "#/components/schemas/ThroughputDay"
            },
            "title": "Throughput",
            "type": "array"
          }
        },
        "required": [
          "items",
          "tasks",
          "annotations",
          "review",
          "throughput",
          "classes",
          "annotators"
        ],
        "title": "ProjectStats",
        "type": "object"
      },
      "ProjectUpdate": {
        "additionalProperties": false,
        "description": "Partial update payload for a project; all fields optional.",
        "properties": {
          "cache_connector_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Connector Id"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "label_schema_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label Schema Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "result_connector_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result Connector Id"
          },
          "settings": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Settings"
          },
          "source_connector_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Connector Id"
          },
          "source_glob": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Glob"
          },
          "source_prefix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Prefix"
          },
          "workflow": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WorkflowConfig"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "ProjectUpdate",
        "type": "object"
      },
      "RBoxShape": {
        "additionalProperties": false,
        "description": "Rotated box: `center` `[cx, cy]`, `size` `[w, h]` and `angle` in degrees.\n\nClockwise-positive because image y points down; `w` runs along the\nrotated x axis. Corners are derived, see `corners()`.",
        "properties": {
          "angle": {
            "title": "Angle",
            "type": "number"
          },
          "attributes": {
            "additionalProperties": true,
            "title": "Attributes",
            "type": "object"
          },
          "center": {
            "maxItems": 2,
            "minItems": 2,
            "prefixItems": [
              {
                "type": "number"
              },
              {
                "type": "number"
              }
            ],
            "title": "Center",
            "type": "array"
          },
          "class": {
            "title": "Class",
            "type": "string"
          },
          "confidence": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "frame": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Frame"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "keyframe": {
            "default": true,
            "title": "Keyframe",
            "type": "boolean"
          },
          "outside": {
            "default": false,
            "title": "Outside",
            "type": "boolean"
          },
          "page": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page"
          },
          "size": {
            "maxItems": 2,
            "minItems": 2,
            "prefixItems": [
              {
                "type": "number"
              },
              {
                "type": "number"
              }
            ],
            "title": "Size",
            "type": "array"
          },
          "track_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Track Id"
          },
          "type": {
            "const": "rbox",
            "default": "rbox",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "class",
          "center",
          "size",
          "angle"
        ],
        "title": "RBoxShape",
        "type": "object"
      },
      "RankingShape": {
        "additionalProperties": false,
        "description": "Responses of an `llm` item ranked best first (§5 LLM-data); two make a preference.",
        "properties": {
          "attributes": {
            "additionalProperties": true,
            "title": "Attributes",
            "type": "object"
          },
          "class": {
            "title": "Class",
            "type": "string"
          },
          "confidence": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "frame": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Frame"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "keyframe": {
            "default": true,
            "title": "Keyframe",
            "type": "boolean"
          },
          "order": {
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "title": "Order",
            "type": "array"
          },
          "outside": {
            "default": false,
            "title": "Outside",
            "type": "boolean"
          },
          "page": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page"
          },
          "track_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Track Id"
          },
          "type": {
            "const": "ranking",
            "default": "ranking",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "class",
          "order"
        ],
        "title": "RankingShape",
        "type": "object"
      },
      "RatingShape": {
        "additionalProperties": false,
        "description": "A score on the class's scale for one response, one turn or the conversation.",
        "properties": {
          "attributes": {
            "additionalProperties": true,
            "title": "Attributes",
            "type": "object"
          },
          "class": {
            "title": "Class",
            "type": "string"
          },
          "confidence": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "frame": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Frame"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "keyframe": {
            "default": true,
            "title": "Keyframe",
            "type": "boolean"
          },
          "outside": {
            "default": false,
            "title": "Outside",
            "type": "boolean"
          },
          "page": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page"
          },
          "target": {
            "pattern": "^(response:.+|message:(0|[1-9][0-9]*)|conversation)$",
            "title": "Target",
            "type": "string"
          },
          "track_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Track Id"
          },
          "type": {
            "const": "rating",
            "default": "rating",
            "title": "Type",
            "type": "string"
          },
          "value": {
            "title": "Value",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "class",
          "target",
          "value"
        ],
        "title": "RatingShape",
        "type": "object"
      },
      "ReadyResponse": {
        "properties": {
          "checks": {
            "additionalProperties": {
              "$ref": "#/components/schemas/DependencyStatus"
            },
            "title": "Checks",
            "type": "object"
          },
          "status": {
            "enum": [
              "ready",
              "degraded"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status",
          "checks"
        ],
        "title": "ReadyResponse",
        "type": "object"
      },
      "RejectionTarget": {
        "description": "Who gets the annotate task a rejection opens (WF-1).",
        "enum": [
          "same_annotator",
          "queue"
        ],
        "title": "RejectionTarget",
        "type": "string"
      },
      "RelationShape": {
        "additionalProperties": false,
        "description": "A directed relation between two other shapes of the same result (TOOL).\n\n`from` / `to` are shape ids; both must exist in the result, differ from\neach other, and not be relations themselves.",
        "properties": {
          "attributes": {
            "additionalProperties": true,
            "title": "Attributes",
            "type": "object"
          },
          "class": {
            "title": "Class",
            "type": "string"
          },
          "confidence": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "frame": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Frame"
          },
          "from": {
            "format": "uuid",
            "title": "From",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "keyframe": {
            "default": true,
            "title": "Keyframe",
            "type": "boolean"
          },
          "outside": {
            "default": false,
            "title": "Outside",
            "type": "boolean"
          },
          "page": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page"
          },
          "to": {
            "format": "uuid",
            "title": "To",
            "type": "string"
          },
          "track_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Track Id"
          },
          "type": {
            "const": "relation",
            "default": "relation",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "class",
          "from",
          "to"
        ],
        "title": "RelationShape",
        "type": "object"
      },
      "RetrainRequest": {
        "additionalProperties": false,
        "description": "`POST /projects/{id}/retrain` (ML-9): ask subscribers to train.\n\nEverything is optional context for the training pipeline; the platform\ndoes not train anything itself.",
        "properties": {
          "ml_platform_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ml Platform Id"
          },
          "model_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Id"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 1000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "snapshot_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Snapshot Id"
          }
        },
        "title": "RetrainRequest",
        "type": "object"
      },
      "RetrainResult": {
        "additionalProperties": false,
        "description": "How many webhook deliveries the request queued, and the job run it started.",
        "properties": {
          "deliveries": {
            "title": "Deliveries",
            "type": "integer"
          },
          "event": {
            "title": "Event",
            "type": "string"
          },
          "ml_run": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MlRun"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "event",
          "deliveries"
        ],
        "title": "RetrainResult",
        "type": "object"
      },
      "ReviewMode": {
        "description": "Whether submitted work goes through a reviewer (WF-1).",
        "enum": [
          "required",
          "none",
          "sampled"
        ],
        "title": "ReviewMode",
        "type": "string"
      },
      "ReviewRequest": {
        "description": "A reviewer's verdict on a submitted annotation (WF-4).",
        "properties": {
          "approve": {
            "title": "Approve",
            "type": "boolean"
          },
          "comment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Comment"
          },
          "corrected_result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AnnotationResult"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "approve"
        ],
        "title": "ReviewRequest",
        "type": "object"
      },
      "ReviewStats": {
        "additionalProperties": false,
        "properties": {
          "approved": {
            "title": "Approved",
            "type": "integer"
          },
          "rejected": {
            "title": "Rejected",
            "type": "integer"
          },
          "rejection_rate": {
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Rejection Rate",
            "type": "number"
          }
        },
        "required": [
          "approved",
          "rejected",
          "rejection_rate"
        ],
        "title": "ReviewStats",
        "type": "object"
      },
      "ScaleDef": {
        "additionalProperties": false,
        "description": "The integer scale of a `rating` class, e.g. 1-5 with named ends (§5 LLM-data).",
        "properties": {
          "labels": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Labels",
            "type": "object"
          },
          "max": {
            "title": "Max",
            "type": "integer"
          },
          "min": {
            "title": "Min",
            "type": "integer"
          }
        },
        "required": [
          "min",
          "max"
        ],
        "title": "ScaleDef",
        "type": "object"
      },
      "ScanRequest": {
        "additionalProperties": false,
        "description": "Body for queuing a source-scan job (SRC-2).\n\nBoth fields are optional overrides of the project's own `source_prefix`\n/ `source_glob`; an empty body scans with the project's defaults.",
        "properties": {
          "glob": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Glob"
          },
          "prefix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prefix"
          }
        },
        "title": "ScanRequest",
        "type": "object"
      },
      "ScimTokenRead": {
        "additionalProperties": false,
        "description": "A freshly minted SCIM token, shown once, and the SCIM base path.",
        "properties": {
          "path": {
            "title": "Path",
            "type": "string"
          },
          "token": {
            "title": "Token",
            "type": "string"
          }
        },
        "required": [
          "token",
          "path"
        ],
        "title": "ScimTokenRead",
        "type": "object"
      },
      "ScimTokenState": {
        "additionalProperties": false,
        "properties": {
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          }
        },
        "required": [
          "enabled"
        ],
        "title": "ScimTokenState",
        "type": "object"
      },
      "SeatReport": {
        "additionalProperties": false,
        "description": "`GET /license/seat-report`: distinct active users per month for true-up (LIC-30).\n\nOverage is measured against the licence in force now. Not signed; the\nlicence terms back it.",
        "properties": {
          "end": {
            "format": "date",
            "title": "End",
            "type": "string"
          },
          "generated_at": {
            "format": "date-time",
            "title": "Generated At",
            "type": "string"
          },
          "install_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Install Id"
          },
          "license_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "License Id"
          },
          "licensee": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Licensee"
          },
          "peak_active_users": {
            "title": "Peak Active Users",
            "type": "integer"
          },
          "peak_overage": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Peak Overage"
          },
          "periods": {
            "items": {
              "$ref": "#/components/schemas/SeatReportPeriod"
            },
            "title": "Periods",
            "type": "array"
          },
          "seat_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seat Limit"
          },
          "seats": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats"
          },
          "start": {
            "format": "date",
            "title": "Start",
            "type": "string"
          },
          "tier": {
            "title": "Tier",
            "type": "string"
          }
        },
        "required": [
          "generated_at",
          "install_id",
          "license_id",
          "licensee",
          "tier",
          "seats",
          "seat_limit",
          "start",
          "end",
          "peak_active_users",
          "peak_overage",
          "periods"
        ],
        "title": "SeatReport",
        "type": "object"
      },
      "SeatReportPeriod": {
        "additionalProperties": false,
        "description": "Seat use in one calendar month, clipped to the report range (LIC-30).",
        "properties": {
          "active_users": {
            "title": "Active Users",
            "type": "integer"
          },
          "end": {
            "format": "date",
            "title": "End",
            "type": "string"
          },
          "overage": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Overage"
          },
          "peak_active_users": {
            "title": "Peak Active Users",
            "type": "integer"
          },
          "peak_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Peak At"
          },
          "start": {
            "format": "date",
            "title": "Start",
            "type": "string"
          }
        },
        "required": [
          "start",
          "end",
          "active_users",
          "peak_active_users",
          "peak_at",
          "overage"
        ],
        "title": "SeatReportPeriod",
        "type": "object"
      },
      "SegmentShape": {
        "additionalProperties": false,
        "description": "An interval on an `audio` or `timeseries` item's time axis (§5).\n\nAudio: integer milliseconds, with an optional `speaker` and transcript\n`text`. Time series: positions on the CSV's time axis, optionally limited\nto some `channels`. The media-specific rules are in `AnnotationResult`.",
        "properties": {
          "attributes": {
            "additionalProperties": true,
            "title": "Attributes",
            "type": "object"
          },
          "channels": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channels"
          },
          "class": {
            "title": "Class",
            "type": "string"
          },
          "confidence": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "end": {
            "title": "End",
            "type": "number"
          },
          "frame": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Frame"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "keyframe": {
            "default": true,
            "title": "Keyframe",
            "type": "boolean"
          },
          "outside": {
            "default": false,
            "title": "Outside",
            "type": "boolean"
          },
          "page": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page"
          },
          "speaker": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Speaker"
          },
          "start": {
            "minimum": 0.0,
            "title": "Start",
            "type": "number"
          },
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text"
          },
          "track_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Track Id"
          },
          "type": {
            "const": "segment",
            "default": "segment",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "class",
          "start",
          "end"
        ],
        "title": "SegmentShape",
        "type": "object"
      },
      "ServiceAccountCreate": {
        "additionalProperties": false,
        "description": "Payload to create a service account (AUTH-4); the e-mail is synthetic.",
        "properties": {
          "display_name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Display Name",
            "type": "string"
          }
        },
        "required": [
          "display_name"
        ],
        "title": "ServiceAccountCreate",
        "type": "object"
      },
      "ShapeAgreement": {
        "additionalProperties": false,
        "description": "Pooled shape agreement: mean IoU of matched pairs and shape-F1 (QA-2).",
        "properties": {
          "envelope_iou": {
            "default": true,
            "title": "Envelope Iou",
            "type": "boolean"
          },
          "f1": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "F1"
          },
          "iou_threshold": {
            "title": "Iou Threshold",
            "type": "number"
          },
          "mean_iou": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mean Iou"
          }
        },
        "required": [
          "mean_iou",
          "f1",
          "iou_threshold"
        ],
        "title": "ShapeAgreement",
        "type": "object"
      },
      "SkeletonDef": {
        "additionalProperties": false,
        "description": "Named keypoints of a `keypoints` class and the bones between them (TOOL).\n\nThe order of `points` is the order a `keypoints` shape stores them in.\n`edges` are 0-based index pairs into `points`.",
        "properties": {
          "edges": {
            "items": {
              "maxItems": 2,
              "minItems": 2,
              "prefixItems": [
                {
                  "type": "integer"
                },
                {
                  "type": "integer"
                }
              ],
              "type": "array"
            },
            "title": "Edges",
            "type": "array"
          },
          "points": {
            "items": {
              "type": "string"
            },
            "title": "Points",
            "type": "array"
          }
        },
        "required": [
          "points"
        ],
        "title": "SkeletonDef",
        "type": "object"
      },
      "SkipRequest": {
        "description": "Payload for `POST /items/{item_id}/skip`; a reason is mandatory (TOOL-6).",
        "properties": {
          "reason": {
            "description": "Why this item is being skipped",
            "minLength": 1,
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "reason"
        ],
        "title": "SkipRequest",
        "type": "object"
      },
      "SnapshotCreate": {
        "additionalProperties": false,
        "description": "Body for `POST /projects/{id}/snapshots`. Queues a snapshot job.\n\n`filter` is a dataset filter (`services/datasets.py::DatasetFilter`,\ndocumented in CONTRACTS.md → snapshot); empty freezes every annotated\nitem at its latest version.",
        "properties": {
          "filter": {
            "additionalProperties": true,
            "title": "Filter",
            "type": "object"
          },
          "label_schema_version_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label Schema Version Id"
          },
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "split": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Split"
          }
        },
        "required": [
          "name"
        ],
        "title": "SnapshotCreate",
        "type": "object"
      },
      "SnapshotDiff": {
        "additionalProperties": false,
        "description": "`GET /projects/{id}/snapshots/{base}/diff/{target}` (EXP-4).",
        "properties": {
          "added": {
            "items": {
              "$ref": "#/components/schemas/SnapshotDiffEntry"
            },
            "title": "Added",
            "type": "array"
          },
          "base": {
            "$ref": "#/components/schemas/SnapshotDiffSide"
          },
          "changed": {
            "items": {
              "$ref": "#/components/schemas/SnapshotDiffChanged"
            },
            "title": "Changed",
            "type": "array"
          },
          "classes": {
            "items": {
              "$ref": "#/components/schemas/SnapshotDiffClass"
            },
            "title": "Classes",
            "type": "array"
          },
          "items": {
            "$ref": "#/components/schemas/SnapshotDiffItems"
          },
          "removed": {
            "items": {
              "$ref": "#/components/schemas/SnapshotDiffEntry"
            },
            "title": "Removed",
            "type": "array"
          },
          "target": {
            "$ref": "#/components/schemas/SnapshotDiffSide"
          },
          "truncated": {
            "title": "Truncated",
            "type": "boolean"
          }
        },
        "required": [
          "base",
          "target",
          "items",
          "added",
          "removed",
          "changed",
          "classes",
          "truncated"
        ],
        "title": "SnapshotDiff",
        "type": "object"
      },
      "SnapshotDiffChanged": {
        "additionalProperties": false,
        "description": "An item frozen at different annotation versions on the two sides.",
        "properties": {
          "from_version": {
            "title": "From Version",
            "type": "integer"
          },
          "item_id": {
            "format": "uuid",
            "title": "Item Id",
            "type": "string"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "shapes": {
            "additionalProperties": {
              "type": "integer"
            },
            "title": "Shapes",
            "type": "object"
          },
          "to_version": {
            "title": "To Version",
            "type": "integer"
          }
        },
        "required": [
          "item_id",
          "path",
          "from_version",
          "to_version",
          "shapes"
        ],
        "title": "SnapshotDiffChanged",
        "type": "object"
      },
      "SnapshotDiffClass": {
        "additionalProperties": false,
        "description": "Shape count per class on each side; `delta` is target minus base.",
        "properties": {
          "base": {
            "title": "Base",
            "type": "integer"
          },
          "delta": {
            "title": "Delta",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "target": {
            "title": "Target",
            "type": "integer"
          }
        },
        "required": [
          "name",
          "base",
          "target",
          "delta"
        ],
        "title": "SnapshotDiffClass",
        "type": "object"
      },
      "SnapshotDiffEntry": {
        "additionalProperties": false,
        "description": "An item present on only one side.",
        "properties": {
          "item_id": {
            "format": "uuid",
            "title": "Item Id",
            "type": "string"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "split": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Split"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "item_id",
          "path",
          "version"
        ],
        "title": "SnapshotDiffEntry",
        "type": "object"
      },
      "SnapshotDiffItems": {
        "additionalProperties": false,
        "description": "Item-level totals; complete even when the lists below are truncated.",
        "properties": {
          "added": {
            "title": "Added",
            "type": "integer"
          },
          "changed": {
            "title": "Changed",
            "type": "integer"
          },
          "removed": {
            "title": "Removed",
            "type": "integer"
          },
          "split_moved": {
            "title": "Split Moved",
            "type": "integer"
          },
          "unchanged": {
            "title": "Unchanged",
            "type": "integer"
          }
        },
        "required": [
          "added",
          "removed",
          "changed",
          "unchanged",
          "split_moved"
        ],
        "title": "SnapshotDiffItems",
        "type": "object"
      },
      "SnapshotDiffSide": {
        "additionalProperties": false,
        "description": "One of the two snapshots being compared.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "digest": {
            "title": "Digest",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "item_count": {
            "title": "Item Count",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "split_counts": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "integer"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Split Counts"
          }
        },
        "required": [
          "id",
          "name",
          "item_count",
          "digest",
          "created_at"
        ],
        "title": "SnapshotDiffSide",
        "type": "object"
      },
      "SnapshotLineage": {
        "additionalProperties": false,
        "description": "`GET /projects/{id}/snapshots/{sid}/lineage` (EXP-8).",
        "properties": {
          "snapshot": {
            "$ref": "#/components/schemas/SnapshotLineageSnapshot"
          },
          "versions": {
            "items": {
              "$ref": "#/components/schemas/SnapshotLineageVersion"
            },
            "title": "Versions",
            "type": "array"
          }
        },
        "required": [
          "snapshot",
          "versions"
        ],
        "title": "SnapshotLineage",
        "type": "object"
      },
      "SnapshotLineageSnapshot": {
        "additionalProperties": false,
        "description": "The snapshot side of a lineage answer.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "digest": {
            "title": "Digest",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "item_count": {
            "title": "Item Count",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "digest",
          "item_count",
          "created_at"
        ],
        "title": "SnapshotLineageSnapshot",
        "type": "object"
      },
      "SnapshotLineageVersion": {
        "additionalProperties": false,
        "description": "A model version trained on the snapshot, with its downstream footprint.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "items_predicted": {
            "title": "Items Predicted",
            "type": "integer"
          },
          "model_id": {
            "format": "uuid",
            "title": "Model Id",
            "type": "string"
          },
          "model_name": {
            "title": "Model Name",
            "type": "string"
          },
          "snapshot_digest": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Snapshot Digest"
          },
          "training_run": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Training Run"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "model_id",
          "model_name",
          "version",
          "snapshot_digest",
          "training_run",
          "created_at",
          "items_predicted"
        ],
        "title": "SnapshotLineageVersion",
        "type": "object"
      },
      "SnapshotPublishRequest": {
        "additionalProperties": false,
        "description": "`POST /projects/{id}/snapshots/{sid}/mlflow`.",
        "properties": {
          "experiment": {
            "anyOf": [
              {
                "maxLength": 500,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Experiment"
          },
          "ml_platform_id": {
            "format": "uuid",
            "title": "Ml Platform Id",
            "type": "string"
          }
        },
        "required": [
          "ml_platform_id"
        ],
        "title": "SnapshotPublishRequest",
        "type": "object"
      },
      "SnapshotPublishResult": {
        "additionalProperties": false,
        "description": "The MLflow run that stands for the snapshot.",
        "properties": {
          "created": {
            "title": "Created",
            "type": "boolean"
          },
          "experiment_id": {
            "title": "Experiment Id",
            "type": "string"
          },
          "experiment_name": {
            "title": "Experiment Name",
            "type": "string"
          },
          "ml_platform_id": {
            "format": "uuid",
            "title": "Ml Platform Id",
            "type": "string"
          },
          "run_id": {
            "title": "Run Id",
            "type": "string"
          },
          "run_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Url"
          }
        },
        "required": [
          "ml_platform_id",
          "experiment_id",
          "experiment_name",
          "run_id",
          "run_url",
          "created"
        ],
        "title": "SnapshotPublishResult",
        "type": "object"
      },
      "SnapshotRead": {
        "additionalProperties": false,
        "description": "A frozen, immutable dataset (EXP-1) as returned by the API.",
        "properties": {
          "blob_path": {
            "title": "Blob Path",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_id": {
            "format": "uuid",
            "title": "Created By Id",
            "type": "string"
          },
          "digest": {
            "title": "Digest",
            "type": "string"
          },
          "filter": {
            "additionalProperties": true,
            "title": "Filter",
            "type": "object"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "item_count": {
            "title": "Item Count",
            "type": "integer"
          },
          "label_schema_version_id": {
            "format": "uuid",
            "title": "Label Schema Version Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "split": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Split"
          }
        },
        "required": [
          "id",
          "project_id",
          "name",
          "filter",
          "label_schema_version_id",
          "item_count",
          "blob_path",
          "digest",
          "created_by_id",
          "created_at"
        ],
        "title": "SnapshotRead",
        "type": "object"
      },
      "SpanAgreement": {
        "additionalProperties": false,
        "description": "Pooled span agreement: exact and overlap F1 (QA-2).",
        "properties": {
          "f1_exact": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "F1 Exact"
          },
          "f1_overlap": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "F1 Overlap"
          }
        },
        "required": [
          "f1_exact",
          "f1_overlap"
        ],
        "title": "SpanAgreement",
        "type": "object"
      },
      "SpanShape": {
        "additionalProperties": false,
        "description": "An entity span (TOOL).\n\nOn a text item, `[start, end)` in Unicode code points of the item's text.\nOn a pdf item, `boxes` on `page` — one per line, in PDF points — and the\nspan covers the words whose centres fall inside them (CONTRACTS.md *PDF\nitems*). Exactly one of the two anchors is set; which one the media type\ntakes is checked by `AnnotationResult`. Spans may overlap or nest. `text`\nis the covered text, informational only — the server cannot check it\nwithout reading the media.",
        "properties": {
          "attributes": {
            "additionalProperties": true,
            "title": "Attributes",
            "type": "object"
          },
          "boxes": {
            "anyOf": [
              {
                "items": {
                  "maxItems": 4,
                  "minItems": 4,
                  "prefixItems": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "number"
                    }
                  ],
                  "type": "array"
                },
                "maxItems": 256,
                "minItems": 1,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Boxes"
          },
          "class": {
            "title": "Class",
            "type": "string"
          },
          "confidence": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "end": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "End"
          },
          "frame": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Frame"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "keyframe": {
            "default": true,
            "title": "Keyframe",
            "type": "boolean"
          },
          "outside": {
            "default": false,
            "title": "Outside",
            "type": "boolean"
          },
          "page": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page"
          },
          "start": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start"
          },
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text"
          },
          "track_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Track Id"
          },
          "type": {
            "const": "span",
            "default": "span",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "class"
        ],
        "title": "SpanShape",
        "type": "object"
      },
      "SplitGrid": {
        "additionalProperties": false,
        "description": "Split an image into `rows` x `cols` equal cells, 1-16 each.\n\nCells extend by `overlap_px` on their *inner* edges only (an edge cell's\nouter border stays at the image edge), then are clipped to the image.",
        "properties": {
          "cols": {
            "maximum": 16.0,
            "minimum": 1.0,
            "title": "Cols",
            "type": "integer"
          },
          "overlap_px": {
            "default": 0,
            "minimum": 0.0,
            "title": "Overlap Px",
            "type": "number"
          },
          "rows": {
            "maximum": 16.0,
            "minimum": 1.0,
            "title": "Rows",
            "type": "integer"
          }
        },
        "required": [
          "rows",
          "cols"
        ],
        "title": "SplitGrid",
        "type": "object"
      },
      "SplitRequest": {
        "additionalProperties": false,
        "description": "Body of `POST /items/{id}/split`: exactly one of `grid` or `regions`.",
        "properties": {
          "grid": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SplitGrid"
              },
              {
                "type": "null"
              }
            ]
          },
          "regions": {
            "anyOf": [
              {
                "items": {
                  "maxItems": 4,
                  "minItems": 4,
                  "prefixItems": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "number"
                    }
                  ],
                  "type": "array"
                },
                "maxItems": 256,
                "minItems": 1,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Regions"
          }
        },
        "title": "SplitRequest",
        "type": "object"
      },
      "SplitResponse": {
        "additionalProperties": false,
        "description": "One region task per region opened by the split.",
        "properties": {
          "tasks": {
            "items": {
              "$ref": "#/components/schemas/TaskRead"
            },
            "title": "Tasks",
            "type": "array"
          }
        },
        "required": [
          "tasks"
        ],
        "title": "SplitResponse",
        "type": "object"
      },
      "TaskCreate": {
        "additionalProperties": false,
        "description": "Payload to create/assign a task for an item (project id comes from the route).",
        "properties": {
          "assignee_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assignee Id"
          },
          "deadline": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deadline"
          },
          "item_id": {
            "format": "uuid",
            "title": "Item Id",
            "type": "string"
          },
          "priority": {
            "default": 0,
            "title": "Priority",
            "type": "integer"
          },
          "slot": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slot"
          },
          "type": {
            "$ref": "#/components/schemas/TaskType"
          }
        },
        "required": [
          "item_id",
          "type"
        ],
        "title": "TaskCreate",
        "type": "object"
      },
      "TaskRead": {
        "additionalProperties": false,
        "description": "Task as returned by the API.",
        "properties": {
          "assignee_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assignee Id"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "deadline": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deadline"
          },
          "gold": {
            "default": false,
            "title": "Gold",
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "item_id": {
            "format": "uuid",
            "title": "Item Id",
            "type": "string"
          },
          "locked_by_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Locked By Id"
          },
          "locked_until": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Locked Until"
          },
          "priority": {
            "title": "Priority",
            "type": "integer"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "region": {
            "anyOf": [
              {
                "maxItems": 4,
                "minItems": 4,
                "prefixItems": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  }
                ],
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region"
          },
          "slot": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slot"
          },
          "status": {
            "$ref": "#/components/schemas/TaskStatus"
          },
          "type": {
            "$ref": "#/components/schemas/TaskType"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "item_id",
          "project_id",
          "type",
          "assignee_id",
          "status",
          "locked_by_id",
          "locked_until",
          "priority",
          "deadline",
          "created_at",
          "updated_at"
        ],
        "title": "TaskRead",
        "type": "object"
      },
      "TaskStats": {
        "additionalProperties": false,
        "properties": {
          "annotate": {
            "$ref": "#/components/schemas/TaskTypeStats"
          },
          "review": {
            "$ref": "#/components/schemas/TaskTypeStats"
          }
        },
        "required": [
          "annotate",
          "review"
        ],
        "title": "TaskStats",
        "type": "object"
      },
      "TaskStatus": {
        "description": "Lifecycle state of a task.",
        "enum": [
          "open",
          "in_progress",
          "done",
          "cancelled"
        ],
        "title": "TaskStatus",
        "type": "string"
      },
      "TaskType": {
        "description": "What kind of work the task represents.",
        "enum": [
          "annotate",
          "review"
        ],
        "title": "TaskType",
        "type": "string"
      },
      "TaskTypeStats": {
        "additionalProperties": false,
        "properties": {
          "cancelled": {
            "default": 0,
            "title": "Cancelled",
            "type": "integer"
          },
          "done": {
            "default": 0,
            "title": "Done",
            "type": "integer"
          },
          "in_progress": {
            "default": 0,
            "title": "In Progress",
            "type": "integer"
          },
          "open": {
            "default": 0,
            "title": "Open",
            "type": "integer"
          }
        },
        "title": "TaskTypeStats",
        "type": "object"
      },
      "TaskUpdate": {
        "additionalProperties": false,
        "description": "Partial update for a live task (WF-6): only the fields present in the body change.\n\n`deadline: null` / `assignee_id: null` clear the field; leaving a key out\nleaves it alone (see `model_fields_set`). Status and lock fields are not\nsettable here — they move through claim / release / complete only.",
        "properties": {
          "assignee_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assignee Id"
          },
          "deadline": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deadline"
          },
          "priority": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Priority"
          }
        },
        "title": "TaskUpdate",
        "type": "object"
      },
      "TelemetryPreview": {
        "description": "Exactly what the heartbeat would send, plus what was withheld and what was sent.",
        "properties": {
          "active_users": {
            "title": "Active Users",
            "type": "integer"
          },
          "attempted_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attempted At"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "fingerprint": {
            "additionalProperties": true,
            "title": "Fingerprint",
            "type": "object"
          },
          "install_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Install Id"
          },
          "last_payload": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Payload"
          },
          "licence_type": {
            "title": "Licence Type",
            "type": "string"
          },
          "notice": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notice"
          },
          "sent_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sent At"
          },
          "server_configured": {
            "default": false,
            "title": "Server Configured",
            "type": "boolean"
          },
          "version": {
            "title": "Version",
            "type": "string"
          },
          "withheld": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Withheld",
            "type": "array"
          }
        },
        "required": [
          "enabled",
          "install_id",
          "version",
          "licence_type",
          "active_users",
          "fingerprint"
        ],
        "title": "TelemetryPreview",
        "type": "object"
      },
      "ThroughputDay": {
        "additionalProperties": false,
        "properties": {
          "approved": {
            "default": 0,
            "title": "Approved",
            "type": "integer"
          },
          "day": {
            "format": "date",
            "title": "Day",
            "type": "string"
          },
          "rejected": {
            "default": 0,
            "title": "Rejected",
            "type": "integer"
          },
          "submitted": {
            "default": 0,
            "title": "Submitted",
            "type": "integer"
          }
        },
        "required": [
          "day"
        ],
        "title": "ThroughputDay",
        "type": "object"
      },
      "ThumbnailRequest": {
        "additionalProperties": false,
        "description": "Body for `POST /projects/{id}/thumbnails` (IMG-8).",
        "properties": {
          "force": {
            "default": false,
            "title": "Force",
            "type": "boolean"
          },
          "item_ids": {
            "anyOf": [
              {
                "items": {
                  "format": "uuid",
                  "type": "string"
                },
                "maxItems": 10000,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Item Ids"
          }
        },
        "title": "ThumbnailRequest",
        "type": "object"
      },
      "TileJobRequest": {
        "additionalProperties": false,
        "description": "Body for `POST /projects/{id}/tiles` (IMG-1).",
        "properties": {
          "force": {
            "default": false,
            "title": "Force",
            "type": "boolean"
          },
          "item_ids": {
            "anyOf": [
              {
                "items": {
                  "format": "uuid",
                  "type": "string"
                },
                "maxItems": 10000,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Item Ids"
          }
        },
        "title": "TileJobRequest",
        "type": "object"
      },
      "TileSignRequest": {
        "additionalProperties": false,
        "description": "Body for `POST /items/{id}/tiles/sign`: `[level, col, row]` triples.",
        "properties": {
          "tiles": {
            "items": {
              "maxItems": 3,
              "minItems": 3,
              "prefixItems": [
                {
                  "type": "integer"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "integer"
                }
              ],
              "type": "array"
            },
            "maxItems": 512,
            "minItems": 1,
            "title": "Tiles",
            "type": "array"
          }
        },
        "required": [
          "tiles"
        ],
        "title": "TileSignRequest",
        "type": "object"
      },
      "TileSignResponse": {
        "additionalProperties": false,
        "description": "Signed URLs for the requested tiles, in the same order as the request.",
        "properties": {
          "expires_in": {
            "title": "Expires In",
            "type": "integer"
          },
          "urls": {
            "items": {
              "type": "string"
            },
            "title": "Urls",
            "type": "array"
          }
        },
        "required": [
          "urls",
          "expires_in"
        ],
        "title": "TileSignResponse",
        "type": "object"
      },
      "TokenResponse": {
        "additionalProperties": false,
        "description": "Access token issued on successful login.",
        "properties": {
          "access_token": {
            "title": "Access Token",
            "type": "string"
          },
          "expires_in": {
            "title": "Expires In",
            "type": "integer"
          },
          "mfa_setup_required": {
            "default": false,
            "title": "Mfa Setup Required",
            "type": "boolean"
          },
          "token_type": {
            "default": "bearer",
            "title": "Token Type",
            "type": "string"
          }
        },
        "required": [
          "access_token",
          "expires_in"
        ],
        "title": "TokenResponse",
        "type": "object"
      },
      "ToolType": {
        "description": "Annotation tool a class can be drawn with.",
        "enum": [
          "bbox",
          "rbox",
          "polygon",
          "polyline",
          "point",
          "mask",
          "keypoints",
          "span",
          "relation",
          "classification",
          "ranking",
          "rating",
          "segment"
        ],
        "title": "ToolType",
        "type": "string"
      },
      "UnreadCount": {
        "additionalProperties": false,
        "description": "`GET /notifications/unread-count`.",
        "properties": {
          "count": {
            "title": "Count",
            "type": "integer"
          }
        },
        "required": [
          "count"
        ],
        "title": "UnreadCount",
        "type": "object"
      },
      "UploadFileSpec": {
        "additionalProperties": false,
        "description": "One file the browser wants to upload. `path` is relative to the project's source prefix.",
        "properties": {
          "content_type": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content Type"
          },
          "path": {
            "maxLength": 1024,
            "minLength": 1,
            "title": "Path",
            "type": "string"
          },
          "size_bytes": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size Bytes"
          }
        },
        "required": [
          "path"
        ],
        "title": "UploadFileSpec",
        "type": "object"
      },
      "UploadTarget": {
        "additionalProperties": false,
        "description": "Where and how to PUT one file. `path` is the object path the item will be registered at.",
        "properties": {
          "headers": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Headers",
            "type": "object"
          },
          "method": {
            "default": "PUT",
            "title": "Method",
            "type": "string"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "path",
          "url"
        ],
        "title": "UploadTarget",
        "type": "object"
      },
      "UploadUrlsRequest": {
        "additionalProperties": false,
        "description": "Body for `POST /projects/{id}/uploads`.",
        "properties": {
          "files": {
            "items": {
              "$ref": "#/components/schemas/UploadFileSpec"
            },
            "maxItems": 500,
            "minItems": 1,
            "title": "Files",
            "type": "array"
          }
        },
        "required": [
          "files"
        ],
        "title": "UploadUrlsRequest",
        "type": "object"
      },
      "UploadUrlsResponse": {
        "additionalProperties": false,
        "description": "One write-scoped signed URL per requested file.",
        "properties": {
          "prefix": {
            "title": "Prefix",
            "type": "string"
          },
          "uploads": {
            "items": {
              "$ref": "#/components/schemas/UploadTarget"
            },
            "title": "Uploads",
            "type": "array"
          }
        },
        "required": [
          "prefix",
          "uploads"
        ],
        "title": "UploadUrlsResponse",
        "type": "object"
      },
      "UsageNoticeOut": {
        "additionalProperties": false,
        "description": "One sign of seat sharing (LIC-31). A notice for the admin, never a block.",
        "properties": {
          "count": {
            "title": "Count",
            "type": "integer"
          },
          "detail": {
            "title": "Detail",
            "type": "string"
          },
          "display_name": {
            "title": "Display Name",
            "type": "string"
          },
          "email": {
            "title": "Email",
            "type": "string"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "user_id",
          "email",
          "display_name",
          "detail",
          "count"
        ],
        "title": "UsageNoticeOut",
        "type": "object"
      },
      "UsageNotices": {
        "additionalProperties": false,
        "description": "`GET /license/usage-notices`.",
        "properties": {
          "notices": {
            "items": {
              "$ref": "#/components/schemas/UsageNoticeOut"
            },
            "title": "Notices",
            "type": "array"
          },
          "window_days": {
            "title": "Window Days",
            "type": "integer"
          }
        },
        "required": [
          "window_days",
          "notices"
        ],
        "title": "UsageNotices",
        "type": "object"
      },
      "UserPreferencesUpdate": {
        "additionalProperties": false,
        "description": "`PATCH /auth/me`: the caller's own preferences; only keys present change.",
        "properties": {
          "email_notifications": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email Notifications"
          }
        },
        "title": "UserPreferencesUpdate",
        "type": "object"
      },
      "UserRead": {
        "additionalProperties": false,
        "description": "User as returned by the API. `password_hash` is never exposed.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "display_name": {
            "title": "Display Name",
            "type": "string"
          },
          "email": {
            "title": "Email",
            "type": "string"
          },
          "email_notifications": {
            "default": true,
            "title": "Email Notifications",
            "type": "boolean"
          },
          "erased_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Erased At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "idp_subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Idp Subject"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "is_service": {
            "default": false,
            "title": "Is Service",
            "type": "boolean"
          },
          "is_superuser": {
            "title": "Is Superuser",
            "type": "boolean"
          },
          "last_seen_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Seen At"
          },
          "mfa_enabled": {
            "default": false,
            "title": "Mfa Enabled",
            "type": "boolean"
          },
          "organization_id": {
            "format": "uuid",
            "title": "Organization Id",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "organization_id",
          "email",
          "display_name",
          "idp_subject",
          "is_active",
          "is_superuser",
          "last_seen_at",
          "created_at",
          "updated_at"
        ],
        "title": "UserRead",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "ctx": {
            "title": "Context",
            "type": "object"
          },
          "input": {
            "title": "Input"
          },
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      },
      "WebhookCreate": {
        "additionalProperties": false,
        "description": "`POST /webhooks`: subscribe a URL to events.\n\n`project_id` null subscribes to every project in the organisation\n(superuser only); set, the caller must own that project. `events` names\nthe events to receive, or `[\"*\"]` for all of them.",
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "title": "Events",
            "type": "array"
          },
          "format": {
            "$ref": "#/components/schemas/WebhookFormat",
            "default": "json"
          },
          "is_active": {
            "default": true,
            "title": "Is Active",
            "type": "boolean"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "url": {
            "format": "uri",
            "maxLength": 2083,
            "minLength": 1,
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url",
          "events"
        ],
        "title": "WebhookCreate",
        "type": "object"
      },
      "WebhookCreated": {
        "additionalProperties": false,
        "description": "The freshly created (or rotated) webhook, carrying `secret` exactly once.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By Id"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "title": "Events",
            "type": "array"
          },
          "format": {
            "$ref": "#/components/schemas/WebhookFormat",
            "default": "json"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "last_delivery_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Delivery At"
          },
          "last_response_status": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Response Status"
          },
          "organization_id": {
            "format": "uuid",
            "title": "Organization Id",
            "type": "string"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "secret": {
            "title": "Secret",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "id",
          "organization_id",
          "project_id",
          "url",
          "description",
          "events",
          "is_active",
          "created_by_id",
          "last_delivery_at",
          "last_response_status",
          "created_at",
          "updated_at",
          "secret"
        ],
        "title": "WebhookCreated",
        "type": "object"
      },
      "WebhookDeliveryRead": {
        "additionalProperties": false,
        "description": "One delivery, for the per-hook delivery log.",
        "properties": {
          "attempts": {
            "title": "Attempts",
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "delivered_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivered At"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "event": {
            "title": "Event",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "next_attempt_at": {
            "format": "date-time",
            "title": "Next Attempt At",
            "type": "string"
          },
          "payload": {
            "additionalProperties": true,
            "title": "Payload",
            "type": "object"
          },
          "response_status": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Status"
          },
          "status": {
            "$ref": "#/components/schemas/WebhookDeliveryStatus"
          },
          "webhook_id": {
            "format": "uuid",
            "title": "Webhook Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "webhook_id",
          "event",
          "payload",
          "status",
          "attempts",
          "next_attempt_at",
          "response_status",
          "error",
          "delivered_at",
          "created_at"
        ],
        "title": "WebhookDeliveryRead",
        "type": "object"
      },
      "WebhookDeliveryStatus": {
        "description": "Lifecycle of one delivery.",
        "enum": [
          "pending",
          "succeeded",
          "failed"
        ],
        "title": "WebhookDeliveryStatus",
        "type": "string"
      },
      "WebhookFormat": {
        "description": "What a hook receives (API-7): the signed event, or a chat message.",
        "enum": [
          "json",
          "slack",
          "teams"
        ],
        "title": "WebhookFormat",
        "type": "string"
      },
      "WebhookRead": {
        "additionalProperties": false,
        "description": "A webhook as returned by the API; the secret is never included.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By Id"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "title": "Events",
            "type": "array"
          },
          "format": {
            "$ref": "#/components/schemas/WebhookFormat",
            "default": "json"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "last_delivery_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Delivery At"
          },
          "last_response_status": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Response Status"
          },
          "organization_id": {
            "format": "uuid",
            "title": "Organization Id",
            "type": "string"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "id",
          "organization_id",
          "project_id",
          "url",
          "description",
          "events",
          "is_active",
          "created_by_id",
          "last_delivery_at",
          "last_response_status",
          "created_at",
          "updated_at"
        ],
        "title": "WebhookRead",
        "type": "object"
      },
      "WebhookUpdate": {
        "additionalProperties": false,
        "description": "`PATCH /webhooks/{id}`: only keys present change. `rotate_secret: true`\nreplaces the signing secret and returns the new one once.",
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "events": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "minItems": 1,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Events"
          },
          "format": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebhookFormat"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active"
          },
          "rotate_secret": {
            "default": false,
            "title": "Rotate Secret",
            "type": "boolean"
          },
          "url": {
            "anyOf": [
              {
                "format": "uri",
                "maxLength": 2083,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          }
        },
        "title": "WebhookUpdate",
        "type": "object"
      },
      "WebhookUpdated": {
        "additionalProperties": false,
        "description": "`PATCH` response: `secret` is set only when it was rotated in this call.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By Id"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "title": "Events",
            "type": "array"
          },
          "format": {
            "$ref": "#/components/schemas/WebhookFormat",
            "default": "json"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "last_delivery_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Delivery At"
          },
          "last_response_status": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Response Status"
          },
          "organization_id": {
            "format": "uuid",
            "title": "Organization Id",
            "type": "string"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Secret"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "id",
          "organization_id",
          "project_id",
          "url",
          "description",
          "events",
          "is_active",
          "created_by_id",
          "last_delivery_at",
          "last_response_status",
          "created_at",
          "updated_at"
        ],
        "title": "WebhookUpdated",
        "type": "object"
      },
      "WorkflowConfig": {
        "additionalProperties": false,
        "description": "`project.workflow`, see CONTRACTS.md *Project workflow JSON* (WF-1).\n\nEvery field defaults to the standard annotate → review → approve flow, so\n`{}` and pre-existing rows behave as before. Unknown keys are refused so a\ntypo cannot silently leave the default in force.",
        "properties": {
          "allow_self_review": {
            "default": true,
            "title": "Allow Self Review",
            "type": "boolean"
          },
          "allow_skip": {
            "default": true,
            "title": "Allow Skip",
            "type": "boolean"
          },
          "consensus_annotators": {
            "default": 1,
            "maximum": 10.0,
            "minimum": 1.0,
            "title": "Consensus Annotators",
            "type": "integer"
          },
          "gold_every": {
            "anyOf": [
              {
                "maximum": 1000.0,
                "minimum": 2.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gold Every"
          },
          "rejection_returns_to": {
            "$ref": "#/components/schemas/RejectionTarget",
            "default": "same_annotator"
          },
          "review": {
            "$ref": "#/components/schemas/ReviewMode",
            "default": "required"
          },
          "review_sample_rate": {
            "default": 0.1,
            "exclusiveMinimum": 0.0,
            "maximum": 1.0,
            "title": "Review Sample Rate",
            "type": "number"
          }
        },
        "title": "WorkflowConfig",
        "type": "object"
      },
      "app__models__item__ItemStatus": {
        "description": "Item workflow state (``item_status`` PG enum), matches the §7 state machine.",
        "enum": [
          "new",
          "prelabeled",
          "annotating",
          "submitted",
          "in_review",
          "approved",
          "rejected",
          "skipped"
        ],
        "title": "ItemStatus",
        "type": "string"
      },
      "app__schemas__item__ItemStatus": {
        "description": "Lifecycle state of an item, per the workflow state machine (§7).",
        "enum": [
          "new",
          "prelabeled",
          "annotating",
          "submitted",
          "in_review",
          "approved",
          "rejected",
          "skipped"
        ],
        "title": "ItemStatus",
        "type": "string"
      }
    },
    "securitySchemes": {
      "HTTPBearer": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Data stays in the customer's own storage; this API serves metadata, annotations and short-lived signed URLs.",
    "summary": "Cloud-agnostic annotation platform",
    "title": "Annotide API",
    "version": "dev"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/v1/annotations/{annotation_id}/review": {
      "post": {
        "description": "Record a reviewer's verdict (WF-4).\n\nApproving with `corrected_result` stores the correction as a new version\nauthored by the reviewer, so the annotator's original stays intact and the\ndifference between them is recoverable.",
        "operationId": "review_annotation_api_v1_annotations__annotation_id__review_post",
        "parameters": [
          {
            "in": "path",
            "name": "annotation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Annotation Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReviewRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnnotationRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Approve, reject, or correct a submitted annotation",
        "tags": [
          "annotations"
        ]
      }
    },
    "/api/v1/annotations/{annotation_id}/submit": {
      "post": {
        "description": "Promote the caller's own draft to `submitted`, validating it first.\n\nA submitted version is not edited in place either: a later change appends a\nnew version, so the submitted state stays in the history.",
        "operationId": "submit_annotation_api_v1_annotations__annotation_id__submit_post",
        "parameters": [
          {
            "in": "path",
            "name": "annotation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Annotation Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnnotationRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Submit a draft for review",
        "tags": [
          "annotations"
        ]
      }
    },
    "/api/v1/api-keys": {
      "get": {
        "description": "The caller's keys, revoked ones included; a superuser may pick any user.",
        "operationId": "list_api_keys_api_v1_api_keys_get",
        "parameters": [
          {
            "description": "Another user's keys (superuser only)",
            "in": "query",
            "name": "user_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Another user's keys (superuser only)",
              "title": "User Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ApiKeyRead"
                  },
                  "title": "Response List Api Keys Api V1 Api Keys Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List API keys",
        "tags": [
          "auth"
        ]
      },
      "post": {
        "description": "Mint a key; the `token` in the response is shown exactly once.\n\n`user_id` lets a superuser issue a key for a service account or another\nuser of the organisation. A non-superuser can only issue keys for\nthemselves.",
        "operationId": "create_api_key_api_v1_api_keys_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyCreated"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Mint an API key",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/api-keys/{key_id}": {
      "delete": {
        "description": "Revoke a key. Idempotent: revoking twice is still 204.",
        "operationId": "revoke_api_key_api_v1_api_keys__key_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "key_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Key Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Revoke an API key",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/audit": {
      "get": {
        "description": "Newest first, cursor-paginated, never crossing an organisation boundary.",
        "operationId": "list_audit_events_api_v1_audit_get",
        "parameters": [
          {
            "description": "Prefix match, e.g. `membership.`",
            "in": "query",
            "name": "action",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Prefix match, e.g. `membership.`",
              "title": "Action"
            }
          },
          {
            "in": "query",
            "name": "target_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Target Type"
            }
          },
          {
            "in": "query",
            "name": "target_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Target Id"
            }
          },
          {
            "in": "query",
            "name": "actor_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Actor Id"
            }
          },
          {
            "description": "`created_at >=`",
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`created_at >=`",
              "title": "Since"
            }
          },
          {
            "description": "Page size",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 200,
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Page size",
              "title": "Limit"
            }
          },
          {
            "description": "Opaque cursor from the previous page",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Opaque cursor from the previous page",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_AuditEventRead_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List audit events for the caller's organisation (system administrators only)",
        "tags": [
          "audit"
        ]
      }
    },
    "/api/v1/auth/login": {
      "post": {
        "description": "Authenticate a local account.\n\nReturns the same error for an unknown email, a wrong password, a disabled\naccount and an SSO-only account: telling them apart would leak which emails\nhave accounts here.\n\nAttempts are rate limited per (client IP, e-mail) before the password\nis looked at, so guessing costs a minute per few tries (API-5).",
        "operationId": "login_api_v1_auth_login_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Exchange email and password for an access token",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/me": {
      "get": {
        "description": "Return the caller's own user record.\n\nThe token carries enough to authorise a request, but the frontend needs the\ndisplay name and timestamps, so this one endpoint does hit the database.",
        "operationId": "me_api_v1_auth_me_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRead"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "The authenticated caller",
        "tags": [
          "auth"
        ]
      },
      "patch": {
        "description": "Only keys present in the body change (API-7: `email_notifications`).",
        "operationId": "update_me_api_v1_auth_me_patch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserPreferencesUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Change the caller's own preferences",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/mfa": {
      "delete": {
        "description": "With a code for one's own account; a superuser resets another without one.",
        "operationId": "disable_api_v1_auth_mfa_delete",
        "parameters": [
          {
            "description": "Superuser: reset another account",
            "in": "query",
            "name": "user_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Superuser: reset another account",
              "title": "User Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/MfaCode"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Payload"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Turn MFA off",
        "tags": [
          "auth"
        ]
      },
      "get": {
        "operationId": "get_mfa_api_v1_auth_mfa_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MfaStatus"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "The caller's MFA state",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/mfa/enable": {
      "post": {
        "operationId": "enable_api_v1_auth_mfa_enable_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MfaCode"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MfaRecoveryCodes"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Confirm and turn MFA on",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/mfa/recovery-codes": {
      "post": {
        "description": "Needs a current code from the app, not a recovery code.",
        "operationId": "recovery_codes_api_v1_auth_mfa_recovery_codes_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MfaCode"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MfaRecoveryCodes"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Replace the recovery codes",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/mfa/setup": {
      "post": {
        "description": "A new seed, pending until `enable` confirms it. Replaces an unconfirmed one.",
        "operationId": "setup_api_v1_auth_mfa_setup_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MfaSetup"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Start adding an authenticator app",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/oidc/callback": {
      "get": {
        "description": "The provider's redirect target.\n\nEvery failure ends at ``{frontend}/login?error=<code>``: the browser is\nmid-navigation and cannot render a problem-details body. The token is\nhanded over in the URL *fragment* of ``{frontend}/auth/callback``, which\nbrowsers keep out of the request they make for that page.",
        "operationId": "oidc_callback_api_v1_auth_oidc_callback_get",
        "parameters": [
          {
            "in": "query",
            "name": "code",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Code"
            }
          },
          {
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "State"
            }
          },
          {
            "in": "query",
            "name": "error",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Error"
            }
          },
          {
            "in": "cookie",
            "name": "oidc_flow",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Oidc Flow"
            }
          }
        ],
        "responses": {
          "303": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Complete single sign-on (AUTH-1)",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/oidc/login": {
      "get": {
        "description": "Redirect the browser to the identity provider.\n\nA full-page navigation, not an XHR: the flow cookie set here must be sent\nback by the browser on the callback, and the provider's pages are not\nembeddable.",
        "operationId": "oidc_login_api_v1_auth_oidc_login_get",
        "parameters": [
          {
            "description": "Path to open after sign-in",
            "in": "query",
            "name": "next",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Path to open after sign-in",
              "title": "Next"
            }
          },
          {
            "description": "`none`: silent sign-in from the provider's session",
            "in": "query",
            "name": "prompt",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "const": "none",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`none`: silent sign-in from the provider's session",
              "title": "Prompt"
            }
          }
        ],
        "responses": {
          "303": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Start single sign-on (AUTH-1)",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/oidc/logout": {
      "get": {
        "description": "A full-page navigation after the frontend has dropped its own token.\n\nPlatform tokens are stateless, so there is nothing to revoke here; this\nonly ends the provider session, so the next sign-in asks again.",
        "operationId": "oidc_logout_api_v1_auth_oidc_logout_get",
        "responses": {
          "303": {
            "description": "Successful Response"
          }
        },
        "summary": "Sign out at the identity provider too (RP-initiated logout)",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/providers": {
      "get": {
        "description": "Unauthenticated: the login page needs it before anyone has signed in.\n\nSingle sign-on is listed only while the licence has it (LIC-33).",
        "operationId": "providers_api_v1_auth_providers_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthProviders"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Which sign-in methods this installation offers",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/saml/acs": {
      "post": {
        "description": "The IdP's HTTP-POST target.\n\nEvery failure ends at ``{frontend}/login?error=<code>``, like the OIDC\ncallback. A response is accepted only if it answers the request id in\nthis browser's flow cookie, so IdP-initiated sign-in is refused.",
        "operationId": "saml_acs_api_v1_auth_saml_acs_post",
        "parameters": [
          {
            "in": "cookie",
            "name": "saml_flow",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Saml Flow"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Body_saml_acs_api_v1_auth_saml_acs_post"
              }
            }
          }
        },
        "responses": {
          "303": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Complete SAML single sign-on: the Assertion Consumer Service (AUTH-1)",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/saml/login": {
      "get": {
        "description": "Redirect the browser to the IdP with an AuthnRequest (HTTP-Redirect binding).",
        "operationId": "saml_login_api_v1_auth_saml_login_get",
        "parameters": [
          {
            "description": "Path to open after sign-in",
            "in": "query",
            "name": "next",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Path to open after sign-in",
              "title": "Next"
            }
          }
        ],
        "responses": {
          "303": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Start SAML single sign-on (AUTH-1)",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/saml/metadata": {
      "get": {
        "description": "Entity id, ACS URL and binding: what an IdP admin uploads or points at.",
        "operationId": "saml_metadata_api_v1_auth_saml_metadata_get",
        "responses": {
          "200": {
            "description": "Successful Response"
          }
        },
        "summary": "This service provider's SAML metadata, for the IdP (AUTH-1)",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/comments/{comment_id}/resolve": {
      "post": {
        "description": "The author, a reviewer or an owner may resolve; anyone else gets 403.",
        "operationId": "resolve_comment_api_v1_comments__comment_id__resolve_post",
        "parameters": [
          {
            "in": "path",
            "name": "comment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Comment Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommentResolve"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Resolve or reopen a comment",
        "tags": [
          "comments"
        ]
      }
    },
    "/api/v1/connectors": {
      "get": {
        "description": "List connectors, newest first, scoped to the caller's organization.",
        "operationId": "list_connectors_api_v1_connectors_get",
        "parameters": [
          {
            "description": "Page size",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 200,
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Page size",
              "title": "Limit"
            }
          },
          {
            "description": "Opaque cursor from the previous page",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Opaque cursor from the previous page",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_ConnectorRead_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List connectors in the caller's organization (system administrators only)",
        "tags": [
          "connectors"
        ]
      },
      "post": {
        "description": "Register a new storage connector.\n\n`secret_ref` is a Key Vault reference; the database never stores the\nsecret itself (SEC/AUTH-7).",
        "operationId": "create_connector_api_v1_connectors_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectorCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Register a connector (system administrators only)",
        "tags": [
          "connectors"
        ]
      }
    },
    "/api/v1/connectors/{connector_id}": {
      "delete": {
        "description": "Delete a connector.",
        "operationId": "delete_connector_api_v1_connectors__connector_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "connector_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Connector Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete a connector (system administrators only)",
        "tags": [
          "connectors"
        ]
      },
      "get": {
        "description": "Return one connector.",
        "operationId": "get_connector_api_v1_connectors__connector_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "connector_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Connector Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a connector by id (system administrators only)",
        "tags": [
          "connectors"
        ]
      },
      "patch": {
        "description": "Partially update a connector; an omitted field is left untouched.",
        "operationId": "update_connector_api_v1_connectors__connector_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "connector_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Connector Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectorUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Update a connector (system administrators only)",
        "tags": [
          "connectors"
        ]
      }
    },
    "/api/v1/connectors/{connector_id}/check": {
      "post": {
        "description": "Run the connector's `check()` against its backing store.\n\nA misconfigured connector must never fail the request: an unresolved\nsecret, a bad config, a network error or a timeout all come back as\n`ok: false` with an explanatory message rather than propagating.",
        "operationId": "check_connector_api_v1_connectors__connector_id__check_post",
        "parameters": [
          {
            "in": "path",
            "name": "connector_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Connector Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorCheckResult"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Test a connector's connectivity (system administrators only, SRC-7)",
        "tags": [
          "connectors"
        ]
      }
    },
    "/api/v1/connectors/{connector_id}/events": {
      "options": {
        "description": "Allow the origin Event Grid asks about (CloudEvents abuse protection).",
        "operationId": "event_handshake_api_v1_connectors__connector_id__events_options",
        "parameters": [
          {
            "in": "path",
            "name": "connector_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Connector Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Token"
            }
          },
          {
            "in": "header",
            "name": "X-Event-Token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Event-Token"
            }
          },
          {
            "in": "header",
            "name": "WebHook-Request-Origin",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Webhook-Request-Origin"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "CloudEvents webhook validation handshake (SRC-3)",
        "tags": [
          "connectors"
        ]
      },
      "post": {
        "description": "Queue one `scan_source` job per project that should pick up a created object.\n\nRead as raw bytes, not a JSON body: SNS posts `text/plain`. Handshakes\n(Event Grid validation, SNS confirmation) answer 200 and queue nothing.",
        "operationId": "receive_events_api_v1_connectors__connector_id__events_post",
        "parameters": [
          {
            "in": "path",
            "name": "connector_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Connector Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Token"
            }
          },
          {
            "in": "header",
            "name": "X-Event-Token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Event-Token"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventDeliveryResult"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Receive storage events and scan the objects they name (SRC-3)",
        "tags": [
          "connectors"
        ]
      }
    },
    "/api/v1/connectors/{connector_id}/events/token": {
      "delete": {
        "description": "Forget the token; deliveries answer 404 from now on.",
        "operationId": "revoke_event_token_api_v1_connectors__connector_id__events_token_delete",
        "parameters": [
          {
            "in": "path",
            "name": "connector_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Connector Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Turn the connector's storage events off (system administrators only, SRC-3)",
        "tags": [
          "connectors"
        ]
      },
      "post": {
        "description": "Turn storage events on, or replace the token; the old one stops working at once.",
        "operationId": "mint_event_token_api_v1_connectors__connector_id__events_token_post",
        "parameters": [
          {
            "in": "path",
            "name": "connector_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Connector Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventTokenRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Mint the connector's storage-event token (system administrators only, SRC-3)",
        "tags": [
          "connectors"
        ]
      }
    },
    "/api/v1/health": {
      "get": {
        "description": "Always 200 while the process is alive. No dependency is consulted.",
        "operationId": "health_api_v1_health_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Liveness probe",
        "tags": [
          "health"
        ]
      }
    },
    "/api/v1/items/{item_id}": {
      "get": {
        "description": "Fetch one item and mint it a fresh signed media URL.\n\nThe URL is built on every call, capped at `settings.signed_url_ttl`\n(AUTH-6 caps this at 15 minutes) — never a long-lived or cached one. When\nthe connector cannot produce one, `media_url` is `None` instead of\nfailing the request (see `_signed_media_url`).",
        "operationId": "get_item_api_v1_items__item_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "An item, with a short-lived signed media URL",
        "tags": [
          "items"
        ]
      }
    },
    "/api/v1/items/{item_id}/annotations": {
      "get": {
        "description": "Every version, newest first. Versions are never deleted (DATA-1).\n\nBlind annotation (CONTRACTS.md *annotation*): owners, reviewers and\nsuperusers see every kind. Anyone else sees `primary` versions plus their\nown `consensus` / `gold` versions — and while they hold a live consensus\nor gold task on the item, only their own versions of that kind (no\nprelabel, no other annotator's work, no gold reference).",
        "operationId": "list_annotations_api_v1_items__item_id__annotations_get",
        "parameters": [
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AnnotationRead"
                  },
                  "title": "Response List Annotations Api V1 Items  Item Id  Annotations Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Version history for an item",
        "tags": [
          "annotations"
        ]
      },
      "post": {
        "description": "Append a version. Existing versions are never modified.\n\nSaving a draft leaves the item in `annotating`; submitting moves it on\nthrough the workflow machine (`services/item_flow.py`, WF-1) and runs the\nQA-6 validation first.",
        "operationId": "create_annotation_api_v1_items__item_id__annotations_post",
        "parameters": [
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnnotationCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnnotationRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Create a new annotation version",
        "tags": [
          "annotations"
        ]
      }
    },
    "/api/v1/items/{item_id}/annotations/diff": {
      "get": {
        "description": "Which shapes were added, removed or changed between two versions (WF-4).\n\nDefaults to the two most recent versions, which is what a reviewer wants\nwhen looking at what an annotator changed after a rejection.",
        "operationId": "diff_versions_api_v1_items__item_id__annotations_diff_get",
        "parameters": [
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "base",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Base"
            }
          },
          {
            "in": "query",
            "name": "compare",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Compare"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "title": "Response Diff Versions Api V1 Items  Item Id  Annotations Diff Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Shape-level diff between two versions",
        "tags": [
          "annotations"
        ]
      }
    },
    "/api/v1/items/{item_id}/comments": {
      "get": {
        "description": "Every comment on the item, oldest first — a plain array (bounded per item).\n\nAnnotation-level comments carry the item id too, so they are included.",
        "operationId": "list_comments_api_v1_items__item_id__comments_get",
        "parameters": [
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/CommentRead"
                  },
                  "title": "Response List Comments Api V1 Items  Item Id  Comments Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "The comment thread on an item",
        "tags": [
          "comments"
        ]
      },
      "post": {
        "description": "Append to the thread. `annotation_id` and `parent_id` must belong to this item.",
        "operationId": "add_comment_api_v1_items__item_id__comments_post",
        "parameters": [
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Add a comment, notifying anyone @mentioned",
        "tags": [
          "comments"
        ]
      }
    },
    "/api/v1/items/{item_id}/consensus": {
      "get": {
        "description": "Owner / reviewer (QA-1, QA-2, QA-3): 409 when the item has no submitted consensus version.",
        "operationId": "get_consensus_api_v1_items__item_id__consensus_get",
        "parameters": [
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsensusRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Consensus versions, agreement and a fuse preview for one item",
        "tags": [
          "quality"
        ]
      }
    },
    "/api/v1/items/{item_id}/consensus/resolve": {
      "post": {
        "description": "Owner / reviewer (QA-3): pick one version or fuse them all, then approve.\n\n409 unless the item is `submitted` / `in_review` with >= 1 submitted\nconsensus version; 403 when the project forbids self-review and the\ncaller authored one of the consensus versions.",
        "operationId": "resolve_consensus_api_v1_items__item_id__consensus_resolve_post",
        "parameters": [
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "discriminator": {
                  "mapping": {
                    "fuse": "#/components/schemas/FuseResolve",
                    "pick": "#/components/schemas/PickResolve"
                  },
                  "propertyName": "method"
                },
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/PickResolve"
                  },
                  {
                    "$ref": "#/components/schemas/FuseResolve"
                  }
                ],
                "title": "Payload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsensusAnnotationRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Resolve an item's consensus versions into its primary annotation",
        "tags": [
          "quality"
        ]
      }
    },
    "/api/v1/items/{item_id}/gold": {
      "delete": {
        "description": "Owner / reviewer (QA-4): also cancels the item's live gold tasks.",
        "operationId": "clear_gold_api_v1_items__item_id__gold_delete",
        "parameters": [
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Clear an item's gold reference",
        "tags": [
          "quality"
        ]
      },
      "put": {
        "description": "Owner / reviewer (QA-4): 422 unless `annotation_id` is an approved primary version.",
        "operationId": "set_gold_api_v1_items__item_id__gold_put",
        "parameters": [
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GoldSetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Set an item's gold reference",
        "tags": [
          "quality"
        ]
      }
    },
    "/api/v1/items/{item_id}/interactive": {
      "post": {
        "description": "Proxy one interactive prompt to a `segment` model of the organisation.\n\nThe browser never talks to the model itself: the endpoint may sit inside\nthe compose network, and its credential (BYOM-3) must not leave the API.\nNothing is persisted — the polygon comes back and the annotator adds it\nlike any hand-drawn shape, so undo, class hotkeys and validation all work\non it unchanged. Any failure on the model side is a 503, never a 500: the\nperson just gets \"the model did not answer\" and keeps drawing by hand.",
        "operationId": "interactive_segment_api_v1_items__item_id__interactive_post",
        "parameters": [
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InteractiveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InteractiveResult"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Turn one click or box into a polygon through a segment model (ML-7)",
        "tags": [
          "items"
        ]
      }
    },
    "/api/v1/items/{item_id}/ocr": {
      "post": {
        "description": "Proxy one page of a pdf item to an `ocr` model of the organisation.\n\nLike `/interactive`: the model's endpoint and credential stay behind the\nAPI, and nothing is persisted — the words go to the annotator, which uses\nthem as it uses a text layer (boxes carry the words inside them). The\ntext of a scan is thus never stored by the platform (ARC-3), only the\n`text` of the boxes a person keeps. Model failures are a 503.",
        "operationId": "ocr_page_api_v1_items__item_id__ocr_post",
        "parameters": [
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OcrRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OcrResult"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Read the words of one page of a scanned PDF through an ocr model",
        "tags": [
          "items"
        ]
      }
    },
    "/api/v1/items/{item_id}/prelabels": {
      "post": {
        "description": "A `draft`, `source: model` version, as the `prelabel` job writes one.\n\nFor agents and offline pipelines that run the model themselves (the MCP\nserver's `create_prelabel`). Same rules as the job: never on an item with\nhuman work (ML-10), and a `new` item becomes `prelabeled`.",
        "operationId": "create_prelabel_api_v1_items__item_id__prelabels_post",
        "parameters": [
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrelabelCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnnotationRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Post a pre-label from an external producer (API-8)",
        "tags": [
          "annotations"
        ]
      }
    },
    "/api/v1/items/{item_id}/skip": {
      "post": {
        "description": "Move an item to `skipped` through the workflow machine (TOOL-6).\n\n`reason` is required and stored on the item (`meta.skip_reason`) so a\nreviewer or project owner can see why work stalled. The transition itself,\nincluding which roles and source states allow it and whether the project\nallows skipping at all (WF-1), is decided by `services/item_flow.py` —\nthis router never compares or assigns a status by hand.",
        "operationId": "skip_item_api_v1_items__item_id__skip_post",
        "parameters": [
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkipRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Skip an item, recording why",
        "tags": [
          "items"
        ]
      }
    },
    "/api/v1/items/{item_id}/split": {
      "post": {
        "description": "Split an image into a grid or explicit regions (IMG-6); owner / reviewer only.\n\nCancels the item's live ordinary annotate task and opens one region task\nper region; see `services/splitting.py` for the 409 / 422 rules.",
        "operationId": "split_item_endpoint_api_v1_items__item_id__split_post",
        "parameters": [
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SplitRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SplitResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Split an image item into region annotate tasks",
        "tags": [
          "items"
        ]
      }
    },
    "/api/v1/items/{item_id}/tiles/sign": {
      "post": {
        "description": "Sign one URL per `[level, col, row]` tile of the item's DZI pyramid.\n\n409 when the item has no `meta.tiles` yet; 422 for a level above\n`max_level` or a col / row outside that level's grid. Tiles are derived\ndata on the *result* connector, same as a thumbnail (IMG-8).",
        "operationId": "sign_tiles_api_v1_items__item_id__tiles_sign_post",
        "parameters": [
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TileSignRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TileSignResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Signed read URLs for an item's DZI tiles (IMG-1)",
        "tags": [
          "items"
        ]
      }
    },
    "/api/v1/items/{item_id}/views": {
      "get": {
        "description": "The files listed in `meta.views`, each with a short-lived signed URL.\n\nOnly paths inside the project's `source_prefix` are signed: a view is\nsomething the annotators of this project may see, never an arbitrary\nobject elsewhere in the container. A view that cannot be signed comes\nback with `url: null`, like `media_url`.",
        "operationId": "get_item_views_api_v1_items__item_id__views_get",
        "parameters": [
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ItemView"
                  },
                  "title": "Response Get Item Views Api V1 Items  Item Id  Views Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "An item's companion views, signed (§5 multimodal)",
        "tags": [
          "items"
        ]
      }
    },
    "/api/v1/jobs/{job_id}": {
      "get": {
        "description": "Return one job. Authorised through the job's project.",
        "operationId": "get_job_api_v1_jobs__job_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Job Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a job's status and progress",
        "tags": [
          "jobs"
        ]
      }
    },
    "/api/v1/jobs/{job_id}/cancel": {
      "post": {
        "description": "Mark the job cancelled and ask the worker to stop it. 409 if it already finished.",
        "operationId": "cancel_api_v1_jobs__job_id__cancel_post",
        "parameters": [
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Job Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Cancel a queued or running job (ARC-4)",
        "tags": [
          "jobs"
        ]
      }
    },
    "/api/v1/jobs/{job_id}/download": {
      "get": {
        "description": "Mint a signed URL for a succeeded export's archive.\n\nThe API never proxies media (including export archives): it only signs a\nURL against the project's result connector and hands it back, capped at\n`settings.signed_url_ttl`, exactly like item media URLs (AUTH-6).",
        "operationId": "download_export_api_v1_jobs__job_id__download_get",
        "parameters": [
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Job Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportDownload"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Signed download URL for a finished export (EXP-5)",
        "tags": [
          "jobs"
        ]
      }
    },
    "/api/v1/jobs/{job_id}/retry": {
      "post": {
        "description": "Re-queue the same job with the same payload. 409 unless it failed or was cancelled.",
        "operationId": "retry_api_v1_jobs__job_id__retry_post",
        "parameters": [
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Job Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Re-queue a failed or cancelled job (ARC-4)",
        "tags": [
          "jobs"
        ]
      }
    },
    "/api/v1/license": {
      "delete": {
        "description": "Forget the key kept in the database. ``APP_LICENSE_KEY`` is not affected.",
        "operationId": "delete_license_api_v1_license_delete",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenseInfo"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Remove the pasted licence key",
        "tags": [
          "license"
        ]
      },
      "get": {
        "operationId": "get_license_api_v1_license_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenseInfo"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "This installation's licence status",
        "tags": [
          "license"
        ]
      },
      "put": {
        "description": "Keep a pasted key in the database. Only a currently valid key is accepted.\n\nIt replaces any earlier pasted key. ``APP_LICENSE_KEY`` stays as it is;\nwhichever valid key expires last is in force. A key bound to other hosts\nthan this request's is refused (LIC-29).",
        "operationId": "put_license_api_v1_license_put",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LicenseKeyUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenseInfo"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Install a licence key",
        "tags": [
          "license"
        ]
      }
    },
    "/api/v1/license/refresh": {
      "get": {
        "operationId": "get_refresh_api_v1_license_refresh_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenseRefreshStatus"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "What the licence refresh sends and how it last went",
        "tags": [
          "license"
        ]
      },
      "post": {
        "description": "Ask the licence server for a renewed key now (LIC-27). 409 when it cannot run.",
        "operationId": "post_refresh_api_v1_license_refresh_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenseRefreshStatus"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Refresh the licence key now",
        "tags": [
          "license"
        ]
      }
    },
    "/api/v1/license/seat-report": {
      "get": {
        "description": "Distinct and peak active users per calendar month, from the sign-in audit trail.",
        "operationId": "get_seat_report_api_v1_license_seat_report_get",
        "parameters": [
          {
            "description": "First day, UTC",
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "First day, UTC",
              "title": "Start"
            }
          },
          {
            "description": "Last day, UTC; default today",
            "in": "query",
            "name": "end",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Last day, UTC; default today",
              "title": "End"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SeatReport"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Active users per month, for true-up",
        "tags": [
          "license"
        ]
      }
    },
    "/api/v1/license/trial": {
      "post": {
        "description": "Ask the licence server for a trial key and keep it (LIC-34).\n\n409 `trial-unavailable` when a key is in force, this install already had\nits trial, or licence calls are off; 503 `trial-service` when the server\ncan't be reached or gives no usable key.",
        "operationId": "post_trial_api_v1_license_trial_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenseInfo"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Start the 30-day Business trial",
        "tags": [
          "license"
        ]
      }
    },
    "/api/v1/license/usage-notices": {
      "get": {
        "description": "Shared accounts, parallel locks, superhuman pace, annotating service accounts.\n\nComputed here from the audit log; nothing is sent anywhere or blocked.",
        "operationId": "get_usage_notices_api_v1_license_usage_notices_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageNotices"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Signs of seat sharing (LIC-31)",
        "tags": [
          "license"
        ]
      }
    },
    "/api/v1/licensing/organizational-use": {
      "get": {
        "description": "The honesty prompt (LIC-20).\n\nRuns entirely locally — no telemetry, no network — and simply tells the\nadmin what the installation can already see about itself. Most people\ncomply once told plainly, which is why this is expected to convert better\nthan any clustering the vendor does.",
        "operationId": "organizational_use_api_v1_licensing_organizational_use_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationalUseNotice"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Whether this Community install looks like organisational use",
        "tags": [
          "licensing"
        ]
      }
    },
    "/api/v1/licensing/telemetry/preview": {
      "get": {
        "description": "Show the heartbeat payload verbatim, including the withheld signals (LIC-21).\n\nWorks whether or not telemetry is enabled, so an admin can inspect what\n*would* be sent before deciding to turn it on, and what was last sent.",
        "operationId": "telemetry_preview_api_v1_licensing_telemetry_preview_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryPreview"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Exactly what this installation would send home",
        "tags": [
          "licensing"
        ]
      }
    },
    "/api/v1/ml-platforms": {
      "get": {
        "operationId": "list_platforms_api_v1_ml_platforms_get",
        "parameters": [
          {
            "description": "Page size",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 200,
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Page size",
              "title": "Limit"
            }
          },
          {
            "description": "Opaque cursor from the previous page",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Opaque cursor from the previous page",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_MlPlatformRead_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the organisation's ML platforms (API-6)",
        "tags": [
          "ml-platforms"
        ]
      },
      "post": {
        "operationId": "create_platform_api_v1_ml_platforms_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MlPlatformCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MlPlatformRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Register an MLflow, Databricks or Azure ML platform (system administrators, API-6)",
        "tags": [
          "ml-platforms"
        ]
      }
    },
    "/api/v1/ml-platforms/{platform_id}": {
      "delete": {
        "description": "Runs already published stay on the platform and in versions' `training_run`.",
        "operationId": "delete_platform_api_v1_ml_platforms__platform_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "platform_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Platform Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete a platform (system administrators)",
        "tags": [
          "ml-platforms"
        ]
      },
      "get": {
        "operationId": "get_platform_api_v1_ml_platforms__platform_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "platform_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Platform Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MlPlatformRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get one",
        "tags": [
          "ml-platforms"
        ]
      },
      "patch": {
        "description": "Partial update. The kind cannot change; the merged row must be valid as a whole.",
        "operationId": "update_platform_api_v1_ml_platforms__platform_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "platform_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Platform Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MlPlatformUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MlPlatformRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Update a platform (system administrators)",
        "tags": [
          "ml-platforms"
        ]
      }
    },
    "/api/v1/ml-platforms/{platform_id}/check": {
      "post": {
        "description": "One experiment search. Every failure is `ok: false` with the reason.",
        "operationId": "check_platform_api_v1_ml_platforms__platform_id__check_post",
        "parameters": [
          {
            "in": "path",
            "name": "platform_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Platform Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MlPlatformCheckResult"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Test a platform's address and credentials (system administrators)",
        "tags": [
          "ml-platforms"
        ]
      }
    },
    "/api/v1/models": {
      "get": {
        "description": "List models, newest first, scoped to the caller's organization.",
        "operationId": "list_models_api_v1_models_get",
        "parameters": [
          {
            "description": "Page size",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 200,
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Page size",
              "title": "Limit"
            }
          },
          {
            "description": "Opaque cursor from the previous page",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Opaque cursor from the previous page",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_ModelRead_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List models registered in the caller's organization (ML-1)",
        "tags": [
          "models"
        ]
      },
      "post": {
        "description": "Register a new model endpoint.\n\n`secret_ref` is a secret-store reference, never the credential itself\n(SEC/AUTH-7): required for `api_key`, `bearer` and `service_principal`,\nrefused for `managed_identity`. Entra identities need `identity_config`.",
        "operationId": "create_model_api_v1_models_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModelCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Register a model endpoint (system administrators only, ML-1)",
        "tags": [
          "models"
        ]
      }
    },
    "/api/v1/models/{model_id}": {
      "delete": {
        "description": "Delete a model: soft by default, hard with `APP_MODEL_DELETE_MODE=hard`.\n\nA soft-deleted model and its versions are gone from the API, but the rows\nstay, so every pre-label it wrote keeps its author. A hard delete removes\nthem and is refused while any annotation was written by one of them: an\nannotation needs an author, and its history is never rewritten (DATA-1).",
        "operationId": "delete_model_api_v1_models__model_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "model_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Model Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete a model (system administrators only)",
        "tags": [
          "models"
        ]
      },
      "get": {
        "description": "Return one model.",
        "operationId": "get_model_api_v1_models__model_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "model_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Model Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a model by id",
        "tags": [
          "models"
        ]
      },
      "patch": {
        "description": "Partially update a model; an omitted field is left untouched.",
        "operationId": "update_model_api_v1_models__model_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "model_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Model Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModelUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Update a model (system administrators only)",
        "tags": [
          "models"
        ]
      }
    },
    "/api/v1/models/{model_id}/check": {
      "post": {
        "description": "`GET {endpoint_url}/info` with the model's credentials.\n\nA misconfigured or unreachable model must never fail the request: a bad\nsecret reference, a network error, a rejection or a timeout all come\nback as `ok: false` with an explanatory message rather than propagating.",
        "operationId": "check_model_api_v1_models__model_id__check_post",
        "parameters": [
          {
            "in": "path",
            "name": "model_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Model Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelCheckResult"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Test a model endpoint's connectivity (system administrators only, BYOM-3)",
        "tags": [
          "models"
        ]
      }
    },
    "/api/v1/models/{model_id}/family": {
      "get": {
        "description": "The derivation graph around a model: teachers, students, quantized copies.\n\nWalks `parent_version_id` both ways from every version of the model, into\nany model of the organisation, and returns the connected versions oldest\nfirst. An organisation holds tens to hundreds of versions, so the walk is\ndone in memory over one query.",
        "operationId": "get_model_family_api_v1_models__model_id__family_get",
        "parameters": [
          {
            "in": "path",
            "name": "model_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Model Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelFamily"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Versions connected to this model's through parent links (EXP-8)",
        "tags": [
          "models"
        ]
      }
    },
    "/api/v1/models/{model_id}/versions": {
      "get": {
        "description": "List a model's versions, oldest first.",
        "operationId": "list_model_versions_api_v1_models__model_id__versions_get",
        "parameters": [
          {
            "in": "path",
            "name": "model_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Model Id",
              "type": "string"
            }
          },
          {
            "description": "Page size",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 200,
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Page size",
              "title": "Limit"
            }
          },
          {
            "description": "Opaque cursor from the previous page",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Opaque cursor from the previous page",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_ModelVersionRead_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List a model's versions, oldest first",
        "tags": [
          "models"
        ]
      },
      "post": {
        "description": "Add a new version with a `class_mapping` (BYOM-2).\n\n`version` defaults to one past the model's current highest version.",
        "operationId": "create_model_version_api_v1_models__model_id__versions_post",
        "parameters": [
          {
            "in": "path",
            "name": "model_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Model Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModelVersionCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelVersionRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Add a version to a model (system administrators only, BYOM-2)",
        "tags": [
          "models"
        ]
      }
    },
    "/api/v1/models/{model_id}/versions/import": {
      "post": {
        "description": "The run's metrics, its `training_run` record and the snapshot it claims.\n\nLineage is checked as for a version added by hand (EXP-8): a run whose\n`annotation.snapshot_digest` disagrees with the snapshot it names is a 409.",
        "operationId": "import_model_version_api_v1_models__model_id__versions_import_post",
        "parameters": [
          {
            "in": "path",
            "name": "model_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Model Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModelVersionImport"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelVersionRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Add a model version from an MLflow run (system administrators, API-6)",
        "tags": [
          "ml-platforms"
        ]
      }
    },
    "/api/v1/models/{model_id}/versions/{version_id}": {
      "get": {
        "description": "Return one model version, 404 if it does not belong to `model_id`.",
        "operationId": "get_model_version_api_v1_models__model_id__versions__version_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "model_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Model Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "version_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Version Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelVersionRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a model version by id",
        "tags": [
          "models"
        ]
      }
    },
    "/api/v1/models/{model_id}/versions/{version_id}/metrics": {
      "get": {
        "description": "Compare the version's drafts with the final human version of each item.\n\n`project_id` narrows to one project (class mappings differ per project,\nso per-project numbers are the ones to read); it must belong to the\ncaller's organisation.",
        "operationId": "get_correction_metrics_api_v1_models__model_id__versions__version_id__metrics_get",
        "parameters": [
          {
            "in": "path",
            "name": "model_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Model Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "version_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Version Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CorrectionMetrics"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "How much humans corrected this version's pre-labels (ML-5)",
        "tags": [
          "models"
        ]
      }
    },
    "/api/v1/notifications": {
      "get": {
        "description": "Newest first, cursor-paginated.",
        "operationId": "list_notifications_api_v1_notifications_get",
        "parameters": [
          {
            "description": "Only unread ones",
            "in": "query",
            "name": "unread",
            "required": false,
            "schema": {
              "default": false,
              "description": "Only unread ones",
              "title": "Unread",
              "type": "boolean"
            }
          },
          {
            "description": "Page size",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 200,
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Page size",
              "title": "Limit"
            }
          },
          {
            "description": "Opaque cursor from the previous page",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Opaque cursor from the previous page",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_NotificationRead_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "The caller's notifications",
        "tags": [
          "notifications"
        ]
      }
    },
    "/api/v1/notifications/read-all": {
      "post": {
        "operationId": "read_all_api_v1_notifications_read_all_post",
        "responses": {
          "204": {
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Mark every notification read",
        "tags": [
          "notifications"
        ]
      }
    },
    "/api/v1/notifications/unread-count": {
      "get": {
        "operationId": "unread_count_api_v1_notifications_unread_count_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnreadCount"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "How many are unread",
        "tags": [
          "notifications"
        ]
      }
    },
    "/api/v1/notifications/{notification_id}/read": {
      "post": {
        "description": "Idempotent: an already-read notification keeps its original `read_at`.",
        "operationId": "read_one_api_v1_notifications__notification_id__read_post",
        "parameters": [
          {
            "in": "path",
            "name": "notification_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Notification Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Mark one notification read",
        "tags": [
          "notifications"
        ]
      }
    },
    "/api/v1/projects": {
      "get": {
        "description": "List projects, newest first: the caller's memberships, or all for a superuser.\n\nEvery other project route refuses a non-member (`ensure_project_member`),\nso the list must not reveal those projects' names or settings either.",
        "operationId": "list_projects_api_v1_projects_get",
        "parameters": [
          {
            "description": "Page size",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 200,
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Page size",
              "title": "Limit"
            }
          },
          {
            "description": "Opaque cursor from the previous page",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Opaque cursor from the previous page",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_ProjectRead_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List projects in the caller's organization",
        "tags": [
          "projects"
        ]
      },
      "post": {
        "description": "Create a project.\n\nHonours the `Idempotency-Key` header (API-2): if a project in this\norganization was already created with that key, it is returned as-is\nwith 200 rather than creating a duplicate — also when two retries race,\nin which case the loser's commit fails on the key's unique index and it\nanswers with the winner's project.",
        "operationId": "create_project_api_v1_projects_post",
        "parameters": [
          {
            "description": "Deduplicates retried creates",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Deduplicates retried creates",
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Create a project",
        "tags": [
          "projects"
        ]
      }
    },
    "/api/v1/projects/{project_id}": {
      "delete": {
        "description": "Delete a project.\n\n`Project` has no `deleted_at` column, so this is a hard delete; dependent\nrows are removed by the database's own `ON DELETE CASCADE`. Requires the\n`owner` role.",
        "operationId": "delete_project_api_v1_projects__project_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete a project (owner only)",
        "tags": [
          "projects"
        ]
      },
      "get": {
        "description": "Return one project. The caller must be a member of it.",
        "operationId": "get_project_api_v1_projects__project_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a project by id",
        "tags": [
          "projects"
        ]
      },
      "patch": {
        "description": "Partially update a project.\n\nUses `exclude_unset` so a field the client omits is left untouched, while\na field explicitly sent as `null` clears it. Requires the `owner` role.\n\nChanging where `cache/` lives (the cache connector, or the result\nconnector while no cache connector is set) queues a `rebuild_cache` job,\nsince existing thumbnails and tiles point into the old container (SRC-6);\nits id comes back in `X-Rebuild-Job-Id`. The update stands when the queue\nis unreachable: the header is then absent, and the rebuild can be queued\nlater with `POST /projects/{id}/cache/rebuild`.",
        "operationId": "update_project_api_v1_projects__project_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Update a project (owner only)",
        "tags": [
          "projects"
        ]
      }
    },
    "/api/v1/projects/{project_id}/agreement": {
      "get": {
        "description": "Owner / reviewer (QA-2): pooled over items with >= 2 submitted consensus versions.",
        "operationId": "get_project_agreement_api_v1_projects__project_id__agreement_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectAgreement"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Project-wide inter-annotator agreement",
        "tags": [
          "quality"
        ]
      }
    },
    "/api/v1/projects/{project_id}/cache/rebuild": {
      "post": {
        "description": "Queue a job that forgets and regenerates the project's thumbnails and tiles.\n\nOwner only: every item's thumbnail disappears from the grid until the\nchained `thumbnail` job writes it again. `purge` also deletes the old\nblobs from the cache connector first.",
        "operationId": "create_cache_rebuild_job_api_v1_projects__project_id__cache_rebuild_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Deduplicates retried creates",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Deduplicates retried creates",
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CacheRebuildRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Queue a derived-data cache rebuild (SRC-6)",
        "tags": [
          "jobs"
        ]
      }
    },
    "/api/v1/projects/{project_id}/exports": {
      "post": {
        "description": "Queue an export job. The archive lands at `exports/{job_id}/{format}.zip`.\n\n`format` is validated against the registered exporters via `services/datasets.py`.",
        "operationId": "create_export_job_api_v1_projects__project_id__exports_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Deduplicates retried creates",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Deduplicates retried creates",
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Queue an export job (EXP-5)",
        "tags": [
          "jobs"
        ]
      }
    },
    "/api/v1/projects/{project_id}/extract-text": {
      "post": {
        "description": "Queue an `extract_text` job: retries PDF texts that are pending or failed,\nand with `force` re-extracts ready ones nobody has annotated.\n\nOwner only. 409 when the project has no result connector to write to.",
        "operationId": "create_extract_text_job_api_v1_projects__project_id__extract_text_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Deduplicates retried creates",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Deduplicates retried creates",
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtractTextRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Queue PDF text extraction (PDF text mode)",
        "tags": [
          "jobs"
        ]
      }
    },
    "/api/v1/projects/{project_id}/gold/tasks": {
      "post": {
        "description": "Owner / reviewer (QA-4). Defaults to every `annotator` member x every gold item.",
        "operationId": "open_gold_tasks_api_v1_projects__project_id__gold_tasks_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GoldTasksRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoldTasksResult"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Open gold tasks for a project",
        "tags": [
          "quality"
        ]
      }
    },
    "/api/v1/projects/{project_id}/imports": {
      "post": {
        "description": "Queue an import of `path` on `connector_id` (default: the source connector).\n\nOwner only, like pre-labelling: an import writes annotation versions\nacross the project. `format` is validated against the registered\nimporters (`app.importers`); `dry_run` is the preview to run first.",
        "operationId": "create_import_job_api_v1_projects__project_id__imports_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Deduplicates retried creates",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Deduplicates retried creates",
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Queue an import job from a file already on a connector (EXP-6)",
        "tags": [
          "jobs"
        ]
      }
    },
    "/api/v1/projects/{project_id}/imports/upload": {
      "post": {
        "description": "Store the upload at `imports/{upload_id}/{filename}` on the result connector, then queue.\n\nThe upload is annotation data, not media, and it is bounded\n(`MAX_IMPORT_BYTES`); the job reads it back from the connector like any\nother input, so the API holds it only for the duration of this request.\n`class_mapping` and `attribute_mapping` are JSON objects in form fields.",
        "operationId": "upload_import_job_api_v1_projects__project_id__imports_upload_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_upload_import_job_api_v1_projects__project_id__imports_upload_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Upload an annotation file or archive and queue its import (EXP-6)",
        "tags": [
          "jobs"
        ]
      }
    },
    "/api/v1/projects/{project_id}/items": {
      "get": {
        "description": "List a project's items, cursor-paginated and filterable (WF-7).\n\n`assignee_id` filters by the assignee of any task on the item (items\nthemselves carry no assignee — that lives on `task`). `q` is a plain\nsubstring match against `path`; `tag` keeps items whose `meta.tags`\nholds that exact tag (set by bulk `tag`).\n\nEvery row carries a freshly signed `media_url` so the data browser can\nshow the items rather than a grid of filenames (UX-6). It is the full\nobject, not a thumbnail: real thumbnails are a worker job that phase 1\ndoes not build yet (IMG-8). `null` where the connector cannot sign.",
        "operationId": "list_items_api_v1_projects__project_id__items_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/app__schemas__item__ItemStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "media_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/MediaType"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Media Type"
            }
          },
          {
            "description": "Filter by assigned task",
            "in": "query",
            "name": "assignee_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by assigned task",
              "title": "Assignee Id"
            }
          },
          {
            "description": "Substring match on path",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Substring match on path",
              "title": "Q"
            }
          },
          {
            "description": "Items carrying this tag (meta.tags)",
            "in": "query",
            "name": "tag",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Items carrying this tag (meta.tags)",
              "title": "Tag"
            }
          },
          {
            "description": "Page size",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 200,
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Page size",
              "title": "Limit"
            }
          },
          {
            "description": "Opaque cursor from the previous page",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Opaque cursor from the previous page",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_ItemRead_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List items in a project",
        "tags": [
          "items"
        ]
      },
      "post": {
        "description": "Register a scanned object as an item.\n\nIdempotent on `(project_id, connector_id, path)`: source scans re-run and\nre-discover the same objects, so a duplicate is not an error. A duplicate\nreturns the existing row unchanged with `200 OK`; a genuinely new item\nreturns `201 Created`. Racing duplicate inserts (two scans finishing at\nonce) are resolved the same way, by falling back to the existing row when\nthe database's unique constraint rejects the second insert.",
        "operationId": "create_item_api_v1_projects__project_id__items_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ItemCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Register an item under a project",
        "tags": [
          "items"
        ]
      }
    },
    "/api/v1/projects/{project_id}/items/bulk": {
      "post": {
        "description": "Apply one action to a list of items (WF-8); owner or reviewer only.\n\nItems the action does not fit come back in `skipped` with a reason\nrather than failing the request. Approval goes through the same verdict\npath as `POST /annotations/{id}/review`, so self-review rules, tasks,\nnotifications and per-annotation audit rows all apply. One `item.bulk`\naudit row records the request itself.",
        "operationId": "bulk_update_items_api_v1_projects__project_id__items_bulk_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "discriminator": {
                  "mapping": {
                    "approve": "#/components/schemas/BulkApprove",
                    "assign": "#/components/schemas/BulkAssign",
                    "reject": "#/components/schemas/BulkReject",
                    "return": "#/components/schemas/BulkReturn",
                    "tag": "#/components/schemas/BulkTag"
                  },
                  "propertyName": "action"
                },
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/BulkAssign"
                  },
                  {
                    "$ref": "#/components/schemas/BulkReturn"
                  },
                  {
                    "$ref": "#/components/schemas/BulkApprove"
                  },
                  {
                    "$ref": "#/components/schemas/BulkReject"
                  },
                  {
                    "$ref": "#/components/schemas/BulkTag"
                  }
                ],
                "title": "Payload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkResult"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Assign, return, approve or tag many items at once",
        "tags": [
          "items"
        ]
      }
    },
    "/api/v1/projects/{project_id}/jobs": {
      "get": {
        "description": "List jobs for a project, optionally filtered by `status` and/or `type`.",
        "operationId": "list_project_jobs_api_v1_projects__project_id__jobs_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/JobStatus-Input"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/JobType-Input"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Type"
            }
          },
          {
            "description": "Page size",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 200,
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Page size",
              "title": "Limit"
            }
          },
          {
            "description": "Opaque cursor from the previous page",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Opaque cursor from the previous page",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_JobRead_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List jobs for a project",
        "tags": [
          "jobs"
        ]
      }
    },
    "/api/v1/projects/{project_id}/members": {
      "get": {
        "description": "List every member of a project, oldest membership first.\n\nOpen to any project member (any role), not just the owner.",
        "operationId": "list_members_api_v1_projects__project_id__members_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/MemberRead"
                  },
                  "title": "Response List Members Api V1 Projects  Project Id  Members Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List a project's members",
        "tags": [
          "members"
        ]
      },
      "post": {
        "description": "Add a user to a project by `user_id` or `email`, with a role.\n\nThe user must already exist in the caller's organization; a `user_id` or\n`email` from another organization is reported as `404`, never `403`, so a\ncaller cannot use this endpoint to enumerate other tenants' accounts.",
        "operationId": "add_member_api_v1_projects__project_id__members_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Add a member to a project (owner only)",
        "tags": [
          "members"
        ]
      }
    },
    "/api/v1/projects/{project_id}/members/{user_id}": {
      "delete": {
        "description": "Remove a member from a project.\n\nRefuses (`409`) to remove the project's last remaining owner.",
        "operationId": "remove_member_api_v1_projects__project_id__members__user_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Remove a member from a project (owner only)",
        "tags": [
          "members"
        ]
      },
      "patch": {
        "description": "Change a member's role.\n\nRefuses (`409`) to demote the project's last remaining owner: someone\nmust always be able to manage the project's membership.",
        "operationId": "update_member_api_v1_projects__project_id__members__user_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Change a member's role (owner only)",
        "tags": [
          "members"
        ]
      }
    },
    "/api/v1/projects/{project_id}/prelabel": {
      "post": {
        "description": "Queue a job that runs a model version over the project's items (ML-2, ML-4, ML-10).\n\nRestricted to the `owner` role: pre-labelling writes draft annotations\nacross the project, unlike the read-mostly endpoints any member can use.\n`limit` is the dry run a customer runs before committing to a full pass\n(BYOM-7).",
        "operationId": "create_prelabel_job_api_v1_projects__project_id__prelabel_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Deduplicates retried creates",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Deduplicates retried creates",
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrelabelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Queue a pre-labelling job (ML-2)",
        "tags": [
          "jobs"
        ]
      }
    },
    "/api/v1/projects/{project_id}/quality/annotators": {
      "get": {
        "description": "Owner / reviewer (QA-4).",
        "operationId": "get_annotator_quality_api_v1_projects__project_id__quality_annotators_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnnotatorQualityResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Per-annotator accuracy against gold references",
        "tags": [
          "quality"
        ]
      }
    },
    "/api/v1/projects/{project_id}/retrain": {
      "post": {
        "description": "Emit `retrain.requested` to the project's webhook subscribers. The\nplatform trains nothing itself: the customer's pipeline listens for this\nevent, reads the snapshot it names and runs. Owner only. With\n`snapshot_id` the payload carries the snapshot's digest and blob path so\nthe run can prove what it trained on (EXP-8).",
        "operationId": "request_retrain_api_v1_projects__project_id__retrain_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RetrainRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetrainResult"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Ask subscribers to retrain (ML-9)",
        "tags": [
          "webhooks"
        ]
      }
    },
    "/api/v1/projects/{project_id}/scan": {
      "post": {
        "description": "Queue a job that scans the project's source connector for new items.",
        "operationId": "create_scan_job_api_v1_projects__project_id__scan_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Deduplicates retried creates",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Deduplicates retried creates",
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScanRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Queue a source-scan job (SRC-2)",
        "tags": [
          "jobs"
        ]
      }
    },
    "/api/v1/projects/{project_id}/schemas": {
      "get": {
        "description": "Return every version of the project's label schema, newest version first.",
        "operationId": "list_schema_versions_api_v1_projects__project_id__schemas_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/LabelSchemaVersionRead"
                  },
                  "title": "Response List Schema Versions Api V1 Projects  Project Id  Schemas Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List a project's label schema versions, newest first",
        "tags": [
          "projects"
        ]
      },
      "post": {
        "description": "Create a new label schema version.\n\nVersions are immutable (TOOL-4): an existing one is never updated. The\nnew version number is `max(version) + 1` for the project's label schema,\ncomputed in SQL. The posted body is validated as a `LabelSchemaDefinition`\nbefore it is stored.",
        "operationId": "create_schema_version_api_v1_projects__project_id__schemas_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LabelSchemaDefinition"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LabelSchemaVersionRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Create the next label schema version for a project (owner only)",
        "tags": [
          "projects"
        ]
      }
    },
    "/api/v1/projects/{project_id}/snapshots": {
      "get": {
        "operationId": "list_snapshots_api_v1_projects__project_id__snapshots_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Page size",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 200,
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Page size",
              "title": "Limit"
            }
          },
          {
            "description": "Opaque cursor from the previous page",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Opaque cursor from the previous page",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_SnapshotRead_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List a project's snapshots",
        "tags": [
          "snapshots"
        ]
      },
      "post": {
        "description": "Freeze the latest annotation of every item matching `filter`.\n\nReturns the job; poll `GET /jobs/{id}` and read `result.snapshot_id`.",
        "operationId": "create_snapshot_api_v1_projects__project_id__snapshots_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Deduplicates retried creates",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Deduplicates retried creates",
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SnapshotCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Queue a snapshot job (EXP-1)",
        "tags": [
          "snapshots"
        ]
      }
    },
    "/api/v1/projects/{project_id}/snapshots/{base_id}/diff/{target_id}": {
      "get": {
        "description": "What changed from `base` to `target`: items added / removed / changed\n(with shape-level counts per changed item), class balance deltas, and\ntrain/val/test moves. Reads both snapshots' manifest and JSONL from the\nproject's result connector; the live database is not consulted, so the\nanswer is exactly about the two frozen sets.",
        "operationId": "diff_snapshot_api_v1_projects__project_id__snapshots__base_id__diff__target_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "base_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Base Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "target_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Target Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotDiff"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Compare two snapshots (EXP-4)",
        "tags": [
          "snapshots"
        ]
      }
    },
    "/api/v1/projects/{project_id}/snapshots/{snapshot_id}": {
      "get": {
        "operationId": "get_snapshot_api_v1_projects__project_id__snapshots__snapshot_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "snapshot_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Snapshot Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get one snapshot",
        "tags": [
          "snapshots"
        ]
      }
    },
    "/api/v1/projects/{project_id}/snapshots/{snapshot_id}/lineage": {
      "get": {
        "description": "List the model versions that record this snapshot (by id or by the\nsame digest) as their training data, oldest first, each with the number\nof this project's items it has written a draft for.",
        "operationId": "snapshot_lineage_api_v1_projects__project_id__snapshots__snapshot_id__lineage_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "snapshot_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Snapshot Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotLineage"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Model versions trained on a snapshot (EXP-8)",
        "tags": [
          "snapshots"
        ]
      }
    },
    "/api/v1/projects/{project_id}/snapshots/{snapshot_id}/mlflow": {
      "post": {
        "description": "A FINISHED run with the snapshot as its dataset input; nothing is copied.\n\nOwner only. 200 with `created: false` when the snapshot already has a run\nin that experiment.",
        "operationId": "publish_snapshot_api_v1_projects__project_id__snapshots__snapshot_id__mlflow_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "snapshot_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Snapshot Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SnapshotPublishRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotPublishResult"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Publish a snapshot to an ML platform as an MLflow run (API-6)",
        "tags": [
          "ml-platforms"
        ]
      }
    },
    "/api/v1/projects/{project_id}/stats": {
      "get": {
        "operationId": "get_project_stats_api_v1_projects__project_id__stats_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "default": 14,
              "maximum": 90,
              "minimum": 1,
              "title": "Days",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectStats"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Dashboard numbers for a project",
        "tags": [
          "stats"
        ]
      }
    },
    "/api/v1/projects/{project_id}/tasks": {
      "get": {
        "description": "List a project's tasks, cursor-paginated and filterable by status/type/assignee.",
        "operationId": "list_tasks_api_v1_projects__project_id__tasks_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/TaskStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/TaskType"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Type"
            }
          },
          {
            "in": "query",
            "name": "assignee_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Assignee Id"
            }
          },
          {
            "description": "Page size",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 200,
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Page size",
              "title": "Limit"
            }
          },
          {
            "description": "Opaque cursor from the previous page",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Opaque cursor from the previous page",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_TaskRead_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List tasks in a project",
        "tags": [
          "tasks"
        ]
      },
      "post": {
        "description": "Create a task on an item, assigning work to an annotator or reviewer.\n\nRestricted to the project's owner or a reviewer: creating a task assigns\nwork to someone else, which is a different permission from doing the work\nitself (any member can claim from the open queue via `POST /tasks/next`).",
        "operationId": "create_task_api_v1_projects__project_id__tasks_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Create and assign a task",
        "tags": [
          "tasks"
        ]
      }
    },
    "/api/v1/projects/{project_id}/thumbnails": {
      "post": {
        "description": "Queue a job that writes `cache/thumbnails/{item_id}.jpg` for the project's images.\n\nScans queue this on their own for new items; this endpoint exists for\nprojects scanned before thumbnails existed and for regeneration after\n`APP_THUMBNAIL_SIZE` changes (`force`).",
        "operationId": "create_thumbnail_job_api_v1_projects__project_id__thumbnails_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Deduplicates retried creates",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Deduplicates retried creates",
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ThumbnailRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Queue a thumbnail-generation job (IMG-8)",
        "tags": [
          "jobs"
        ]
      }
    },
    "/api/v1/projects/{project_id}/tiles": {
      "post": {
        "description": "Queue a job that builds a DZI tile pyramid for the project's large images.\n\nOwner or reviewer, like other actions that write derived data across the\nwhole project (`assign` / `approve` on bulk, quality management). Scans\nqueue this on their own for a new large image; this endpoint exists for\nprojects scanned before tiling existed and for `force` regeneration.",
        "operationId": "create_tile_job_api_v1_projects__project_id__tiles_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "description": "Deduplicates retried creates",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Deduplicates retried creates",
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TileJobRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Queue a large-image tiling job (IMG-1)",
        "tags": [
          "jobs"
        ]
      }
    },
    "/api/v1/projects/{project_id}/uploads": {
      "post": {
        "description": "One signed URL per file, valid for `APP_SIGNED_URL_TTL` seconds.\n\nOwner only: uploads add objects to the customer's own store. The\nbrowser PUTs each file to its `url` with `headers`, then queues a scan\n(`POST /projects/{id}/scan`) so the new objects become items.",
        "operationId": "create_upload_urls_api_v1_projects__project_id__uploads_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadUrlsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadUrlsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Mint write-scoped signed URLs for uploading files to the source connector",
        "tags": [
          "uploads"
        ]
      }
    },
    "/api/v1/ready": {
      "get": {
        "description": "Report each dependency, and return 503 when any of them is down.",
        "operationId": "ready_api_v1_ready_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReadyResponse"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Readiness probe",
        "tags": [
          "health"
        ]
      }
    },
    "/api/v1/scim/token": {
      "delete": {
        "operationId": "revoke_scim_token_api_v1_scim_token_delete",
        "responses": {
          "204": {
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Turn SCIM provisioning off (superuser)",
        "tags": [
          "scim"
        ]
      },
      "get": {
        "operationId": "scim_token_state_api_v1_scim_token_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScimTokenState"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Whether SCIM provisioning is on (superuser)",
        "tags": [
          "scim"
        ]
      },
      "post": {
        "operationId": "mint_scim_token_api_v1_scim_token_post",
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScimTokenRead"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Mint (replace) the organisation's SCIM token (superuser)",
        "tags": [
          "scim"
        ]
      }
    },
    "/api/v1/scim/v2/Groups": {
      "get": {
        "operationId": "list_groups_api_v1_scim_v2_Groups_get",
        "parameters": [
          {
            "in": "query",
            "name": "filter",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 1000,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Filter"
            }
          },
          {
            "in": "query",
            "name": "startIndex",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 20,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Startindex"
            }
          },
          {
            "in": "query",
            "name": "count",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 20,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Count"
            }
          },
          {
            "in": "query",
            "name": "excludedAttributes",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 200,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Excludedattributes"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/scim+json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Groups Api V1 Scim V2 Groups Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List SCIM groups",
        "tags": [
          "scim"
        ]
      },
      "post": {
        "operationId": "create_group_api_v1_scim_v2_Groups_post",
        "responses": {
          "201": {
            "content": {
              "application/scim+json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Create Group Api V1 Scim V2 Groups Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Create a SCIM group",
        "tags": [
          "scim"
        ]
      }
    },
    "/api/v1/scim/v2/Groups/{group_id}": {
      "delete": {
        "operationId": "delete_group_api_v1_scim_v2_Groups__group_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "group_id",
            "required": true,
            "schema": {
              "title": "Group Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete a SCIM group",
        "tags": [
          "scim"
        ]
      },
      "get": {
        "operationId": "get_group_api_v1_scim_v2_Groups__group_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "group_id",
            "required": true,
            "schema": {
              "title": "Group Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "excludedAttributes",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 200,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Excludedattributes"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/scim+json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Get Group Api V1 Scim V2 Groups  Group Id  Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Read a SCIM group",
        "tags": [
          "scim"
        ]
      },
      "patch": {
        "operationId": "patch_group_api_v1_scim_v2_Groups__group_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "group_id",
            "required": true,
            "schema": {
              "title": "Group Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Patch a SCIM group",
        "tags": [
          "scim"
        ]
      },
      "put": {
        "operationId": "replace_group_api_v1_scim_v2_Groups__group_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "group_id",
            "required": true,
            "schema": {
              "title": "Group Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/scim+json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Replace Group Api V1 Scim V2 Groups  Group Id  Put",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Replace a SCIM group",
        "tags": [
          "scim"
        ]
      }
    },
    "/api/v1/scim/v2/ResourceTypes": {
      "get": {
        "operationId": "resource_types_api_v1_scim_v2_ResourceTypes_get",
        "responses": {
          "200": {
            "content": {
              "application/scim+json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Resource Types Api V1 Scim V2 Resourcetypes Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "SCIM resource types",
        "tags": [
          "scim"
        ]
      }
    },
    "/api/v1/scim/v2/Schemas": {
      "get": {
        "operationId": "schemas_api_v1_scim_v2_Schemas_get",
        "responses": {
          "200": {
            "content": {
              "application/scim+json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Schemas Api V1 Scim V2 Schemas Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "SCIM schemas",
        "tags": [
          "scim"
        ]
      }
    },
    "/api/v1/scim/v2/ServiceProviderConfig": {
      "get": {
        "operationId": "service_provider_config_api_v1_scim_v2_ServiceProviderConfig_get",
        "responses": {
          "200": {
            "content": {
              "application/scim+json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Service Provider Config Api V1 Scim V2 Serviceproviderconfig Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "SCIM service provider configuration",
        "tags": [
          "scim"
        ]
      }
    },
    "/api/v1/scim/v2/Users": {
      "get": {
        "operationId": "list_users_api_v1_scim_v2_Users_get",
        "parameters": [
          {
            "in": "query",
            "name": "filter",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 1000,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Filter"
            }
          },
          {
            "in": "query",
            "name": "startIndex",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 20,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Startindex"
            }
          },
          {
            "in": "query",
            "name": "count",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 20,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Count"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/scim+json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response List Users Api V1 Scim V2 Users Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List SCIM users",
        "tags": [
          "scim"
        ]
      },
      "post": {
        "operationId": "create_user_api_v1_scim_v2_Users_post",
        "responses": {
          "201": {
            "content": {
              "application/scim+json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Create User Api V1 Scim V2 Users Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Provision a SCIM user",
        "tags": [
          "scim"
        ]
      }
    },
    "/api/v1/scim/v2/Users/{user_id}": {
      "delete": {
        "operationId": "delete_user_api_v1_scim_v2_Users__user_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "title": "User Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Deprovision a SCIM user (deactivate and hide)",
        "tags": [
          "scim"
        ]
      },
      "get": {
        "operationId": "get_user_api_v1_scim_v2_Users__user_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "title": "User Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/scim+json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Get User Api V1 Scim V2 Users  User Id  Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Read a SCIM user",
        "tags": [
          "scim"
        ]
      },
      "patch": {
        "operationId": "patch_user_api_v1_scim_v2_Users__user_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "title": "User Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/scim+json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Patch User Api V1 Scim V2 Users  User Id  Patch",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Patch a SCIM user",
        "tags": [
          "scim"
        ]
      },
      "put": {
        "operationId": "replace_user_api_v1_scim_v2_Users__user_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "title": "User Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/scim+json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Replace User Api V1 Scim V2 Users  User Id  Put",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Replace a SCIM user",
        "tags": [
          "scim"
        ]
      }
    },
    "/api/v1/service-accounts": {
      "get": {
        "operationId": "list_service_accounts_api_v1_service_accounts_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/UserRead"
                  },
                  "title": "Response List Service Accounts Api V1 Service Accounts Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List service accounts (superuser)",
        "tags": [
          "auth"
        ]
      },
      "post": {
        "description": "A user row that cannot sign in; give it project memberships and a key.",
        "operationId": "create_service_account_api_v1_service_accounts_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceAccountCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Create a service account (superuser)",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/service-accounts/{user_id}": {
      "delete": {
        "operationId": "delete_service_account_api_v1_service_accounts__user_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Deactivate a service account and revoke its keys (superuser)",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/storage/local/{connector_id}/{path}": {
      "get": {
        "description": "Return one object's bytes if the signature covers it and is still live.\n\nSignature first, database second: an unsigned request must not be able to\nprobe which connector ids exist. Expiry and signature failures are both\n403 with the same body, so a caller cannot tell a forged signature from a\nstale one.\n\nA `Range: bytes=...` header is answered with 206 and `Content-Range`, so\naudio and video can seek without the whole file passing through the API.",
        "operationId": "get_local_object_api_v1_storage_local__connector_id___path__get",
        "parameters": [
          {
            "description": "The local connector that owns the object",
            "in": "path",
            "name": "connector_id",
            "required": true,
            "schema": {
              "description": "The local connector that owns the object",
              "format": "uuid",
              "title": "Connector Id",
              "type": "string"
            }
          },
          {
            "description": "Object path, relative to the connector root",
            "in": "path",
            "name": "path",
            "required": true,
            "schema": {
              "description": "Object path, relative to the connector root",
              "title": "Path",
              "type": "string"
            }
          },
          {
            "description": "Absolute Unix timestamp the signature dies at",
            "in": "query",
            "name": "expires",
            "required": true,
            "schema": {
              "description": "Absolute Unix timestamp the signature dies at",
              "title": "Expires",
              "type": "integer"
            }
          },
          {
            "description": "HMAC over connector id, path and expiry",
            "in": "query",
            "name": "sig",
            "required": true,
            "schema": {
              "description": "HMAC over connector id, path and expiry",
              "title": "Sig",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {}
            },
            "description": "The object's bytes"
          },
          "206": {
            "content": {
              "*/*": {}
            },
            "description": "The bytes a `Range` header asked for"
          },
          "403": {
            "description": "Missing, malformed or expired signature"
          },
          "404": {
            "description": "No such local connector, or no such object"
          },
          "416": {
            "description": "The range starts past the end of the object"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Serve one object from a local connector against a signed URL",
        "tags": [
          "storage"
        ]
      },
      "put": {
        "description": "Write the request body as the object the signature names.\n\nThe write half of the proxy, minted by `POST /projects/{id}/uploads` for\na `local` source connector. The signature is checked with the write\nscope, so a read URL (which any item listing hands out) cannot be\nreplayed here. Same ordering as the read route: signature before any\ndatabase lookup.",
        "operationId": "put_local_object_api_v1_storage_local__connector_id___path__put",
        "parameters": [
          {
            "description": "The local connector that owns the object",
            "in": "path",
            "name": "connector_id",
            "required": true,
            "schema": {
              "description": "The local connector that owns the object",
              "format": "uuid",
              "title": "Connector Id",
              "type": "string"
            }
          },
          {
            "description": "Object path, relative to the connector root",
            "in": "path",
            "name": "path",
            "required": true,
            "schema": {
              "description": "Object path, relative to the connector root",
              "title": "Path",
              "type": "string"
            }
          },
          {
            "description": "Absolute Unix timestamp the signature dies at",
            "in": "query",
            "name": "expires",
            "required": true,
            "schema": {
              "description": "Absolute Unix timestamp the signature dies at",
              "title": "Expires",
              "type": "integer"
            }
          },
          {
            "description": "Write-scoped HMAC over connector id, path and expiry",
            "in": "query",
            "name": "sig",
            "required": true,
            "schema": {
              "description": "Write-scoped HMAC over connector id, path and expiry",
              "title": "Sig",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Stored"
          },
          "403": {
            "description": "Missing, malformed, expired or read-only signature"
          },
          "404": {
            "description": "No such local connector"
          },
          "413": {
            "description": "Body over MAX_UPLOAD_BYTES"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Store one object on a local connector against a write-scoped signed URL",
        "tags": [
          "storage"
        ]
      }
    },
    "/api/v1/tasks/next": {
      "post": {
        "description": "Claim the highest-priority open task in a project (WF-2, WF-3).\n\n`project_id` may come from the query string or the JSON body — whichever\nis given; the query parameter wins if both are present. `type` narrows the\nclaim to `annotate` or `review` tasks, also accepted as either the query\nparameter or the JSON body's `type` field with the same query-wins rule;\nomitted, either kind of task is eligible. Claiming a task also takes its\nlock (see `app.services.tasks.claim_next_task` for the race this guards\nagainst and why it is safe under concurrent claims).\n\nAn empty queue is a normal state, not an error: returns `204 No Content`\nrather than `404`.",
        "operationId": "claim_next_api_v1_tasks_next_post",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/TaskType"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Type"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/ClaimRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Payload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "204": {
            "description": "No open task is available right now."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Claim the next open task",
        "tags": [
          "tasks"
        ]
      }
    },
    "/api/v1/tasks/{task_id}": {
      "patch": {
        "description": "Change a live task's `priority`, `deadline` or `assignee_id` (WF-6).\n\nOwner or reviewer only, like `POST /projects/{id}/tasks`: this decides\nwho works on what and when. Only keys present in the body change, so\n`{\"deadline\": null}` clears the deadline while `{}` is a no-op. A `done`\nor `cancelled` task, or reassigning one somebody is working on, is a 409.",
        "operationId": "patch_task_api_v1_tasks__task_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "task_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Task Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Re-prioritise, re-schedule or re-assign a task",
        "tags": [
          "tasks"
        ]
      }
    },
    "/api/v1/tasks/{task_id}/extend": {
      "post": {
        "description": "Push a held lock's expiry forward for a long-running annotation.\n\nOnly the current lock holder may extend; anyone else gets `409\ntask-locked`. `lock_ttl_seconds` defaults to `settings.task_lock_ttl` when\nomitted.",
        "operationId": "extend_api_v1_tasks__task_id__extend_post",
        "parameters": [
          {
            "in": "path",
            "name": "task_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Task Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/ExtendRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Payload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Extend (heartbeat) the lock on a task",
        "tags": [
          "tasks"
        ]
      }
    },
    "/api/v1/tasks/{task_id}/release": {
      "post": {
        "description": "Release `task_id`'s lock, returning it to the open queue.\n\nOnly the current lock holder or a superuser may release someone else's\nlock; anyone else gets `409 task-locked` (see\n`app.services.tasks.release_task`).",
        "operationId": "release_api_v1_tasks__task_id__release_post",
        "parameters": [
          {
            "in": "path",
            "name": "task_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Task Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Release the lock on a task",
        "tags": [
          "tasks"
        ]
      }
    },
    "/api/v1/users": {
      "get": {
        "operationId": "list_users_api_v1_users_get",
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 200,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 500,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/UserRead"
                  },
                  "title": "Response List Users Api V1 Users Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the organisation's people (superuser)",
        "tags": [
          "users"
        ]
      }
    },
    "/api/v1/users/{user_id}/erase": {
      "post": {
        "operationId": "erase_user_api_v1_users__user_id__erase_post",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EraseRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Pseudonymise a person (GDPR erasure, superuser)",
        "tags": [
          "users"
        ]
      }
    },
    "/api/v1/users/{user_id}/personal-data": {
      "get": {
        "operationId": "export_personal_data_api_v1_users__user_id__personal_data_get",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonalDataExport"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Export everything held about a person (GDPR access)",
        "tags": [
          "users"
        ]
      }
    },
    "/api/v1/webhooks": {
      "get": {
        "description": "Organisation-wide hooks for superusers; with `project_id`, that project's\nhooks for its owners (superusers see both kinds for the project).",
        "operationId": "list_webhooks_api_v1_webhooks_get",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "description": "Page size",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 200,
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Page size",
              "title": "Limit"
            }
          },
          {
            "description": "Opaque cursor from the previous page",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Opaque cursor from the previous page",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_WebhookRead_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List webhooks",
        "tags": [
          "webhooks"
        ]
      },
      "post": {
        "description": "Returns the hook with its signing `secret` — the only time it is shown.",
        "operationId": "create_webhook_api_v1_webhooks_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookCreated"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Subscribe a URL to events",
        "tags": [
          "webhooks"
        ]
      }
    },
    "/api/v1/webhooks/{webhook_id}": {
      "delete": {
        "operationId": "delete_webhook_api_v1_webhooks__webhook_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Webhook Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete a webhook",
        "tags": [
          "webhooks"
        ]
      },
      "get": {
        "operationId": "get_webhook_api_v1_webhooks__webhook_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Webhook Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a webhook",
        "tags": [
          "webhooks"
        ]
      },
      "patch": {
        "description": "Only keys present in the body change. With `rotate_secret` the response\ncarries the new `secret` once; otherwise `secret` is absent.",
        "operationId": "update_webhook_api_v1_webhooks__webhook_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Webhook Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookUpdated"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Update a webhook, optionally rotating its secret",
        "tags": [
          "webhooks"
        ]
      }
    },
    "/api/v1/webhooks/{webhook_id}/deliveries": {
      "get": {
        "operationId": "list_deliveries_api_v1_webhooks__webhook_id__deliveries_get",
        "parameters": [
          {
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Webhook Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/WebhookDeliveryStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "description": "Page size",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 200,
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Page size",
              "title": "Limit"
            }
          },
          {
            "description": "Opaque cursor from the previous page",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Opaque cursor from the previous page",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_WebhookDeliveryRead_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delivery log of a webhook, newest first",
        "tags": [
          "webhooks"
        ]
      }
    },
    "/api/v1/webhooks/{webhook_id}/test": {
      "post": {
        "description": "Queues one `webhook.test` event for this hook alone (whatever its\nsubscriptions), so a subscriber can check signature verification.",
        "operationId": "test_webhook_api_v1_webhooks__webhook_id__test_post",
        "parameters": [
          {
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Webhook Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Queue a webhook.test delivery",
        "tags": [
          "webhooks"
        ]
      }
    }
  }
}
