Skip to main content
POST
classify

Authorizations

X-API-Key
string
header
required

Headers

Idempotency-Key
string | null

Use the same key to recover an earlier request. A replay returned as a Job carries Idempotent-Replayed: true and replayed: true without a new charge; Job credits keeps the original cost. Re-serving a settled inline tool answer reports zero credits for that call and also carries Idempotent-Replayed: true; a fresh re-execution after a transient failure carries no header. The key is kept with the job for replay and never cleared, so it must not contain personal data.

Maximum string length: 200

Query Parameters

wait_seconds
integer
default:0

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. Waiting does not change how an admitted job is counted and takes no max_concurrent_sync slot (that limits synchronous calls such as the legacy synchronous API and /v1/systemone). For retained jobs, the deployment may shorten the wait and return 202 with the running job; poll GET /v1/jobs/{job_id}. For parse, split, classify, categorize, extract and ground, a zero_retention tenant must pass wait_seconds above 0 unless the deployment holds Zero-retention results for 24 hours, in which case it polls GET /v1/jobs/{job_id} instead.

Required range: 0 <= x <= 300

Body

application/json

Body for canonical POST /v1/classify.

The canonical p0 surface classifies one document against caller-provided classes. Internally this still adapts onto the shared categorize workflow.

classes
ClassifyClass · object[]
required

Caller-defined classes to score the document against.

Minimum array length: 1
source
UploadSource · object
required

Bytes staged through POST /v1/uploads. Retained until explicit deletion, except under Zero retention.

context
ClassifyContext · object | null

Caller-supplied context about the document, such as the audited entity's name.

corpus_sources
WorkspaceFileSource · object[]

Workspace files visible in the run tray, including files not submitted by this request.

Maximum array length: 50
granularity
enum<string>
default:document

Score the whole document once, or return one unit per selected page.

Available options:
document,
page
name
string | null

Optional display name. Public Parse, Split, Classify, Extract, and Ground runs use a stable server default when blank. The console calls a named run a 'project'.

Maximum string length: 200
output
ClassifyOutputOptions · object

How many alternative labels to keep and whether to include reasons.

output_workspace_id
string<uuid> | null

Workspace for retained result artifacts. Defaults to the unique source workspace, or a reused Parse's output workspace. Required for ambiguous destinations involving customer storage. Does not change source access.

page_ranges
PageRange · object[] | null

One-based inclusive page ranges to classify. Omit to use the whole document. Not supported for spreadsheets (.xlsx, .xls, .xlsm, .csv, .parquet): the request is refused with 422 invalid_request and detail.reason spreadsheet_source. A workspace file is a spreadsheet when file_type on GET /v1/workspaces/{workspace_id}/files/{file_id} is one of those extensions.

Required array length: 1 - 200 elements
parse
ParseSettings · object | null

Settings for the Parse that runs before this operation, using the same fields as Parse. Omit to use the default Parse. parse.parse_mode and the top-level parse_mode must agree when both are set, and so must parse.page_ranges and page_ranges. A setting that does not apply is reported in warnings.

parse_mode
enum<string>
default:low

How much parsing effort to use: Low uses native OCR, Medium routes to the best parser, and High adds page verification and correction.

Available options:
low,
medium,
high
project_id
string<uuid> | null

Caller-minted grouping id; jobs submitted together share it. Not a server-side resource.

result_delivery
string | null

Zero retention only. Deliver the result to the explicit customer-storage output_workspace_id instead of returning it inline. The source must be a workspace file; send wait_seconds=0 and download the result from result_download_url. Omit for default delivery.

Allowed value: "workspace"
unknown_policy
enum<string>
default:allow

allow may mark a unit unknown. force_best commits an ambiguous unit to one of your classes instead of abstaining. A blank or unreadable page the model sees is assigned the closest listed class — the closed decode vocabulary has no page-state tokens. A unit that could not be parsed is still returned unknown, and so is an empty spreadsheet tab. Pages never read by any model because of document size are also returned unknown and disclosed as classification_unread_pages.

Available options:
allow,
force_best

Response

Terminal job or idempotent replay of the original job; read status and replayed.

Every slow method returns one of these (spec 12 §1.4).

There is no /parse + /parse_async pair: every job-creating route returns 202 with a queued job and accepts ?wait_seconds=, returning 200 with a terminal job if the work finished inside the window. The caller's code path is the same either way — read status.

created_at
string<date-time>
required

When the job row was created.

job_id
string<uuid>
required

Server-minted id. Poll GET /v1/jobs/{job_id} or pass wait_seconds on create.

kind
enum<string>
required

Which operation created this job. Discriminates the result payload.

Available options:
parse,
split,
classify,
categorize,
extract,
ground,
ingestion,
reconciliation,
kg_build,
file_upload,
file_replace,
upload_session_complete,
file_delete,
files_delete,
workspace_delete,
intelligent_search,
folder_metadata,
file_metadata,
read_file,
hybrid_search,
grep,
run_sql,
locate,
qa_file,
qa_tables,
filtered_search,
je_testing,
je_testing_v2,
deep_search_v2,
automatic_agent,
ledger_understanding,
ledger_understanding_reset,
ledger_parse_exhibits,
tenant_purge,
storage_connection_validate
status
enum<string>
required

Lifecycle: queued, running, succeeded, failed, or cancelled.

Available options:
queued,
running,
succeeded,
failed,
cancelled
cost
JobCost · object | null

