Analyses
Starts an analysis of uploaded files. files lists the complete set of files to analyze,
and spec says what to look for: a builtin template, or your own fields, checks, document
types and collection requirements.
By default the request returns at once. Send Prefer: wait=<seconds> to wait up to 30
seconds for the result. The status code says whether the analysis has finished:
200: the analysis succeeded, failed or was canceled.202: the analysis is still queued or running. Read it at theLocationURL afterRetry-Afterseconds, or wait for a webhook.
A live analysis is charged to the prepaid balance once, when it is created: a base price
plus a price per page, per field and per check. Retries are not charged. If the balance is
too low, the request returns 402 insufficient_balance and creates nothing. A failed
analysis, or one canceled before work starts, is refunded.
A test key validates the request and its resolved specification, then returns a succeeded
sample result at once, free of charge.
Custom document types are not supported yet. A nonempty spec.documents.custom returns
422 unsupported_candidate.
BearerAuthAuthorizationBearer <token>A partner API key, sent as Authorization: Bearer <key>. Live keys look like sk_live_<lookup>_<secret> and test keys like sk_test_<lookup>_<secret>. A key sees only data of its own mode.
x-request-id?stringYour ID for correlating this request with your logs, up to 128 bytes. If it is missing, empty or longer, the API generates one as req_<uuid>. The response echoes the ID in x-request-id, and error bodies repeat it in request_id.
1 <= length <= 128Idempotency-Key*stringA unique key per create request, such as a UUID, so that a retry cannot create the resource twice.
- A retry with the same key and input returns the original resource in its current state, without running the work again. Defaults for omitted values stay as first resolved.
- The same key with different input returns
409 idempotency_conflict, even after the resource was deleted. - A retry with the same key and input after the resource was deleted or expired returns
410 resource_deleted.
Keys are scoped to the integration, the key's mode and the operation. They survive API key rotation and are removed with the integration.
Inputs match only when they are identical. An omitted member differs from one sent
explicitly, even as null, and array order matters. An upload compares the file's content
digest, accepted file name, media type and options. The multipart boundary, credentials,
x-request-id and Prefer are ignored.
^[!-~]+$1 <= length <= 255Prefer?stringWaits up to 30 seconds for the analysis to finish before answering, as Prefer: wait=<seconds>. Without it, the request returns at once.
1 <= lengthThe files to analyze and what to look for. For idempotency, the body is compared as sent, before defaults are filled in. Omitted reference_date, language and catalog version are resolved only when a new analysis is created.
application/json- body
The complete set of files and what to look for in them. For collection requirements, send one analysis per person or account.
files*array<>The IDs of the files to analyze, each listed once.
1 <= itemsspec*|What to look for: a builtin template, or your own fields, checks, document types and collection requirements.
reference_date?DateThe date against which document ages and periods are evaluated. It defaults to the current UTC date when the analysis is created.
datelanguage?LanguageThe language of the texts in the result. An unsupported language returns 422 unsupported_language.
1 <= length"de"external_id?ExternalIdYour own reference, such as a case number. It is returned unchanged, need not be unique and is never used to detect duplicates.
1 <= lengthretention_days?RetentionDaysHow many days to keep this analysis before it is deleted automatically, from 1 up to the integration's retention period. Without it, that period applies, 30 days by default. Other values, such as 0, return 422 invalid_spec. An analysis expires no later than its earliest-expiring input file.
1 <= value <= 90The analysis has finished with succeeded, failed or canceled. A failed analysis is a normal response and carries error. A retry with the same Idempotency-Key also returns 200 once the analysis has finished.
application/json- response
An analysis waiting to be processed. It has no result or error yet.
id*AnalysisIdThe ID of the analysis.
^ana_[A-Za-z0-9_-]+$mode*ModeWhether this is a test or a live analysis, decided by the key that created it.
"test""live"status*"queued"queued: waiting for its files to be ready or for processing to start.
"queued"external_id?ExternalIdYour own reference, such as a case number. It is returned unchanged, need not be unique and is never used to detect duplicates.
1 <= lengthcatalog_version?CatalogVersionThe catalog version the analysis was created with. Later catalog changes do not affect it.
1 <= lengthreference_date?DateThe date against which document ages and periods are evaluated: the date you sent, or the UTC date of creation.
dateengine_revision?EngineRevisionThe version of the analysis engine that produced the result. Test analyses report test-fixtures.v<n>, and deployments with mock models report a revision starting with mock-.
1 <= lengthexpires_at?DateTimeWhen the analysis and its result are deleted automatically.
date-timeusage?What the analysis processed. A completed analysis reports pages, fields and checks, also when they are zero.
curl -X POST 'https://api.aircredit.de/partner/v1/analyses' \ -H 'Idempotency-Key: 5f0c8e2a-6b1d-4c3e-9a7f-2d4b8c1e0a93' \ -H 'Content-Type: application/json' \ -d '{ "files": [ "file_8f2a", "file_c411" ], "reference_date": "2026-10-07", "language": "de", "external_id": "loan-482", "spec": { "fields": { "net_income": { "builtin": "net_salary" }, "employer": { "builtin": "employer" }, "employee_number": { "instruction": "Personalnummer, wie auf der Gehaltsabrechnung gedruckt.", "type": "string" } } }}'{ "id": "ana_19c0", "mode": "live", "status": "succeeded", "external_id": "loan-482", "catalog_version": "sha256:235de54bf23a933aa613918eecfcd9e08da12d48ffdb98f80f77bda29cb5590e", "reference_date": "2026-10-07", "engine_revision": "api-2026.10.1", "expires_at": "2026-11-06T10:31:04Z", "result": { "files": [ { "file_id": "file_8f2a", "pages": 2, "readability": { "status": "succeeded", "readable": true } }, { "file_id": "file_c411", "pages": 6, "readability": { "status": "succeeded", "readable": true } } ], "documents": [ { "file_id": "file_8f2a", "pages": { "start": 1, "end": 2 }, "period": { "start": "2026-09", "end": "2026-09" }, "classification": "matched", "document_type": { "builtin": "gehaltsabrechnung" }, "confidence": 0.97, "alternatives": [], "requirements": {} }, { "file_id": "file_c411", "pages": { "start": 1, "end": 6 }, "period": { "start": "2026-07", "end": "2026-09" }, "classification": "matched", "document_type": { "builtin": "kontoauszug" }, "confidence": 0.95, "alternatives": [], "requirements": {} } ], "fields": { "net_income": { "value": 3250, "type": "money", "currency": "EUR", "status": "found", "confidence": 0.95, "citations": [ { "file_id": "file_8f2a", "quote": "Netto 3.250,00", "pages": [ { "page": 1, "polygons": [ [ { "x": 0.612, "y": 0.418 }, { "x": 0.731, "y": 0.418 }, { "x": 0.731, "y": 0.436 }, { "x": 0.612, "y": 0.436 } ] ], "bounding_box": { "left": 0.612, "top": 0.418, "width": 0.119, "height": 0.018 } } ] } ] }, "employer": { "value": "Muster GmbH", "type": "string", "status": "found", "confidence": 0.99 }, "employee_number": { "value": null, "type": "string", "status": "not_found" } }, "checks": {}, "collection": {} }, "usage": { "pages": 8, "fields": 3, "checks": 0 }}Returns the analysis in its current state, with 200 in every state, including failed. Check status first. A succeeded analysis carries result and usage, and a failed one carries error.
BearerAuthAuthorizationBearer <token>A partner API key, sent as Authorization: Bearer <key>. Live keys look like sk_live_<lookup>_<secret> and test keys like sk_test_<lookup>_<secret>. A key sees only data of its own mode.
id*stringThe ID of the analysis.
^ana_[A-Za-z0-9_-]+$x-request-id?stringYour ID for correlating this request with your logs, up to 128 bytes. If it is missing, empty or longer, the API generates one as req_<uuid>. The response echoes the ID in x-request-id, and error bodies repeat it in request_id.
1 <= length <= 128The analysis in its current state.
application/json- response
An analysis waiting to be processed. It has no result or error yet.
id*AnalysisIdThe ID of the analysis.
^ana_[A-Za-z0-9_-]+$mode*ModeWhether this is a test or a live analysis, decided by the key that created it.
"test""live"status*"queued"queued: waiting for its files to be ready or for processing to start.
"queued"external_id?ExternalIdYour own reference, such as a case number. It is returned unchanged, need not be unique and is never used to detect duplicates.
1 <= lengthcatalog_version?CatalogVersionThe catalog version the analysis was created with. Later catalog changes do not affect it.
1 <= lengthreference_date?DateThe date against which document ages and periods are evaluated: the date you sent, or the UTC date of creation.
dateengine_revision?EngineRevisionThe version of the analysis engine that produced the result. Test analyses report test-fixtures.v<n>, and deployments with mock models report a revision starting with mock-.
1 <= lengthexpires_at?DateTimeWhen the analysis and its result are deleted automatically.
date-timeusage?What the analysis processed. A completed analysis reports pages, fields and checks, also when they are zero.
curl -X GET 'https://api.aircredit.de/partner/v1/analyses/ana_19c0'{ "id": "ana_2a77", "mode": "live", "status": "queued", "catalog_version": "sha256:235de54bf23a933aa613918eecfcd9e08da12d48ffdb98f80f77bda29cb5590e", "reference_date": "2026-10-07", "expires_at": "2026-11-06T10:31:04Z"}Deletes a finished analysis and its result. The input files are kept. A queued or running analysis returns 409 analysis_in_progress, so cancel it first.
BearerAuthAuthorizationBearer <token>A partner API key, sent as Authorization: Bearer <key>. Live keys look like sk_live_<lookup>_<secret> and test keys like sk_test_<lookup>_<secret>. A key sees only data of its own mode.
id*stringThe ID of the analysis.
^ana_[A-Za-z0-9_-]+$x-request-id?stringYour ID for correlating this request with your logs, up to 128 bytes. If it is missing, empty or longer, the API generates one as req_<uuid>. The response echoes the ID in x-request-id, and error bodies repeat it in request_id.
1 <= length <= 128The deletion was recorded. The response has no body.
curl -X DELETE 'https://api.aircredit.de/partner/v1/analyses/ana_19c0'Stops a queued or running analysis. Send no body, not even an empty JSON object.
Canceling is idempotent. For an analysis that has already finished, including a canceled one, the request returns its current state and sends no further webhook event.
BearerAuthAuthorizationBearer <token>A partner API key, sent as Authorization: Bearer <key>. Live keys look like sk_live_<lookup>_<secret> and test keys like sk_test_<lookup>_<secret>. A key sees only data of its own mode.
id*stringThe ID of the analysis.
^ana_[A-Za-z0-9_-]+$x-request-id?stringYour ID for correlating this request with your logs, up to 128 bytes. If it is missing, empty or longer, the API generates one as req_<uuid>. The response echoes the ID in x-request-id, and error bodies repeat it in request_id.
1 <= length <= 128The canceled analysis, or the final state of an analysis that had already finished.
application/json- response
An analysis waiting to be processed. It has no result or error yet.
id*AnalysisIdThe ID of the analysis.
^ana_[A-Za-z0-9_-]+$mode*ModeWhether this is a test or a live analysis, decided by the key that created it.
"test""live"status*"queued"queued: waiting for its files to be ready or for processing to start.
"queued"external_id?ExternalIdYour own reference, such as a case number. It is returned unchanged, need not be unique and is never used to detect duplicates.
1 <= lengthcatalog_version?CatalogVersionThe catalog version the analysis was created with. Later catalog changes do not affect it.
1 <= lengthreference_date?DateThe date against which document ages and periods are evaluated: the date you sent, or the UTC date of creation.
dateengine_revision?EngineRevisionThe version of the analysis engine that produced the result. Test analyses report test-fixtures.v<n>, and deployments with mock models report a revision starting with mock-.
1 <= lengthexpires_at?DateTimeWhen the analysis and its result are deleted automatically.
date-timeusage?What the analysis processed. A completed analysis reports pages, fields and checks, also when they are zero.
curl -X POST 'https://api.aircredit.de/partner/v1/analyses/ana_19c0/cancel'{ "id": "ana_2a77", "mode": "live", "status": "queued", "catalog_version": "sha256:235de54bf23a933aa613918eecfcd9e08da12d48ffdb98f80f77bda29cb5590e", "reference_date": "2026-10-07", "expires_at": "2026-11-06T10:31:04Z"}