Skip to main content
POST
JavaScript

Headers

authorization
string | null

Body

multipart/form-data
file
file
required
prompt
string
required
response_schema
string | null
ingestion_options
string
default:{}

Response

Successful Response

Response model for document query with optional ingestion follow-up.

structured_output
any | null

Raw structured output returned from Morphik On-the-Fly (may be list/dict)

extracted_metadata
Extracted Metadata · object | null

Structured output coerced to metadata when possible

text_output
string | null

Raw text returned from Morphik On-the-Fly when no schema is provided

ingestion_enqueued
boolean
default:false

True when the document was queued for ingestion after extraction

ingestion_document
Document · object | null

Queued document stub when ingestion_enqueued is true

input_metadata
Input Metadata · object

Original metadata supplied alongside the request

combined_metadata
Combined Metadata · object

Metadata that would be used if ingestion is performed

ingestion_options
IngestionOptions · object

Normalized ingestion options applied to this request