Final USD component prices under the sheet pinned at acceptance; null before finalization or when no dollar sheet was configured. Does not change legacy credit billing.

credit_schedule_version
integer | null

Version of the credit schedule credits were priced under. Null until usage_final is true.

credits
integer | null

Final credits billed for this job, priced once under credit_schedule_version. Null until usage_final is true. Never changes afterwards, including after payload expiry or deletion. Failed and cancelled-before-completion jobs finalize with 0 credits, including delivered parts; ones finalized before that policy keep their credits. Always null on a stage job that Automatic Search delegated: its work is billed on the parent job.

deleted_at
string<date-time> | null

When the caller hid this run from listings, via delete_job. A soft delete: the job still reads by id and still counts toward GET /v1/usage — what it stops doing is appearing in GET /v1/jobs.

effort
string | null

How hard this run worked, for the search kinds that carry it. A deep-search job (kind deep_search_v2) created before the effort knob was removed echoes its requested level: 'low', 'medium', or 'high'; newer deep-search jobs, which all run one configuration, read null. An intelligent_search row carries an internal selector instead: 'fast' is fact-search, 'automatic' is automatic-search, and 'deep' (or the legacy 'balanced') is a deep-search or console QA chat job created before the 2026-09 consolidation — those two are not distinguishable by this field. Null for every other kind. Read from the stored request, so it rides the same retention path as query and result: null once result_state leaves available.

error
Error · object | null

Typed failure envelope when status is failed. Null on any other status, and while result_error withholds content.

finished_at
string<date-time> | null

When the job reached a terminal status.

force
boolean | null

The request's own force flag, echoed regardless of outcome. Present for kinds whose request carries one (e.g. kg_build, where a true value cleared the durable store before the job ran) so a caller can tell that apart from a build that failed leaving the prior store untouched — result alone cannot, since it is absent on failure either way.

idempotency_key
string | null

Key that was replayed to return this job. Absent when the create call had no Idempotency-Key.

name
string | null

Display name (the console's 'project'). Public Parse, Split, Classify, Extract, and Ground runs supply a stable server default when blank; citation-generated Ground jobs are excluded. mutable via PATCH /v1/jobs/{job_id}.

payload_expires_at
string<date-time> | null

Cleanup deadline after explicit deletion. Null for retained content; Zero retention uses its delivery window.

progress
JobProgress · object | null

Live progress while the job is running. Null while queued and after the job finishes.

project_id
string<uuid> | null

Caller-minted grouping id shared by jobs submitted together. Filterable on GET /v1/jobs.

query
string | null

The question this job was asked, for the search kinds that carry one (intelligent_search, qa_file, qa_tables, filtered_search); null for every other kind. Read from the stored request, so it rides the same retention path as result: null once result_state leaves available. Narrow by design — the frozen access context never reaches the wire. File scope is summarised separately as query_scope.

query_scope
WorkspaceQueryScope · object

The question ran against the whole workspace.

replayed
boolean
default:false

True only on an idempotent replay response. No new charge is made; credits remains the original job's cost.

result
StorageConnectionValidationResult · object

Present on succeeded while retained. Also present on a running classify or extract job that already published a progressive result (labels or values). Null while queued, after its content is removed, and once the job, or the job it ran for, is cancelled.

result_download_url
string | null

Authenticated result.json download path for a completed Zero-retention workspace Parse.

result_error
Error · object | null

Current storage refusal withholding content. Separate from the recorded job outcome; cleared when access returns.

result_state
enum<string>
default:available

Why result may be null. storage_unavailable means its workspace binding currently refuses content access; available with a null result means the job has not succeeded yet; expired and not_retained mean the payload was dropped by retention or the job was deleted; cancelled means the job, or the job it ran for, was cancelled, so no result is served (a job cancelled before completion is not charged).

Available options:
available,
expired,
not_retained,
cancelled,
storage_unavailable
source
UploadSource · object

Bytes staged through POST /v1/uploads. Retained until explicit deletion, except under Zero retention.

started_at
string<date-time> | null

When execution began. Null while still queued.

surface
enum<string> | null

Which console history this deep-search job belongs to. deep_search is the public route and the Deep Search page; qa and workbook are the console chat skins over the same agent. It does not pick the implementation. Null for fact-search and every non-deep-search kind. Jobs stored before this field existed echo deep_search. Read from the stored payload, so it rides the same retention path as query.

Available options:
deep_search,
qa,
workbook
units
integer
default:0

Measured work in legacy credit units, retained even when a failed or cancelled job is not billed. Kept for compatibility: credits is the authoritative billed amount.

usage
JobUsage · object | null

What credits were charged for: one line per part (the parse, the tool's own work), with the quantity, rate and multiplier behind each. Null until usage_final is true, and on jobs finalized before usage breakdowns were introduced.

usage_final
boolean
default:false

True once credits is final and will not change. False while the job is queued or running, and until any cleanup of its delegated stages has been accounted for. A failed tool job (read_file, run_sql, hybrid_search, grep, file_metadata, folder_metadata) created with an Idempotency-Key stays false for one hour after it fails, because a retry with the same key re-runs it; after that hour it is final and the retry returns the stored error.

usage_finalized_at
string<date-time> | null

When credits became final. Null until usage_final is true.

workspace_id
string<uuid> | null

The workspace this job reads. Null for a document operation whose source is an upload, a URL, or a prior parse result.