parse
Parse a document into structured text, Markdown, or block JSON.
Cost class: job (processing units proportional to page count and OCR load; billed on completion).
Accepts any source a granular operation can read — a staged upload, an https:// URL, a workspace file, or a prior Parse job. Returns 202 with a queued :class:~ndi_service.app.platform_api.results.Job immediately; pass ?wait_seconds=N to block up to N seconds for the result inline.
OCR is applied automatically when the document needs it; the result's ocr_applied flag reports whether it ran.
Args: body: Parse parameters: source, optional page range, and desired output formats. caller: Authenticated tenant. session: Database session. wait_seconds: Bounded inline wait (0 → immediate 202). idempotency_key: Replaying with the same key returns the original job. response: Injected by FastAPI to set the response status code.
Returns: A :class:~ndi_service.app.platform_api.results.Job; read status regardless of whether the response is 200 or 202.
Request
- Base URLhttps://ndi-api.nace.ai (the document declares no server; this is the origin it was published from)
- AuthAPI key in header X-API-Key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
Bounded inline wait. 0 (the default) returns 202 immediately. Above 0 the route returns 200 with a terminal job if the work finished in time, and 202 with the still-running job if it did not. Either way, read status.
Headers
Replaying a request with the same key returns the original job with 200, never a second job. The key is kept with the job for replay and never cleared, so it must not contain personal data.
Request body
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.