extract
Extract schema-shaped structured data from a document.
Cost class: job (LLM inference + parsing; billed on completion).
Provide an inline schema or a registered schema_id. The effective schema is validated before the job is accepted; use POST /v1/extract/schema-validation to pre-check yours. Exactly one of schema_id or schema must be present. Optional schema_version pins a registry version when schema_id is set.
Citations are enabled by default (citations.enabled=true). Located fields carry :class:~ndi_service.app.platform_api.contracts.Citation entries (location + optional source_text). A field the model could not find is returned as status=not_found, never silently omitted.
Args: body: Extraction parameters: source, schema, and citation preference. caller: Authenticated tenant. session: Database session. wait_seconds: Bounded inline wait. idempotency_key: Idempotent replay key. response: Injected by FastAPI for status-code management.
Returns: A :class:~ndi_service.app.platform_api.results.Job.
Raises: PlatformError: schema_not_found when schema_id is unknown; invalid_schema when the inline or registered schema fails the same compiler check the extraction pipeline applies.
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.