public-api

Validate Extract Schema

Validate an Extract schema without creating a job or consuming credits.

post/api/v1/extract/schema/validate

Request

Request body

schemaobject required

JSON Schema describing the data to extract. Root must be an object with properties; nesting is bounded; composition keywords ($ref/anyOf/oneOf/allOf/not) are not supported. A field may use one type string or a nullable two-member type such as ["string", "null"]. Closed objects may use additionalProperties: false; true or schema-valued additionalProperties are not supported. Field descriptions directly guide extraction accuracy. Top-level arrays are extracted segment-by-segment across long documents and concatenated.

Example request

{
  "schema": {
    "additionalProperties": false,
    "properties": {
      "invoice_number": {
        "description": "Invoice identifier.",
        "type": "string"
      },
      "inspection_year": {
        "description": "Inspection year, or null when the document does not establish one.",
        "type": [
          "integer",
          "null"
        ]
      }
    },
    "type": "object"
  }
}

Response

Successful Response

validtrue

Changes

No recorded changes to this operation across all 1 revision of this API.