public-api

Extract Async

Start an extract job: pull schema-shaped structured data out of a document.

post/api/v1/extract_async

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.

markdown_urlstring nullable

Markdown from a prior parse of the same file; skips the internal parse when present.

idempotency_keystring nullable

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

Idempotent replay — a job with this idempotency_key already exists; body is its current state.

job_idstring uuid required
actionstring required

One of parse/ground/categorize/extract.

statusstring required

One of pending/running/succeeded/failed.

is_exampleboolean

True for provisioned Playground example jobs.

created_atstring date-time required
started_atstring date-time nullable
completed_atstring date-time nullable
credits_usedinteger nullable

Credits charged to this job per the ledger. 0 for failed/cancelled jobs (never charged) and zero-credit example jobs; null while the job is non-terminal (not counted yet) or for a succeeded job predating the ledger.

Changes

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