API reference
Operations of the HTTP API, generated from the API contract.
This reference is generated from the API contract.
Contract: Document Parser API, version 2.9.0.
API Key Management
POST /api/api-keys/create
Create Api Key
Create a new service API key (Admin only); shown once.
- Operation ID:
create_api_key_api_api_keys_create_post - Auth scope: Any valid credential
Request body (required)
application/json:ApiKeyCreate
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: ApiKeyResponse |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/api-keys/list
List Api Keys
List all API keys (Admin only).
- Operation ID:
list_api_keys_api_api_keys_list_get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
include_revoked | query | boolean | No | Default: false. |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: array of ApiKeyListResponse |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
DELETE /api/api-keys/{key_id}
Revoke Api Key
Revoke an API key (Admin only).
- Operation ID:
revoke_api_key_api_api_keys__key_id__delete - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
key_id | path | string | Yes |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
Admin Config
GET /api/admin/config
Get Config
Get current runtime config (cost limits).
- Operation ID:
get_config_api_admin_config_get - Auth scope: Any valid credential
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: ConfigResponse |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
PUT /api/admin/config
Update Config
Update runtime config params (partial update). Changes take effect immediately.
- Operation ID:
update_config_api_admin_config_put - Auth scope: Any valid credential
Request body (required)
application/json:ConfigUpdate
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: ConfigResponse |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/admin/config/costs
Get Costs
Get monthly cost history and current month status for all keys.
- Operation ID:
get_costs_api_admin_config_costs_get - Auth scope: Any valid credential
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: CostsResponse |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
POST /api/admin/config/costs/reset
Reset Costs
Reset current month costs for all keys (emergency use).
- Operation ID:
reset_costs_api_admin_config_costs_reset_post - Auth scope: Any valid credential
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/admin/config/llama-keys
Get Llama Keys
View LlamaParse API key status.
- Operation ID:
get_llama_keys_api_admin_config_llama_keys_get - Auth scope: Any valid credential
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: LlamaKeysResponse |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
PUT /api/admin/config/llama-keys
Update Llama Keys
Replace the LlamaParse API key list. All keys start clean (AVAILABLE).
- Operation ID:
update_llama_keys_api_admin_config_llama_keys_put - Auth scope: Any valid credential
Request body (required)
application/json:LlamaKeysUpdate
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: LlamaKeysResponse |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
POST /api/admin/config/llama-keys/reset
Reset Llama Keys
Reset stuck LlamaParse keys (EXHAUSTED, ERROR, COOLDOWN) back to AVAILABLE.
- Operation ID:
reset_llama_keys_api_admin_config_llama_keys_reset_post - Auth scope: Any valid credential
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/admin/config/services
List Service Configs
List all dynamic service configs.
- Operation ID:
list_service_configs_api_admin_config_services_get - Auth scope: Any valid credential
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/admin/config/services/{service_name}
Get Service Config
Get config for a specific service.
- Operation ID:
get_service_config_api_admin_config_services__service_name__get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
service_name | path | string | Yes |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
PUT /api/admin/config/services/{service_name}
Update Service Config
Update config for a service. Takes effect on next request (no restart needed).
- Operation ID:
update_service_config_api_admin_config_services__service_name__put - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
service_name | path | string | Yes |
Request body (required)
application/json:object
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
Admin Files
GET /api/admin/files
List Files Paginated
List files with pagination and filtering (Admin).
Query params:
-
name: Search by file name (case-insensitive partial match)
-
file_type: Filter by file type (exact: pdf, docx, pptx, xlsx)
-
status_filter: Filter by status (uploaded, processing, parsed, failed)
-
md5: Filter by exact MD5 hash
-
project_name: Filter by project name (use "unknown" for files with no project)
-
sub_group: Filter by sub-group (use "unknown" for files with no sub-group)
-
limit: Page size (default 50, max 500)
-
offset: Offset for pagination
-
Operation ID:
list_files_paginated_api_admin_files_get -
Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name | query | string or null | No | |
file_type | query | string or null | No | |
status_filter | query | string or null | No | |
md5 | query | string or null | No | |
project_name | query | string or null | No | |
sub_group | query | string or null | No | |
limit | query | integer | No | Default: 50. |
offset | query | integer | No | Default: 0. |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/admin/files/
List Files Paginated
List files with pagination and filtering (Admin).
Query params:
-
name: Search by file name (case-insensitive partial match)
-
file_type: Filter by file type (exact: pdf, docx, pptx, xlsx)
-
status_filter: Filter by status (uploaded, processing, parsed, failed)
-
md5: Filter by exact MD5 hash
-
project_name: Filter by project name (use "unknown" for files with no project)
-
sub_group: Filter by sub-group (use "unknown" for files with no sub-group)
-
limit: Page size (default 50, max 500)
-
offset: Offset for pagination
-
Operation ID:
list_files_paginated_api_admin_files__get -
Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name | query | string or null | No | |
file_type | query | string or null | No | |
status_filter | query | string or null | No | |
md5 | query | string or null | No | |
project_name | query | string or null | No | |
sub_group | query | string or null | No | |
limit | query | integer | No | Default: 50. |
offset | query | integer | No | Default: 0. |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
POST /api/admin/files/bulk-delete
Bulk Delete Files
Delete specific files by their IDs. Cascades: deletes all results' S3 artifacts, source file from S3, then File record (cascade handles Result records). Max 100 file IDs per request.
- Operation ID:
bulk_delete_files_api_admin_files_bulk_delete_post - Auth scope: Any valid credential
Request body (required)
application/json:BulkDeleteFilesRequest
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/admin/files/dashboard/summary
Get Dashboard Summary
Aggregated dashboard data in a single call. Optionally filtered by project_name and/or sub_group.
- Operation ID:
get_dashboard_summary_api_admin_files_dashboard_summary_get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
project_name | query | string or null | No | |
sub_group | query | string or null | No |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/admin/files/groups
Get File Groups
Get distinct project_name and sub_group values with counts for filter dropdowns.
When project_name is provided, sub_groups are filtered to only those within that project.
- Operation ID:
get_file_groups_api_admin_files_groups_get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
project_name | query | string or null | No |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/admin/files/statuses
Get File Status Counts
Get file count by status for filter dropdown / dashboard.
- Operation ID:
get_file_status_counts_api_admin_files_statuses_get - Auth scope: Any valid credential
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/admin/files/types
Get File Types
Get distinct file types for filter dropdown (normalized to lowercase).
- Operation ID:
get_file_types_api_admin_files_types_get - Auth scope: Any valid credential
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/admin/files/{file_id}/download/source
Admin Download Source
- Operation ID:
admin_download_source_api_admin_files__file_id__download_source_get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
file_id | path | string | Yes |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/admin/files/{file_id}/results/{result_id}/download/markdown
Admin Download Content
- Operation ID:
admin_download_content_api_admin_files__file_id__results__result_id__download_markdown_get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
file_id | path | string | Yes | |
result_id | path | string | Yes |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/admin/files/{file_id}/results/{result_id}/download/zip
Admin Download Zip
- Operation ID:
admin_download_zip_api_admin_files__file_id__results__result_id__download_zip_get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
file_id | path | string | Yes | |
result_id | path | string | Yes |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/admin/files/{file_id}/results/{result_id}/images/{image_path}
Admin Download Image
- Operation ID:
admin_download_image_api_admin_files__file_id__results__result_id__images__image_path__get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
file_id | path | string | Yes | |
result_id | path | string | Yes | |
image_path | path | string | Yes |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
Admin Sync
POST /api/admin/sync/bulk
Bulk Sync Documents
Sync metadata without reviving retired object identities.
- Operation ID:
bulk_sync_documents_api_admin_sync_bulk_post - Auth scope: Any valid credential
Request body (required)
application/json:BulkSyncRequest
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: BulkSyncResponse |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
POST /api/admin/sync/bulk-delete-results
Bulk Delete Results By Ids
Delete specific results by their IDs. Deletes S3 artifacts (if delete_artifacts=true) + PostgreSQL records. Max 200 result IDs per request.
- Operation ID:
bulk_delete_results_by_ids_api_admin_sync_bulk_delete_results_post - Auth scope: Any valid credential
Request body (required)
application/json:BulkDeleteByIdsRequest
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
POST /api/admin/sync/bulk-download
Bulk Download Results
Combine exact protected artifacts on disk; never retain entire archives.
- Operation ID:
bulk_download_results_api_admin_sync_bulk_download_post - Auth scope: Any valid credential
Request body (required)
application/json:BulkDownloadRequest
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
POST /api/admin/sync/cleanup-expired
Cleanup Expired Records
Cleanup expired Result records. Set dry_run=false to actually delete.
- Operation ID:
cleanup_expired_records_api_admin_sync_cleanup_expired_post - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
cursor | query | string or null | No |
Request body (required)
application/json:CleanupExpiredRequest
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: CleanupExpiredResponse |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
POST /api/admin/sync/delete-by-date
Delete By Date
Xóa Results theo khoảng thời gian.
Có thể filter theo:
- created_at: Thời điểm tạo Result
- expire_at: Thời điểm hết hạn
Ít nhất phải có date_from hoặc date_to.
Delete modes:
- full: Xóa PostgreSQL record + S3 files
- s3_only: Chỉ xóa S3 files, giữ metadata (clear URLs)
- metadata_only: Chỉ xóa PostgreSQL record, giữ S3 files
Luôn dùng dry_run=true trước để preview!
- Operation ID:
delete_by_date_api_admin_sync_delete_by_date_post - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
cursor | query | string or null | No |
Request body (required)
application/json:DeleteByDateRequest
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: BulkDeleteResponse |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
POST /api/admin/sync/delete-by-version
Delete By Version
Xóa tất cả Results có version cụ thể.
Delete modes:
- full: Xóa PostgreSQL record + S3 files
- s3_only: Chỉ xóa S3 files, giữ metadata (clear URLs)
- metadata_only: Chỉ xóa PostgreSQL record, giữ S3 files
Luôn dùng dry_run=true trước để preview!
- Operation ID:
delete_by_version_api_admin_sync_delete_by_version_post - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
cursor | query | string or null | No |
Request body (required)
application/json:DeleteByVersionRequest
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: BulkDeleteResponse |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/admin/sync/history
Query Sync History
Query sync history with filters and pagination.
Returns paginated results with total_count for UI pagination.
- Operation ID:
query_sync_history_api_admin_sync_history_get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
file_md5 | query | string or null | No | |
file_name | query | string or null | No | |
version | query | string or null | No | |
sync_source | query | string or null | No | |
status | query | string or null | No | |
project_name | query | string or null | No | |
sub_group | query | string or null | No | |
date_from | query | string or null | No | |
date_to | query | string or null | No | |
include_expired | query | boolean | No | Default: false. |
limit | query | integer | No | Default: 100. |
offset | query | integer | No | Default: 0. |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/admin/sync/history/{md5}
Get History By Md5
Get all Result versions for a specific file MD5.
- Operation ID:
get_history_by_md5_api_admin_sync_history__md5__get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
md5 | path | string | Yes | |
limit | query | integer | No | Default: 100. |
offset | query | integer | No | Default: 0. |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/admin/sync/logs
Get Admin Logs
Admin audit log, newest first: imported actions and the new structured rows (N-api-6).
- Operation ID:
get_admin_logs_api_admin_sync_logs_get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
action_type | query | string or null | No | |
limit | query | integer | No | Default: 100. |
offset | query | integer | No | Default: 0. |
actor | query | string or null | No | oidc:, key:, admin_key, user: or break-glass |
outcome | query | string or null | No | success, partial, failure or denied |
date_from | query | string (date-time) or null | No | RFC 3339, inclusive |
date_to | query | string (date-time) or null | No | RFC 3339, inclusive |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/admin/sync/pending-uploads
Get Pending Uploads
Get results that have been synced but don't have artifacts uploaded yet.
- Operation ID:
get_pending_uploads_api_admin_sync_pending_uploads_get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer | No | Default: 100. |
offset | query | integer | No | Default: 0. |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
DELETE /api/admin/sync/result/{result_id}
Delete Sync Result
Delete a specific Result record.
- Operation ID:
delete_sync_result_api_admin_sync_result__result_id__delete - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
result_id | path | string | Yes | |
delete_artifacts | query | boolean | No | Default: true. |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/admin/sync/result/{result_id}/preview
Preview Result Content
Bound retained preview text while validating the exact protected body.
- Operation ID:
preview_result_content_api_admin_sync_result__result_id__preview_get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
result_id | path | string | Yes | |
max_length | query | integer | No | Default: 50000. |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/admin/sync/stats
Get Sync Stats
Get sync statistics by version and source.
- Operation ID:
get_sync_stats_api_admin_sync_stats_get - Auth scope: Any valid credential
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
POST /api/admin/sync/upload-artifacts
Upload Artifacts
Publish a complete immutable bundle for an artifact-less synced Result.
- Operation ID:
upload_artifacts_api_admin_sync_upload_artifacts_post - Auth scope: Any valid credential
Request body (required)
multipart/form-data:Body_upload_artifacts_api_admin_sync_upload_artifacts_post
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
POST /api/admin/sync/upload-parsed
Upload Parsed Result
Import final bytes without invoking a parser or inventing another ledger.
- Operation ID:
upload_parsed_result_api_admin_sync_upload_parsed_post - Auth scope: Any valid credential
Request body (required)
multipart/form-data:Body_upload_parsed_result_api_admin_sync_upload_parsed_post
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
Auth
GET /.well-known/oauth-protected-resource
Protected resource metadata (RFC 9728)
- Operation ID:
protected_resource_metadata__well_known_oauth_protected_resource_get - Auth scope: Not specified
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: ProtectedResourceMetadata |
Billing
GET /api/billing/config
Payment provider settings for the portal's checkout script
- Operation ID:
billing_config - Auth scope: Any valid credential
- Surface:
user
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: BillingConfig |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
POST /api/billing/estimate
Estimate the credits of files before parsing them
- Operation ID:
billing_estimate - Auth scope: Any valid credential
- Surface:
user
Request body (required)
application/json:EstimateRequest
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: Estimate |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
402 | A billing refusal (preview_limit, ...) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
404 | The credential has no billing account | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | billing_unavailable while billing is off | application/json: ErrorResponse |
GET /api/billing/plans
The plans offered now (Preview: Free and Starter)
- Operation ID:
billing_plans - Auth scope: Any valid credential
- Surface:
user
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
include | query | "proposal" or null | No |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: PlanList |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | include=proposal without admin | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
POST /api/billing/webhooks/{provider}
Payment provider webhook (signature only, no bearer credential)
- Operation ID:
billing_webhook - Auth scope: Not specified
- Surface:
agent
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
provider | path | string | Yes |
Responses
| Status | Description | Content |
|---|---|---|
204 | Successful Response | |
400 | invalid_signature or invalid_input | application/json: ErrorResponse |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
404 | Not the configured provider | application/json: ErrorResponse |
413 | Body above 64 KiB | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | Applying failed; the provider retries | application/json: ErrorResponse |
503 | provider_unavailable | application/json: ErrorResponse |
GET /api/me/billing
My plan and subscription
- Operation ID:
billing_account - Auth scope: Any valid credential
- Surface:
user
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: BillingAccount |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | Not a signed-in user (insufficient_scope) | application/json: ErrorResponse |
409 | plan_not_approved or not_subscribed | application/json: ErrorResponse |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
502 | upstream_error from the provider | application/json: ErrorResponse |
503 | provider_unavailable or billing_unavailable | application/json: ErrorResponse |
POST /api/me/billing/checkout
Start a checkout for a plan (Paddle.js overlay)
- Operation ID:
billing_checkout - Auth scope: Any valid credential
- Surface:
user
Request body (required)
application/json:CheckoutBody
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: CheckoutSessionOut |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | Not a signed-in user (insufficient_scope) | application/json: ErrorResponse |
409 | plan_not_approved or not_subscribed | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
502 | upstream_error from the provider | application/json: ErrorResponse |
503 | provider_unavailable or billing_unavailable | application/json: ErrorResponse |
POST /api/me/billing/portal
Link to the payment provider's customer portal (payment method, invoices, cancel)
- Operation ID:
billing_portal - Auth scope: Any valid credential
- Surface:
user
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: PortalLink |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | Not a signed-in user (insufficient_scope) | application/json: ErrorResponse |
409 | plan_not_approved or not_subscribed | application/json: ErrorResponse |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
502 | upstream_error from the provider | application/json: ErrorResponse |
503 | provider_unavailable or billing_unavailable | application/json: ErrorResponse |
GET /api/me/usage
Plan and credits of my account
- Operation ID:
billing_usage - Auth scope: Any valid credential
- Surface:
user
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
period | query | string, one of current, previous | No | Default: current. |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: Usage |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
402 | A billing refusal (preview_limit, ...) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
404 | The credential has no billing account | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | billing_unavailable while billing is off | application/json: ErrorResponse |
Config
GET /api/config/public
Public Config
Upload limit, accepted file types and parsing modes of this server (no secrets).
- Operation ID:
config_public - Auth scope: Any valid credential
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: PublicConfig |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
Extractions
POST /api/extractions
Create Extraction
Start extracting schema (or the server schema schema_ref) from a finished result.
Pass task_id (a completed parse task) or result_id. Returns 202 with the extraction in
pending; read it with GET /api/extractions/{extraction_id}?wait=30 until terminal. With
require_evidence (default) a value is kept only when its quote is found in the document.
- Operation ID:
extractions_create - Auth scope: Any valid credential
- Surface:
agent
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string or null | No | 8-128 characters [A-Za-z0-9._:-]; the same key returns the first extraction for the same request, a different request is 409 idempotency_conflict |
Request body (required)
application/json:ExtractionCreate
Responses
| Status | Description | Content |
|---|---|---|
202 | Successful Response | application/json: Extraction |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
404 | not_found: no such task or result for this credential | application/json: ErrorResponse |
409 | not_ready (task not finished) or idempotency_conflict | application/json: ErrorResponse |
410 | gone: the result expired | application/json: ErrorResponse |
422 | invalid_schema (outside the CLI-CONTRACT §5.6 subset) or invalid_input | application/json: ErrorResponse |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | service_unavailable: no extraction provider is configured | application/json: ErrorResponse |
GET /api/extractions/{extraction_id}
Get Extraction
One extraction; wait (up to 30 s) long-polls until it is completed or failed.
- Operation ID:
extractions_get - Auth scope: Any valid credential
- Surface:
agent
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
extraction_id | path | string | Yes | |
wait | query | integer | No | Seconds to wait for a terminal state From 0 to 30. Default: 0. |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: Extraction |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
404 | not_found: no such extraction for this credential | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/schemas
List Schemas
Server schemas usable as schema_ref (NAME@VERSION).
- Operation ID:
schemas_list - Auth scope: Any valid credential
- Surface:
agent
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: SchemaList |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
File Mapping
GET /api/mapping/md5-lookup/{md5_hash}
Lookup By Md5
Look up files by MD5 hash with support for both source files and markdown content.
lookup_type options:
- "auto": Try both source and markdown MD5 (default)
- "source": Only lookup source file MD5
- "markdown": Only lookup markdown content MD5
Version filtering:
-
version: Filter by specific version (e.g., "2.5.0")
-
latest_version_only: Return only results from the newest version
-
Operation ID:
lookup_by_md5_api_mapping_md5_lookup__md5_hash__get -
Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
md5_hash | path | string | Yes | |
lookup_type | query | string | No | Default: auto. |
version | query | string or null | No | Filter by specific version (e.g., '2.5.0') |
latest_version_only | query | boolean | No | Return only results from the latest/newest version Default: false. |
include_markdown | query | boolean | No | On cache hit, fetch the latest result's markdown content from S3 and inline it as top-level markdown + markdown_md5 + file_id so a single request can short-circuit the parse pipeline. Default: false. |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/mapping/projects
List Projects
List the distinct project names of the caller's files with file counts.
- Operation ID:
list_projects_api_mapping_projects_get - Auth scope: Any valid credential
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/mapping/projects/{project_name}/files
List Files By Project
List the caller's files belonging to a specific project.
- Operation ID:
list_files_by_project_api_mapping_projects__project_name__files_get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
project_name | path | string | Yes | |
limit | query | integer | No | At most 1000. Default: 100. |
offset | query | integer | No | Default: 0. |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/mapping/sub-groups
List Sub Groups
List the sub-groups of the caller's files with file counts, optionally for one project.
- Operation ID:
list_sub_groups_api_mapping_sub_groups_get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
project_name | query | string or null | No | Filter by project name |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/mapping/sub-groups/{sub_group}/files
List Files By Sub Group
List the caller's files belonging to a specific sub-group.
- Operation ID:
list_files_by_sub_group_api_mapping_sub_groups__sub_group__files_get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
sub_group | path | string | Yes | |
limit | query | integer | No | At most 1000. Default: 100. |
offset | query | integer | No | Default: 0. |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
File Transforms
GET /api/files/{file_id}/kg-ready
Get Kg Ready
Transform a parsed file into KG-ready format with preprocessed markdown, assets, and sheets.
- Operation ID:
get_kg_ready_api_files__file_id__kg_ready_get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
file_id | path | string | Yes | |
version | query | string or null | No | Filter by parser version |
result_id | query | string or null | No | Select an exact completed result for this file |
analyze_images | query | boolean | No | Run LLM-based image content analysis (V2 dedup) to classify each asset and drop redundant page-screenshots. Default: True. Pass ?analyze_images=false to skip the LLM stage and return deterministic-only output (faster, no LLM cost). Default: true. |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: KGReadyResponse |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/files/{file_id}/kg-ready/assets/{asset_filename}
Get Kg Ready Asset
Download a specific asset (image) from the KG-ready transform.
- Operation ID:
get_kg_ready_asset_api_files__file_id__kg_ready_assets__asset_filename__get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
file_id | path | string | Yes | |
asset_filename | path | string | Yes | |
result_id | query | string or null | No | Select the exact result containing this asset |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/files/{file_id}/kg-ready/sheets/{sheet_filename}
Get Kg Ready Sheet
Download a specific sheet CSV from the KG-ready transform.
- Operation ID:
get_kg_ready_sheet_api_files__file_id__kg_ready_sheets__sheet_filename__get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
file_id | path | string | Yes | |
sheet_filename | path | string | Yes | |
result_id | query | string or null | No | Select the exact result containing this sheet |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
Files
GET /api/files/
List Files
List the caller's files (administrators: every file). With limit, newest first, one page
at a time: the next page's URL is in the Link: <…>; rel="next" header; the body stays an array.
- Operation ID:
list_files_api_files__get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer or null | No | Page size; without it every file is returned (legacy behaviour) |
cursor | query | string or null | No | Opaque, from the Link header |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: array of FileUploadResponse |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
POST /api/files/convert-preview
Convert File To Pdf Preview
Convert office documents (DOCX, PPTX, XLSX, etc.) to PDF for UI preview.
- Operation ID:
convert_file_to_pdf_preview_api_files_convert_preview_post - Auth scope: Any valid credential
Request body (required)
multipart/form-data:Body_convert_file_to_pdf_preview_api_files_convert_preview_post
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/files/download/{task_id}
Download File Results
Download only the durable result linked to this exact completed task.
- Operation ID:
download_file_results_api_files_download__task_id__get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
task_id | path | string | Yes |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
POST /api/files/get-markdown-by-file
Get Markdown By File
Upload a file and get its corresponding markdown if it has been processed. Useful for checking if a file has already been parsed and getting the markdown result.
- Operation ID:
get_markdown_by_file_api_files_get_markdown_by_file_post - Auth scope: Any valid credential
Request body (required)
multipart/form-data:Body_get_markdown_by_file_api_files_get_markdown_by_file_post
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: FileToMarkdownResponse |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/files/modes
List Parsing Modes
The canonical list of parsing modes (portal, CLI and MCP read it), with availability.
A gated mode stays listed with available: false and its reason (license_gated for
Chandra unless the server enables it); it is the only place a gated mode is visible.
- Operation ID:
files_modes - Auth scope: Any valid credential
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: ModesResponse |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
POST /api/files/process
Process File
- Operation ID:
process_file_api_files_process_post - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
X-Credits-Max | header | string or null | No | Same as max_credits; the lower value wins |
Request body (required)
multipart/form-data:Body_process_file_api_files_process_post
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: FileProcessingResponse |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/files/status/{task_id}
Get File Processing Status
Return sanitized durable status for exactly one ParseTask.
- Operation ID:
get_file_processing_status_api_files_status__task_id__get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
task_id | path | string | Yes | |
wait | query | integer | No | Seconds to wait for the task to finish before answering (long poll, max 30) From 0 to 30. Default: 0. |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
POST /api/files/upload
Upload File
Upload a fresh source without holding a DB transaction over storage I/O.
Identical bytes uploaded again by the same owner return the existing file; another owner's upload of the same bytes is a separate file with its own id.
- Operation ID:
upload_file_api_files_upload_post - Auth scope: Any valid credential
Request body (required)
multipart/form-data:Body_upload_file_api_files_upload_post
Responses
| Status | Description | Content |
|---|---|---|
201 | Successful Response | application/json: FileUploadResponse |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/files/{file_id}
Get File Details
Get file details with result versions.
- Operation ID:
get_file_details_api_files__file_id__get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
file_id | path | string | Yes |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: FileUploadResponse |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/files/{file_id}/download/source
Download Source File
- Operation ID:
download_source_file_api_files__file_id__download_source_get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
file_id | path | string | Yes |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/files/{file_id}/results/{result_id}/download/markdown
Download Result Markdown
- Operation ID:
download_result_markdown_api_files__file_id__results__result_id__download_markdown_get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
file_id | path | string | Yes | |
result_id | path | string | Yes |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/files/{file_id}/results/{result_id}/download/zip
Download Result Zip
- Operation ID:
download_result_zip_api_files__file_id__results__result_id__download_zip_get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
file_id | path | string | Yes | |
result_id | path | string | Yes |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/files/{file_id}/results/{result_id}/images/{image_path}
Get Result Image
- Operation ID:
get_result_image_api_files__file_id__results__result_id__images__image_path__get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
file_id | path | string | Yes | |
result_id | path | string | Yes | |
image_path | path | string | Yes |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
Health
GET /health/info
Info
Return basic information about the API
- Operation ID:
info_health_info_get - Auth scope: Not specified
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
GET /health/ping
Ping
Simple health check endpoint that doesn't require authentication
- Operation ID:
ping_health_ping_get - Auth scope: Not specified
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
GET /health/ready
Ready
Check dependencies required to serve requests for the selected mode.
- Operation ID:
ready_health_ready_get - Auth scope: Not specified
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
parsing_mode | query | string or null | No |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
422 | Validation Error | application/json: HTTPValidationError |
GET /healthz
Healthz
Liveness: the process serves requests. No database, storage or provider call.
- Operation ID:
healthz_healthz_get - Auth scope: Not specified
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
Markdown
POST /api/markdown/find-by-source
Find Markdown By Source File
Upload a source file and find all related markdown files. Calculates MD5 of source file content and queries database to find all processed markdown results.
Args: include_manual_registration: Include manually registered files (without URLs) version: Filter by specific version (e.g., "2.5.0") latest_version_only: Return only results from the newest version
- Operation ID:
find_markdown_by_source_file_api_markdown_find_by_source_post - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
include_manual_registration | query | boolean | No | Default: true. |
version | query | string or null | No | Filter by specific version (e.g., '2.5.0') |
latest_version_only | query | boolean | No | Return only results from the latest/newest version Default: false. |
Request body (required)
multipart/form-data:Body_find_markdown_by_source_file_api_markdown_find_by_source_post
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: SourceToMarkdownMapping |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
POST /api/markdown/identify-source
Identify Source From Markdown
Upload a markdown file and identify its original source file. Calculates MD5 of markdown content and queries database to find the source file.
Version filtering:
-
version: Filter by specific version (e.g., "2.5.0")
-
latest_version_only: Return result from the newest version (default: True)
-
Operation ID:
identify_source_from_markdown_api_markdown_identify_source_post -
Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
version | query | string or null | No | Filter by specific version (e.g., '2.5.0') |
latest_version_only | query | boolean | No | Return only the result from the latest/newest version (default: True) Default: true. |
Request body (required)
multipart/form-data:Body_identify_source_from_markdown_api_markdown_identify_source_post
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: MarkdownIdentificationResponse |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
Me
GET /api/me
The caller's identity
- Operation ID:
get_me_api_me_get - Auth scope: Any valid credential
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: MeResponse |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/me/api-keys
List my API keys
- Operation ID:
list_my_keys_api_me_api_keys_get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
include_revoked | query | boolean | No | Default: false. |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: array of ApiKeySummary |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
POST /api/me/api-keys
Create a personal API key (shown once)
- Operation ID:
create_my_key_api_me_api_keys_post - Auth scope: Any valid credential
Request body (required)
application/json:ApiKeyCreateRequest
Responses
| Status | Description | Content |
|---|---|---|
201 | Successful Response | application/json: ApiKeyCreated |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
DELETE /api/me/api-keys/{key_id}
Revoke one of my keys
- Operation ID:
revoke_my_key_api_me_api_keys__key_id__delete - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
key_id | path | string | Yes |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: RevokeResponse |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
Paged Results
GET /api/files/{file_id}/results/{result_id}/document
Get Paged Document
- Operation ID:
get_paged_document_api_files__file_id__results__result_id__document_get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
file_id | path | string | Yes | |
result_id | path | string | Yes |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/files/{file_id}/results/{result_id}/document/images/{record_id}
Download Paged Image
- Operation ID:
download_paged_image_api_files__file_id__results__result_id__document_images__record_id__get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
file_id | path | string | Yes | |
result_id | path | string | Yes | |
record_id | path | string | Yes |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/files/{file_id}/results/{result_id}/document/pages
Get Paged Pages
- Operation ID:
get_paged_pages_api_files__file_id__results__result_id__document_pages_get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
file_id | path | string | Yes | |
result_id | path | string | Yes | |
cursor | query | string or null | No | |
limit | query | integer | No | Default: 12. |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/files/{file_id}/results/{result_id}/document/pages/{physical_page}/images
Get Paged Images
- Operation ID:
get_paged_images_api_files__file_id__results__result_id__document_pages__physical_page__images_get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
file_id | path | string | Yes | |
result_id | path | string | Yes | |
physical_page | path | integer | Yes | |
cursor | query | string or null | No | |
limit | query | integer | No | Default: 32. |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/files/{file_id}/results/{result_id}/document/pages/{physical_page}/items
Get Paged Items
- Operation ID:
get_paged_items_api_files__file_id__results__result_id__document_pages__physical_page__items_get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
file_id | path | string | Yes | |
result_id | path | string | Yes | |
physical_page | path | integer | Yes | |
cursor | query | string or null | No | |
limit | query | integer | No | Default: 32. |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/files/{file_id}/results/{result_id}/document/records/{record_id}
Download Paged Record
- Operation ID:
download_paged_record_api_files__file_id__results__result_id__document_records__record_id__get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
file_id | path | string | Yes | |
result_id | path | string | Yes | |
record_id | path | string | Yes |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
Registration
POST /api/registration/clean-duplicates
Clean Duplicate Registrations
- Operation ID:
clean_duplicate_registrations_api_registration_clean_duplicates_post - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
dry_run | query | boolean | No | Default: true. |
batch_limit | query | integer | No | From 1 to 200. Default: 100. |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
DELETE /api/registration/external-file/{file_id}
Remove External Registration
- Operation ID:
remove_external_registration_api_registration_external_file__file_id__delete - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
file_id | path | string | Yes |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
POST /api/registration/external-files
Register External Parsed Files
- Operation ID:
register_external_parsed_files_api_registration_external_files_post - Auth scope: Any valid credential
Request body (required)
application/json:BulkExternalRegistration
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: BulkRegistrationResponse |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
POST /api/registration/single-file
Register Single External File
- Operation ID:
register_single_external_file_api_registration_single_file_post - Auth scope: Any valid credential
Request body (required)
application/json:ExternalRegistrationEntry
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: RegistrationResult |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/registration/stats
Get Registration Stats
- Operation ID:
get_registration_stats_api_registration_stats_get - Auth scope: Any valid credential
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
Results
GET /api/files/{file_id}/results/{result_id}/chunks
Get Result Chunks
Heading-aware retrieval chunks as NDJSON, one untern_docai.Chunk per line.
Each chunk carries its heading path, pages, block ids and block boxes, so a citation can be
shown on the Pages view. Same lookup and errors as document.json.
- Operation ID:
results_chunks - Auth scope: Any valid credential
- Surface:
agent
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
file_id | path | string | Yes | |
result_id | path | string | Yes | |
max_chunk_chars | query | integer | No | Largest chunk in characters (a single long word may exceed it) From 200 to 4000. Default: 1500. |
Responses
| Status | Description | Content |
|---|---|---|
200 | One Chunk per line | application/x-ndjson |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
409 | not_ready: the result is not finished yet | application/json: ErrorResponse |
410 | gone: the result expired or was removed | application/json: ErrorResponse |
413 | result_too_large: the page JSON is above the server's limit | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/files/{file_id}/results/{result_id}/document.html
Get Result Document Html
The result as a standalone HTML5 page (one <section> per page; all text escaped).
Rendered by untern_docai.export.to_html from the same Document as document.json, with the
same errors. Sent with a restrictive Content-Security-Policy.
- Operation ID:
results_document_html - Auth scope: Any valid credential
- Surface:
user
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
file_id | path | string | Yes | |
result_id | path | string | Yes | |
lang | query | string | No | BCP 47 tag Default: en. |
Responses
| Status | Description | Content |
|---|---|---|
200 | Standalone HTML5 page | text/html |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
409 | not_ready: the result is not finished yet | application/json: ErrorResponse |
410 | gone: the result expired or was removed | application/json: ErrorResponse |
413 | result_too_large: the page JSON is above the server's limit | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/files/{file_id}/results/{result_id}/document.json
Get Result Document
The result's pages with their blocks (type, text, heading level, box) as Document 1.0.
Page images are listed in metadata as page_image:<n> paths (relative to the API base,
served by …/images/page_<n>.jpg); metadata.page_count is the number of pages. A result that
is still running answers 409 not_ready, an expired one 410 gone, one whose stored page JSON
is above UNTERN_LENS_DOCUMENT_JSON_MAX_BYTES 413 result_too_large (use the ZIP download).
- Operation ID:
results_document - Auth scope: Any valid credential
- Surface:
user
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
file_id | path | string | Yes | |
result_id | path | string | Yes |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: Document |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
409 | not_ready: the result is not finished yet | application/json: ErrorResponse |
410 | gone: the result expired or was removed | application/json: ErrorResponse |
413 | result_too_large: the page JSON is above the server's limit | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/results/{file_id}
Get Latest Result
Get the latest parsing result for a file.
Version filtering:
-
version: Filter by specific version (e.g., "2.5.0")
-
latest_version_only: Return result from the newest version (default: True)
-
Operation ID:
get_latest_result_api_results__file_id__get -
Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
file_id | path | string | Yes | |
version | query | string or null | No | Filter by specific version (e.g., '2.5.0') |
latest_version_only | query | boolean | No | Return only the result from the latest/newest version (default: True) Default: true. |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: ResultResponse |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/results/{file_id}/versions
Get All Versions
Get all available versions for a file's parsing results.
Returns a list of all versions with their result details.
- Operation ID:
get_all_versions_api_results__file_id__versions_get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
file_id | path | string | Yes |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
Tasks
GET /api/tasks
List Tasks
The caller's parse tasks, newest first, limit per page with an opaque next_cursor.
Owner-scoped: a caller sees its own tasks; the global view (admin portal) sees every task.
- Operation ID:
tasks_list - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
status | query | array of string, one of pending, processing, completed, failed or null | No | |
limit | query | integer | No | From 1 to 100. Default: 20. |
cursor | query | string or null | No |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: JobList |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
GET /api/tasks/{task_id}
Get Task
One parse task as a Job.
- Operation ID:
tasks_get - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
task_id | path | string | Yes |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: Job |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
POST /api/tasks/{task_id}/cancel
Cancel Task
Cancel a task that has not started yet (pending); it ends as failed with cancelled.
A task that is already running answers 409 not_cancellable, a finished one 409 conflict;
both carry details.status. Cancelling twice is harmless (the second call is a 409 conflict
with status failed).
- Operation ID:
tasks_cancel - Auth scope: Any valid credential
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
task_id | path | string | Yes |
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: Job |
401 | Missing or failed credential (unauthenticated) | application/json: ErrorResponse |
403 | forbidden or insufficient_scope | application/json: ErrorResponse |
422 | Validation Error | application/json: HTTPValidationError |
429 | rate_limited; see Retry-After | application/json: ErrorResponse |
500 | internal_error; quote the request_id | application/json: ErrorResponse |
503 | busy, storage_unavailable or idp_unavailable; see Retry-After | application/json: ErrorResponse |
Other operations
GET /
Root
API information and health check.
- Operation ID:
root__get - Auth scope: Not specified
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
GET /health
Health Check
Simple health check endpoint.
- Operation ID:
health_check_health_get - Auth scope: Not specified
Responses
| Status | Description | Content |
|---|---|---|
200 | Successful Response | application/json: any |
Schemas
ApiKeyCreate
| Property | Type | Required | Description |
|---|---|---|---|
account_id | string or null | No | Billing account the service key's usage is charged to |
allowed_endpoints | string or null | No | Comma-separated list of allowed endpoints |
description | string or null | No | Description of the key's purpose |
expires_in_days | integer | No | Number of days until expiration (0 for never) Default: 365. |
name | string | Yes | Name for the API key |
rate_limit | integer or null | No | Request rate limit per minute |
scopes | array of string, one of documents:read, documents:write | No | Document scopes of the service key (never admin) |
ApiKeyCreateRequest
| Property | Type | Required | Description |
|---|---|---|---|
expires_in_days | integer | No | Default 90, maximum 365 From 1.0 to 365.0. Default: 90. |
name | string | Yes | Shown in the key list |
scopes | array of string, one of documents:read, documents:write | No | Pass only documents:read for a read-only agent key |
ApiKeyCreated
| Property | Type | Required | Description |
|---|---|---|---|
created_at | string or null | Yes | |
expires_at | string or null | Yes | |
id | string | Yes | |
key | string | Yes | The key itself, shown once; use it as UNTERN_PARSING_TOKEN |
key_preview | string | Yes | ulk_… and the last four characters; never the key |
last_used_at | string or null | Yes | |
name | string | Yes | |
scopes | array of string | Yes | |
status | string | Yes |
ApiKeyListResponse
| Property | Type | Required | Description |
|---|---|---|---|
account_id | string or null | No | Billing account of a service key, if assigned |
created_at | string | Yes | |
description | string or null | Yes | |
expires_at | string or null | Yes | |
id | string | Yes | |
is_admin | boolean | Yes | |
key_preview | string | Yes | |
last_used_at | string or null | Yes | |
name | string | Yes | |
owner | string or null | No | The owner's sub, or service for a service key |
scopes | array of string | No | Document scopes of the key |
status | string | Yes | |
usage_count | integer | Yes |
ApiKeyResponse
| Property | Type | Required | Description |
|---|---|---|---|
created_at | string | Yes | |
description | string or null | Yes | |
expires_at | string or null | Yes | |
id | string | Yes | |
key | string | Yes | |
name | string | Yes | |
status | string | Yes |
ApiKeySummary
| Property | Type | Required | Description |
|---|---|---|---|
created_at | string or null | Yes | |
expires_at | string or null | Yes | |
id | string | Yes | |
key_preview | string | Yes | ulk_… and the last four characters; never the key |
last_used_at | string or null | Yes | |
name | string | Yes | |
scopes | array of string | Yes | |
status | string | Yes |
AssetInfo
| Property | Type | Required | Description |
|---|---|---|---|
analysis | ImageAnalysisInfo or null | No | |
download_url | string | Yes | |
extension | string | Yes | |
md5 | string | Yes | |
original_name | string | Yes | |
page | integer or null | No |
BillingAccount
GET /api/me/billing: plan and subscription state; never payment data.
| Property | Type | Required | Description |
|---|---|---|---|
account_id | string | Yes | |
cancel_at | string (date-time) or null | No | When the subscription ends, if a cancellation is scheduled |
environment | string, one of sandbox, production or null | No | |
period_end | string (date-time) | Yes | |
period_start | string (date-time) | Yes | |
plan | PlanSummary | Yes | |
provider | string or null | No | |
scheduled_change | ScheduledChange or null | No | |
status | string, one of active, past_due, suspended, closed | Yes | |
subscribed | boolean | Yes |
BillingConfig
GET /api/billing/config: what the portal's Paddle.js needs; no secret in it.
| Property | Type | Required | Description |
|---|---|---|---|
client_token | string or null | No | Paddle.js client-side token (public by design); null when unset |
environment | string, one of sandbox, production or null | No | |
provider | string or null | No |
BillingSummary
Part of GET /api/me; null while billing is off or for callers that are never billed.
| Property | Type | Required | Description |
|---|---|---|---|
mode | string, one of meter, enforce | Yes | |
plan | PlanRef | Yes | |
preview | PreviewState | Yes |
Body_convert_file_to_pdf_preview_api_files_convert_preview_post
| Property | Type | Required | Description |
|---|---|---|---|
file | string | Yes |
Body_find_markdown_by_source_file_api_markdown_find_by_source_post
| Property | Type | Required | Description |
|---|---|---|---|
source_file | string | Yes |
Body_get_markdown_by_file_api_files_get_markdown_by_file_post
| Property | Type | Required | Description |
|---|---|---|---|
file | string | Yes | |
include_content | boolean | No | Include inline markdown content in response Default: false. |
Body_identify_source_from_markdown_api_markdown_identify_source_post
| Property | Type | Required | Description |
|---|---|---|---|
markdown_file | string | Yes |
Body_process_file_api_files_process_post
| Property | Type | Required | Description |
|---|---|---|---|
custom_prompt | string or null | No | |
file | string | Yes | |
force_reparse | boolean | No | Default: false. |
max_credits | integer or null | No | Refuse the parse (402 max_credits_exceeded) when its credit hold would be larger |
parsing_mode | ParsingMode | No | Default: Local. |
preset | string or null | No | Document-type preset from GET /api/files/modes; sets the mode, never the price |
project_name | string or null | No | |
response_format | string | No | Default: zip. |
sub_group | string or null | No | |
target_pages | string or null | No | |
version_check | boolean | No | Default: false. |
wait_for_result | boolean | No | Default: true. |
Body_upload_artifacts_api_admin_sync_upload_artifacts_post
| Property | Type | Required | Description |
|---|---|---|---|
content_format | string | No | Default: markdown. |
file_id | string | Yes | |
markdown_file | string or null | No | |
overwrite_object | boolean | No | Default: false. |
result_id | string | Yes | |
zip_file | string or null | No |
Body_upload_file_api_files_upload_post
| Property | Type | Required | Description |
|---|---|---|---|
file | string | Yes | |
project_name | string or null | No | |
sub_group | string or null | No |
Body_upload_parsed_result_api_admin_sync_upload_parsed_post
| Property | Type | Required | Description |
|---|---|---|---|
content_file | string or null | No | |
content_format | string or null | No | |
expire_days | integer | No | Default: 30. |
file_md5 | string | Yes | |
file_name | string | Yes | |
file_size | integer or null | No | |
file_type | string | Yes | |
overwrite_metadata | boolean | No | Default: false. |
project_name | string or null | No | |
skip_if_exists | boolean | No | Default: true. |
source_folder | string or null | No | |
sub_group | string or null | No | |
version | string | No | Default: 2.9.0. |
zip_file | string or null | No |
BulkDeleteByIdsRequest
Delete specific results by their IDs
| Property | Type | Required | Description |
|---|---|---|---|
delete_artifacts | boolean | No | Also delete S3 artifacts Default: true. |
result_ids | array of string | Yes | List of result IDs to delete (max 200) |
BulkDeleteFilesRequest
Delete specific files by their IDs (cascades to results + S3)
| Property | Type | Required | Description |
|---|---|---|---|
delete_artifacts | boolean | No | Also delete S3 artifacts before cascade Default: true. |
file_ids | array of string | Yes | List of file IDs to delete (max 100) |
BulkDeleteResponse
Response chung cho cả 2 delete routes
| Property | Type | Required | Description |
|---|---|---|---|
affected_results | array of DeletedResultInfo | Yes | |
delete_mode | string | Yes | |
deleted_count | integer | Yes | |
dry_run | boolean | Yes | |
duration_ms | integer | Yes | |
errors | array of string | Yes | |
filter_description | string | Yes | |
s3_deleted_count | integer | Yes | |
total_matched | integer | Yes | |
urls_cleared_count | integer | Yes |
BulkDownloadRequest
Download multiple results as one ZIP
| Property | Type | Required | Description |
|---|---|---|---|
format | string | No | Download format: 'zip' or 'markdown' Default: zip. |
result_ids | array of string | Yes | List of result IDs to download (max 50) |
BulkExternalRegistration
Request đăng ký bulk multiple files
| Property | Type | Required | Description |
|---|---|---|---|
batch_metadata | object or null | No | Metadata cho batch |
entries | array of ExternalRegistrationEntry or null | No | |
files | array of ClientRegistrationEntry or null | No | |
metadata | object or null | No | Alternative metadata field |
sample_entries | array of ClientRegistrationEntry or null | No |
BulkRegistrationResponse
Response cho bulk registration
| Property | Type | Required | Description |
|---|---|---|---|
batch_metadata | object or null | No | |
errors | integer | Yes | |
results | array of RegistrationResult | Yes | |
skipped | integer | Yes | |
successful | integer | Yes | |
total_entries | integer | Yes |
BulkSyncRequest
Phase 1: Batch metadata sync request (JSON only, no files)
| Property | Type | Required | Description |
|---|---|---|---|
batch_metadata | object or null | No | |
default_expire_days | integer | No | Default days until expiration Default: 30. |
default_project_name | string or null | No | Default project name for all entries |
default_sub_group | string or null | No | Default sub-group for all entries |
default_version | string | No | Default parser version Default: 2.3.0. |
entries | array of SyncDocumentEntry | Yes | |
overwrite_metadata | boolean | No | Overwrite existing Result record if (md5, version) exists Default: false. |
skip_duplicates | boolean | No | Skip if (md5, version) exists Default: true. |
BulkSyncResponse
Batch sync response
| Property | Type | Required | Description |
|---|---|---|---|
batch_id | string | Yes | |
batch_metadata | object or null | No | |
created | integer | Yes | |
errors | integer | Yes | |
results | array of SyncResultEntry | Yes | |
skipped | integer | Yes | |
sync_time_ms | integer | Yes | |
total_entries | integer | Yes | |
updated | integer | No | Default: 0. |
CheckoutBody
| Property | Type | Required | Description |
|---|---|---|---|
interval | string, one of month, year | No | Default: month. |
plan | string | Yes | Plan id, e.g. starter |
CheckoutSessionOut
| Property | Type | Required | Description |
|---|---|---|---|
checkout_url | string or null | No | Hosted checkout page, if any |
client_token | string or null | No | Paddle.js client-side token of this environment (public by design); null when the server has none (the portal then uses its build-time token) |
environment | string, one of sandbox, production | Yes | |
price_id | string or null | No | The provider's price id (never hard-coded) |
provider | string | Yes | |
transaction_id | string | Yes | Open it with Paddle.Checkout.open({transactionId}) |
CleanupExpiredRequest
Cleanup expired records request
| Property | Type | Required | Description |
|---|---|---|---|
before_date | string (date-time) or null | No | Clean expired before this date |
delete_artifacts | boolean | No | Also delete S3 artifacts Default: true. |
dry_run | boolean | No | Preview only, don't delete Default: true. |
project_name | string or null | No | Filter by project name |
sub_group | string or null | No | Filter by sub-group |
CleanupExpiredResponse
Cleanup result
| Property | Type | Required | Description |
|---|---|---|---|
affected_file_ids | array of string | Yes | |
affected_result_ids | array of string | Yes | |
cleaned_count | integer | Yes | |
dry_run | boolean | Yes | |
storage_freed_bytes | integer | Yes | |
total_expired | integer | Yes |
ClientFileData
Client format for file_data
| Property | Type | Required | Description |
|---|---|---|---|
file_size | integer | Yes | |
md5 | string | Yes | |
name | string | Yes | |
processing_timestamp | string | Yes | |
status | string | No | Default: parsed. |
type | string | Yes |
ClientRegistrationEntry
Client format entry - different structure
| Property | Type | Required | Description |
|---|---|---|---|
file_data | ClientFileData | Yes | |
metadata | object or null | No | |
result_data | ClientResultData | Yes |
ClientResultData
Client format for result_data
| Property | Type | Required | Description |
|---|---|---|---|
content_format | string | No | Default: markdown_bundle. |
markdown_files | array of object | Yes | |
markdown_files_count | integer | Yes | |
markdown_md5 | string | Yes | |
markdown_size | integer | Yes | |
markdown_total_size | integer | Yes | |
output_folder_path | string | Yes | |
primary_markdown_file | string | Yes | |
status | string | No | Default: done. |
ConfigResponse
| Property | Type | Required | Description |
|---|---|---|---|
gemini_cost_limit | number | Yes | |
gemini_service_account_cost_limit | number | Yes | |
source | string | Yes |
ConfigUpdate
| Property | Type | Required | Description |
|---|---|---|---|
gemini_cost_limit | number or null | No | |
gemini_service_account_cost_limit | number or null | No |
CostInfo
| Property | Type | Required | Description |
|---|---|---|---|
api_calls | integer or null | No | Default: 0. |
error | string or null | No | |
gemini_cost | number or null | No | Default: 0.0. |
gpt_cost | number or null | No | Default: 0.0. |
gpt_input_tokens | integer or null | No | Default: 0. |
gpt_output_tokens | integer or null | No | Default: 0. |
gpt_tokens | integer or null | No | Default: 0. |
input_tokens | integer or null | No | Default: 0. |
mistral_cost | number or null | No | Default: 0.0. |
mistral_input_tokens | integer or null | No | Default: 0. |
mistral_output_tokens | integer or null | No | Default: 0. |
mistral_tokens | integer or null | No | Default: 0. |
output_tokens | integer or null | No | Default: 0. |
parser_mode | string or null | No | |
parser_version | string or null | No | |
skeleton_cost | number or null | No | Default: 0.0. |
skeleton_cost_per_page | number or null | No | |
skeleton_credits | integer or null | No | Default: 0. |
skeleton_credits_per_page | number or null | No | |
total_cost | number or null | No | Default: 0.0. |
CostsResponse
| Property | Type | Required | Description |
|---|---|---|---|
current_month | string | Yes | |
keys | array of KeyCostInfo | Yes |
DateFilterField
Field để filter theo date
Type: string, one of created_at, expire_at.
DeleteByDateRequest
Request xóa theo date range
| Property | Type | Required | Description |
|---|---|---|---|
date_field | DateFilterField | No | Field để filter: created_at hoặc expire_at Default: created_at. |
date_from | string (date-time) or null | No | Từ ngày (>=) |
date_to | string (date-time) or null | No | Đến ngày (<=) |
delete_mode | DeleteMode | No | Default: s3_only. |
dry_run | boolean | No | Preview trước khi xóa Default: true. |
project_name | string or null | No | Filter by project name |
sub_group | string or null | No | Filter by sub-group |
DeleteByVersionRequest
Request xóa theo version
| Property | Type | Required | Description |
|---|---|---|---|
delete_mode | DeleteMode | No | Default: s3_only. |
dry_run | boolean | No | Preview trước khi xóa Default: true. |
project_name | string or null | No | Filter by project name |
sub_group | string or null | No | Filter by sub-group |
version | string | Yes | Version cần xóa (required) |
DeleteMode
Delete mode options
Type: string, one of full, s3_only, metadata_only.
DeletedResultInfo
Thông tin 1 result bị xóa
| Property | Type | Required | Description |
|---|---|---|---|
action_taken | string | Yes | |
created_at | string | Yes | |
file_id | string | Yes | |
file_name | string | Yes | |
result_id | string | Yes | |
version | string | Yes |
Document
A parsed document: pages with their blocks and boxes (untern_docai.Document 1.0).
metadata (strings only) carries file_id, result_id, parsing_mode, parser_version,
page_count, page_image:<n> (path of page n's image, relative to the API base) for every
page that has one, and page_size_unknown (comma-separated page numbers whose size the bundle
did not record; those pages report 1 x 1).
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
metadata | map of string | No | |
pages | array of DocumentPage | No | |
schema_version | "1.0" | No | Default: 1.0. |
source | DocumentSource | Yes |
DocumentBBox
Axis-aligned box, top-left origin, in the page's unit.
| Property | Type | Required | Description |
|---|---|---|---|
x0 | number | Yes | |
x1 | number | Yes | |
y0 | number | Yes | |
y1 | number | Yes |
DocumentBlock
One layout element. A table block (and only it) carries table; its text is the
table's Markdown.
| Property | Type | Required | Description |
|---|---|---|---|
bbox | DocumentBBox or null | No | |
children | array of DocumentBlock | No | |
confidence | number or null | No | |
id | string | No | Default: ``. |
key | string or null | No | |
level | integer or null | No | |
page | integer | Yes | At least 1.0. |
table | DocumentTable or null | No | |
text | string | No | Default: ``. |
type | string, one of heading, paragraph, list, list_item, table, figure, key_value, signature, stamp | Yes | |
value | string or null | No |
DocumentPage
A page; its rendered image (when the bundle has one) is named in Document.metadata.
| Property | Type | Required | Description |
|---|---|---|---|
blocks | array of DocumentBlock | No | |
dpi | number or null | No | |
engine | string | Yes | |
height | number | Yes | |
number | integer | Yes | At least 1.0. |
rotation | integer, one of 0, 90, 180, 270 | No | Default: 0. |
unit | string, one of pt, px | No | Default: pt. |
width | number | Yes |
DocumentSource
| Property | Type | Required | Description |
|---|---|---|---|
mime_type | string | Yes | |
name | string | Yes | |
size_bytes | integer or null | No |
DocumentTable
A grid of cells; spanned positions are covered by exactly one anchor cell.
| Property | Type | Required | Description |
|---|---|---|---|
cells | array of DocumentTableCell | No | |
n_cols | integer | Yes | At least 0.0. |
n_rows | integer | Yes | At least 0.0. |
DocumentTableCell
| Property | Type | Required | Description |
|---|---|---|---|
bbox | DocumentBBox or null | No | |
col | integer | Yes | At least 0.0. |
col_span | integer | No | At least 1.0. Default: 1. |
confidence | number or null | No | |
is_header | boolean | No | Default: false. |
row | integer | Yes | At least 0.0. |
row_span | integer | No | At least 1.0. Default: 1. |
text | string | No | Default: ``. |
ErrorDetail
The machine-readable part of an error (stable field names, see module docstring).
| Property | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Stable error code from the API's closed list |
details | object | No | Identifiers, limits or states that explain the error |
message | string | Yes | One sentence for people; never contains submitted values |
request_id | string or null | No | Also sent as the X-Request-ID header |
retryable | boolean | No | True when the same request may succeed later Default: false. |
ErrorResponse
Body of every error response.
| Property | Type | Required | Description |
|---|---|---|---|
detail | any | Yes | Kept from the original API for compatibility |
error | ErrorDetail | Yes |
Estimate
POST /api/billing/estimate: per-item ceilings; free, nothing is held.
| Property | Type | Required | Description |
|---|---|---|---|
complete | boolean | Yes | False when an item could not be priced (see its error) |
credits_remaining | integer or null | No | |
items | array of EstimateItem | Yes | |
kind | "estimate" | No | Default: estimate. |
quote_expires_at | string (date-time) | Yes | Until when these rates apply (15 minutes); estimate again after it |
rates_version | string | Yes | |
schema_version | "1" | No | Default: 1. |
total_credits | integer | Yes | |
within_balance | boolean or null | No |
EstimateFile
Metadata of a file that is not uploaded yet (never its bytes; the name is not used).
| Property | Type | Required | Description |
|---|---|---|---|
mime | string | Yes | Media type, e.g. application/pdf |
name | string or null | No | Accepted, never stored |
page_count | integer or null | No | PDF pages or slides |
sha256 | string or null | No | Accepted, not used yet |
sheet_cells | array of integer or null | No | Non-empty cells per sheet (XLSX) |
size_bytes | integer or null | No | |
text_chars | integer or null | No | Characters of text (DOCX, TXT) |
text_pages | integer or null | No | Pages with a usable text layer, when known |
EstimateFileRef
A file already uploaded by the caller.
| Property | Type | Required | Description |
|---|---|---|---|
file_id | string | Yes |
EstimateItem
| Property | Type | Required | Description |
|---|---|---|---|
basis | string or null | No | How the credits were computed |
cached | boolean | No | Default: false. |
credits | integer or null | Yes | The ceiling: the most this item can cost |
credits_expected | integer or null | No | The likely cost: pages whose text layer is not known are priced as text pages (where the mode has a text rate); equal to credits when every page is known |
error | EstimateItemError or null | No | |
exactness | string, one of exact, upper_bound or null | No | |
mode | string or null | No | |
pages | integer or null | No |
EstimateItemError
| Property | Type | Required | Description |
|---|---|---|---|
code | string | Yes | |
message | string or null | No |
EstimateRequest
| Property | Type | Required | Description |
|---|---|---|---|
items | array of EstimateFile or EstimateFileRef | Yes | |
mode | string or null | No | Mode id (fast, auto, precise, expert) or the API spelling (Local); default: the catalog's default mode |
options | object or null | No | Reserved; ignored for now |
pages | string or null | No | Page selection applied to every item, e.g. 1-5,8 |
Evidence
A quote that was found in the document (untern_docai.extract.Evidence).
| Property | Type | Required | Description |
|---|---|---|---|
bbox | DocumentBBox or null | No | |
block_id | string | Yes | |
page | integer | Yes | |
quote | string | Yes | |
reanchored | boolean | No | Found in another block than the cited one Default: false. |
ExternalFileInfo
Thông tin file gốc được parse bên ngoài
| Property | Type | Required | Description |
|---|---|---|---|
external_path | string or null | No | Đường dẫn file gốc bên ngoài |
md5 | string | Yes | MD5 hash của file gốc |
name | string | Yes | Tên file gốc |
project_name | string or null | No | Project name for grouping |
size_bytes | integer or null | No | Kích thước file gốc |
sub_group | string or null | No | Sub-group within project |
type | string | Yes | Loại file (pdf, docx, etc.) |
ExternalRegistrationEntry
Entry đăng ký một file đã parse bên ngoài
| Property | Type | Required | Description |
|---|---|---|---|
file_info | ExternalFileInfo | Yes | |
result_info | ExternalResultInfo | Yes | |
skip_if_exists | boolean | No | Bỏ qua nếu file đã tồn tại Default: true. |
ExternalResultInfo
Thông tin kết quả parse bên ngoài
| Property | Type | Required | Description |
|---|---|---|---|
content_format | string or null | No | Output format: 'markdown' or 'parquet' Default: markdown. |
expire_days | integer or null | No | Days until expiration; local storage cleanup may remove results sooner Default: 30. |
external_markdown_path | string or null | No | Đường dẫn markdown/parquet bên ngoài |
external_result_path | string or null | No | Đường dẫn result ZIP bên ngoài |
markdown_md5 | string | Yes | MD5 hash của markdown/parquet content |
markdown_size | integer | Yes | Kích thước markdown/parquet content |
metadata | object or null | No | Metadata bổ sung |
parsing_mode | string | No | Mode parsing đã sử dụng Default: EXTERNAL. |
processing_timestamp | string (date-time) or null | No | Thời gian parse |
version | string | No | Parser version Default: 2.3.0. |
ExtractedField
| Property | Type | Required | Description |
|---|---|---|---|
confidence | number | Yes | From 0.0 to 1.0. |
evidence | array of Evidence | No | |
message | string or null | No | |
name | string | Yes | |
status | string, one of ok, missing, unsupported, invalid | Yes | |
value | JsonValue | No |
Extraction
An extraction job and, once completed, its result.
| Property | Type | Required | Description |
|---|---|---|---|
data | map of JsonValue or null | No | |
error | ServerError or null | No | |
errors | array of string | No | |
fields | map of ExtractedField | No | |
id | string | Yes | |
job_id | string or null | Yes | |
kind | "extraction" | No | Default: extraction. |
needs_review | array of string | No | |
prompt_ref | string or null | No | |
result_id | string | Yes | |
schema_ref | string | Yes | "invoice@1" or "inline:sha256:<12 hex>" |
schema_version | "1" | No | Default: 1. |
status | string, one of pending, processing, completed, failed | Yes | |
terminal | boolean | Yes |
ExtractionCreate
POST /api/extractions: one source (task_id or result_id) and one schema.
| Property | Type | Required | Description |
|---|---|---|---|
instructions | string or null | No | |
max_credits | integer or null | No | Refuse when the reservation would be larger (billing) |
require_evidence | boolean | No | A value without a verified quote from the document is dropped Default: true. |
result_id | string or null | No | A result the caller can read |
schema | object or null | No | Inline JSON Schema in the CLI-CONTRACT §5.6 subset |
schema_ref | string or null | No | A server schema NAME@VERSION from GET /api/schemas |
task_id | string or null | No | A completed parse task (job id) |
FileMetadata
| Property | Type | Required | Description |
|---|---|---|---|
file_type | string | Yes | |
parser_version | string | Yes | |
source_md5 | string | Yes | |
title | string | Yes |
FileProcessingResponse
| Property | Type | Required | Description |
|---|---|---|---|
cache_hit | boolean | No | Default: false. |
cost_info | CostInfo or null | No | |
error | string or null | No | |
file_id | string or null | No | |
file_name | string | Yes | |
markdown_content | string or null | No | |
markdown_url | string or null | No | |
output_folder | string or null | No | |
output_type | string | No | Default: markdown. |
paged_document | PagedDocumentDescriptor or null | No | |
parsed_document | ParsedDocument or null | No | |
result_format | "chandra_paged_v1" or null | No | |
result_id | string or null | No | |
result_url | string or null | No | |
retryable | boolean | No | Default: false. |
status | ProcessingStatus | Yes | |
task_id | string | Yes |
FileStatusEnum
Type: string, one of uploaded, processing, parsed, completed, failed.
FileToMarkdownResponse
| Property | Type | Required | Description |
|---|---|---|---|
file_md5 | string | Yes | |
file_name | string | Yes | |
found | boolean | Yes | |
markdown_data | MarkdownData or null | Yes | |
message | string | Yes | |
source_file_info | SourceFileInfo or null | Yes |
FileUploadResponse
| Property | Type | Required | Description |
|---|---|---|---|
file_id | string | Yes | |
md5 | string | Yes | |
name | string | Yes | |
project_name | string or null | No | |
results | array of ResultResponse | No | Default: []. |
source_url | string or null | Yes | |
status | FileStatusEnum | Yes | |
sub_group | string or null | No | |
type | string | Yes |
HTTPValidationError
| Property | Type | Required | Description |
|---|---|---|---|
detail | array of ValidationError | No |
ImageAnalysisInfo
Image content analysis result (only present when analyze_images=True).
| Property | Type | Required | Description |
|---|---|---|---|
content_summary | string | Yes | |
content_type | string | Yes | |
is_useful | boolean | Yes | |
reason | string | Yes | |
skip_reason | string or null | No | |
skipped | boolean | No | Default: false. |
text_in_image | string or null | No |
ImageData
| Property | Type | Required | Description |
|---|---|---|---|
base64_data | string | Yes | |
bbox | map of number or string or null | No | |
mime_type | string | Yes | |
name | string | Yes | |
page_number | integer | Yes |
Job
| Property | Type | Required | Description |
|---|---|---|---|
cache_hit | boolean | No | Default: false. |
created_at | string (date-time) | Yes | |
credits | JobCredits or null | No | Credits of this task; null while billing is off |
error | JobError or null | No | |
file_id | string | Yes | |
id | string | Yes | Task id (task_id of POST /api/files/process) |
mode | string or null | No | Parsing mode |
pages | string or null | No | Requested pages, normalised |
response_format | string or null | No | |
result_id | string or null | No | Set once the task has completed |
retryable | boolean | No | Default: false. |
source | JobSource | No | |
status | string, one of pending, processing, completed, failed | Yes | |
terminal | boolean | Yes | True for completed and failed |
updated_at | string (date-time) | Yes |
JobCredits
Credits of one task (billing on); the same numbers as the X-Credits-* headers.
| Property | Type | Required | Description |
|---|---|---|---|
charged | integer or null | No | Charged once the task is terminal |
refunded | integer or null | No | Released back (failed pages, own cache, estimate above actual) |
reserved | integer or null | No | Credits held when the task was created |
JobError
| Property | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Failure code of the task (closed list of the API) |
message | string or null | No | Short reason; no document content |
retryable | boolean | Yes | True when submitting the same work again may succeed |
JobList
| Property | Type | Required | Description |
|---|---|---|---|
items | array of Job | Yes | |
next_cursor | string or null | No | Opaque; pass as cursor for the next page, null at the end |
JobSource
| Property | Type | Required | Description |
|---|---|---|---|
md5 | string or null | No | MD5 of the uploaded bytes |
name | string or null | No | Name of the uploaded file |
size_bytes | integer or null | No | Size of the stored source, if known |
JsonResultFormat
| Property | Type | Required | Description |
|---|---|---|---|
metadata | object | No | Default: {}. |
pages | array of ParsedPage | No | Default: []. |
JsonValue
Type: any.
KGReadyResponse
| Property | Type | Required | Description |
|---|---|---|---|
assets | array of AssetInfo | No | Default: []. |
export_type | string, one of document, sheet | Yes | |
file_id | string | Yes | |
file_name | string | Yes | |
markdown | MarkdownContent | Yes | |
metadata | FileMetadata | Yes | |
result_id | string or null | No | |
sheets | array of SheetInfo | No | Default: []. |
KeyCostInfo
| Property | Type | Required | Description |
|---|---|---|---|
cost_limit | number or null | Yes | |
cumulative_cost | number | Yes | |
current_month | string | Yes | |
current_month_cost | number | Yes | |
key_suffix | string | Yes | |
key_type | string | Yes | |
monthly_history | array of MonthlyCostEntry | Yes | |
status | string | Yes |
LlamaKeyInfo
| Property | Type | Required | Description |
|---|---|---|---|
error_count | integer | Yes | |
index | integer | Yes | |
key_suffix | string | Yes | |
status | string | Yes | |
success_count | integer | Yes |
LlamaKeysResponse
| Property | Type | Required | Description |
|---|---|---|---|
active_workers | integer | Yes | |
keys | array of LlamaKeyInfo | Yes | |
status_summary | object | Yes | |
total_keys | integer | Yes |
LlamaKeysUpdate
| Property | Type | Required | Description |
|---|---|---|---|
keys | array of string | Yes |
MarkdownContent
| Property | Type | Required | Description |
|---|---|---|---|
content | string | Yes | |
filename | string | Yes | |
md5 | string | Yes |
MarkdownData
| Property | Type | Required | Description |
|---|---|---|---|
content | string or null | No | Optional inline markdown content |
markdown_md5 | string | Yes | |
markdown_size | integer | Yes | |
markdown_url | string | Yes | |
result_zip_url | string or null | No | ZIP download URL |
MarkdownIdentificationResponse
| Property | Type | Required | Description |
|---|---|---|---|
found_source | boolean | Yes | |
message | string | Yes | |
source_mapping | MarkdownSourceMapping or null | Yes | |
uploaded_markdown_md5 | string | Yes |
MarkdownSourceMapping
| Property | Type | Required | Description |
|---|---|---|---|
cost_info | object or null | Yes | |
is_latest_version | boolean | No | Whether this is the latest version Default: false. |
markdown_md5 | string | Yes | |
markdown_size | integer | Yes | |
markdown_url | string | Yes | |
parsing_mode | string | Yes | |
processing_date | string (date-time) | Yes | |
project_name | string or null | No | |
result_id | string | Yes | |
result_zip_url | string or null | No | |
source_file_id | string | Yes | |
source_file_md5 | string | Yes | |
source_file_name | string | Yes | |
source_file_type | string | Yes | |
source_file_url | string or null | No | |
source_upload_date | string (date-time) | Yes | |
sub_group | string or null | No | |
version | string | No | Parser version Default: 2.3.0. |
MeResponse
| Property | Type | Required | Description |
|---|---|---|---|
billing | BillingSummary or null | No | Plan, allowed modes and the Preview meter; null while billing is off |
email | string or null | No | |
expires_at | string (date-time) or null | No | |
key_id | string or null | No | |
kind | string, one of oidc, api_key, admin_key | Yes | |
name | string or null | No | |
principal | string | Yes | oidc:<sub>, key:<id> or admin_key |
roles | array of string | Yes | |
scopes | array of string | Yes |
ModeInfo
| Property | Type | Required | Description |
|---|---|---|---|
alias_of | string or null | No | The catalog mode a legacy spelling means |
available | boolean | Yes | False when this server or the caller's plan does not allow it |
best_for | string or null | No | Documents the mode suits |
credits | map of integer or number or null | No | Credits per billable page by page class (text, recognized, vlm) |
default | boolean | Yes | True only for the mode used when none is given |
description | string or null | No | What the mode does |
id | string | Yes | A parsing_mode value of POST /api/files/process |
includes | array of string | No | Add-ons included in the price |
kind | string, one of mode, legacy | No | mode: a catalog mode (fast, auto, precise, expert); legacy: older Default: legacy. |
label | string or null | No | Display name, e.g. Auto |
message | string or null | No | The reason as one plain sentence a portal or agent may show |
preset_ids | array of string | No | Presets that use this mode |
reason | string or null | No | Why the mode is unavailable: license_gated, not_offered, engine_not_configured (this server: the mode's parsing engine has no key) or not_in_plan (the caller's plan); else null |
upgrade_to | string or null | No | With not_in_plan: the plan that includes this mode |
ModePlan
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
modes_allowed | array of string or null | Yes | Null means every mode |
upgrade_to | string or null | No |
ModesResponse
| Property | Type | Required | Description |
|---|---|---|---|
default_mode | string or null | No | Catalog mode used when none is given |
modes | array of ModeInfo | Yes | |
plan | ModePlan or null | No | The caller's plan while billing is on; null otherwise |
presets | array of PresetInfo | No | Document-type presets |
rates_version | string or null | No | Catalog version of the credits |
MonthlyCostEntry
| Property | Type | Required | Description |
|---|---|---|---|
cost | number | Yes | |
month | string | Yes |
OfferedPlan
| Property | Type | Required | Description |
|---|---|---|---|
description | string | Yes | |
id | string | Yes | |
included_credits | integer | Yes | |
interval | string or null | No | |
modes_allowed | array of string or null | No | |
name | string | Yes | |
order | integer or null | No | |
pages_per_month | integer or null | No | |
price | PlanPrice or null | No | Only when the plan and the rates are approved; else null |
status | string | Yes | proposal until the founder approves it (G11) |
upgrade_to | string or null | No |
PageItem
| Property | Type | Required | Description |
|---|---|---|---|
bbox | map of number or string or null | No | |
md | string | Yes | |
type | string | Yes | |
value | string | Yes |
PagedDocumentDescriptor
| Property | Type | Required | Description |
|---|---|---|---|
document_url | string | Yes | |
file_id | string (uuid) | Yes | |
format | "chandra_paged_v1" | No | Default: chandra_paged_v1. |
manifest_sha256 | string | Yes | |
pages_url | string | Yes | |
producer_task_id | string (uuid) | Yes | |
result_id | string (uuid) | Yes | |
selected_page_count | integer | Yes | At least 1.0. |
source_page_count | integer | Yes | At least 1.0. |
total_blocks | integer | Yes | At least 0.0. |
total_images | integer | Yes | At least 0.0. |
total_items | integer | Yes | At least 0.0. |
total_tokens | integer | Yes | At least 0.0. |
zip_url | string | Yes |
ParsedDocument
| Property | Type | Required | Description |
|---|---|---|---|
cost_info | CostInfo | Yes | |
dict_result | JsonResultFormat | Yes | |
job_metadata | object | No | Default: {}. |
markdown_result | string | Yes |
ParsedPage
| Property | Type | Required | Description |
|---|---|---|---|
charts | array of ImageData | No | Default: []. |
images | array of ImageData | No | Default: []. |
items | array of PageItem | No | Default: []. |
page_number | integer | Yes |
ParsingMode
Type: string, one of Local, fast, auto, precise, expert.
PlanList
| Property | Type | Required | Description |
|---|---|---|---|
items | array of OfferedPlan | Yes | |
preview | boolean | Yes | True while only the Preview lineup is offered |
rates_version | string | Yes |
PlanPrice
| Property | Type | Required | Description |
|---|---|---|---|
amount | string | Yes | Decimal string in the catalog's base currency |
annual_amount | string or null | No | |
currency | string | Yes | |
interval | string | Yes |
PlanRef
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
modes_allowed | array of string or null | No | Modes the plan includes; null means every mode |
name | string | Yes | |
status | string | Yes | proposal until the founder approves the plan (G11) |
upgrade_to | string or null | No | The plan that includes more (modes, pages), if any |
PlanSummary
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
name | string | Yes | |
status | string | Yes |
PortalLink
| Property | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Short-lived link to the provider's customer portal |
PresetInfo
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Pass as preset to POST /api/files/process |
label | string | Yes | |
mode | string | Yes | The mode the preset runs in; a preset never changes the price |
options | map of string or integer or boolean | No | Options the preset sets (not applied by the engine yet) |
PreviewState
Preview allowance for the portal's credit meter, the CLI and MCP whoami (SPEC §5.8).
| Property | Type | Required | Description |
|---|---|---|---|
active | boolean | Yes | True while the product is in Preview |
credits_limit | integer | Yes | The plan's credits for this period |
credits_remaining | integer | Yes | |
period_end | string (date-time) | Yes |
ProcessingStatus
Type: string, one of pending, processing, completed, failed.
ProtectedResourceMetadata
| Property | Type | Required | Description |
|---|---|---|---|
authorization_servers | array of string | Yes | Issuer of realm untern |
bearer_methods_supported | array of string | Yes | |
resource | string or null | Yes | Canonical URL of this API (null until configured) |
resource_name | string | Yes | |
scopes_supported | array of string | Yes |
PublicConfig
| Property | Type | Required | Description |
|---|---|---|---|
accepted_extensions | array of string | Yes | File extensions /api/files/process takes |
accepted_mime_types | array of string | Yes | Media types of those extensions |
max_upload_bytes | integer | Yes | Largest accepted upload in bytes (100 MB at launch) |
modes | array of ModeInfo | Yes | Same items as GET /api/files/modes |
RegistrationResult
Kết quả đăng ký một entry
| Property | Type | Required | Description |
|---|---|---|---|
file_id | string or null | No | |
file_name | string | Yes | |
message | string | Yes | |
result_id | string or null | No | |
status | string | Yes |
ResultResponse
| Property | Type | Required | Description |
|---|---|---|---|
content_format | string or null | No | |
created_at | string (date-time) | Yes | |
expire_at | string (date-time) or null | No | |
file_id | string | Yes | |
markdown_url | string or null | Yes | |
parsing_mode | string or null | No | |
result_id | string | Yes | |
result_url | string or null | Yes | |
status | ResultStatusEnum | Yes | |
sync_source | string or null | No | |
target_pages | string or null | No | |
version | string | No | Default: 2.9.0. |
ResultStatusEnum
Type: string, one of processing, done, failed, completed.
RevokeResponse
| Property | Type | Required | Description |
|---|---|---|---|
message | string | Yes |
ScheduledChange
| Property | Type | Required | Description |
|---|---|---|---|
action | string | Yes | cancel, pause or resume (the provider's scheduled change) |
effective_at | string (date-time) or null | No | |
plan_id | string or null | No | Set when the change switches plans |
SchemaInfo
| Property | Type | Required | Description |
|---|---|---|---|
description | string | Yes | |
json_schema | map of JsonValue | Yes | |
ref | string | Yes | |
title | string | Yes |
SchemaList
| Property | Type | Required | Description |
|---|---|---|---|
items | array of SchemaInfo | Yes |
ServerError
| Property | Type | Required | Description |
|---|---|---|---|
code | string | Yes | |
message | string | Yes | |
retryable | boolean | No | Default: false. |
SheetInfo
| Property | Type | Required | Description |
|---|---|---|---|
column_count | integer | Yes | |
download_url | string | Yes | |
filename | string | Yes | |
md5 | string | Yes | |
row_count | integer | Yes | |
semantic_summary | string | Yes | |
sheet_name | string | Yes |
SourceFileInfo
| Property | Type | Required | Description |
|---|---|---|---|
created_at | string (date-time) | Yes | |
file_id | string | Yes | |
name | string | Yes | |
project_name | string or null | No | |
sub_group | string or null | No | |
type | string | Yes |
SourceToMarkdownMapping
| Property | Type | Required | Description |
|---|---|---|---|
available_versions | array of string | No | All available versions for this file |
last_processing_date | string (date-time) | Yes | |
latest_version | string or null | No | The latest/newest version available |
related_markdown_files | array of MarkdownSourceMapping | Yes | |
source_file_md5 | string | Yes | |
source_file_name | string | Yes | |
total_markdown_files | integer | Yes |
SyncDocumentEntry
Entry for Phase 1 metadata sync - no artifact data
| Property | Type | Required | Description |
|---|---|---|---|
file_info | ExternalFileInfo | Yes | |
result_info | ExternalResultInfo | Yes | |
skip_if_exists | boolean | No | Skip if (md5, version) exists Default: true. |
source_folder | string or null | No | Original folder path |
SyncResultEntry
Per-entry sync result
| Property | Type | Required | Description |
|---|---|---|---|
file_id | string or null | No | |
file_md5 | string | Yes | |
file_name | string | Yes | |
markdown_url | string or null | No | |
message | string | Yes | |
result_id | string or null | No | |
result_zip_url | string or null | No | |
status | string | Yes | |
version | string | Yes |
TokenBudget
| Property | Type | Required | Description |
|---|---|---|---|
limit | integer | Yes | |
period | string | Yes | |
remaining | integer | Yes | |
used | integer | Yes |
Usage
GET /api/me/usage: the caller's plan and credits of one period.
| Property | Type | Required | Description |
|---|---|---|---|
as_of | string (date-time) | Yes | |
credits_included | integer | Yes | |
credits_remaining | integer | Yes | Available now (holds taken off), without overage |
credits_topup_remaining | integer | Yes | |
credits_used | integer | Yes | |
kind | "usage" | No | Default: usage. |
overage_allowed | boolean | Yes | |
overage_cap | integer or null | No | |
overage_used | integer | Yes | |
pages_included | integer or null | No | Page cap of the period (Free: 50); null without a page cap |
pages_remaining | integer or null | No | |
pages_used | integer or null | No | Pages used, open holds included |
period_end | string (date-time) | Yes | |
period_start | string (date-time) | Yes | |
plan | PlanRef | Yes | |
preview | UsagePreview or null | No | |
schema_version | "1" | No | Default: 1. |
token_budget | TokenBudget or null | No | The calling key's own budget, when one is set |
UsagePreview
| Property | Type | Required | Description |
|---|---|---|---|
enabled | boolean | Yes | True while the product is in Preview |
pool | string or null | No | The capacity pool (tier) of the account |
ValidationError
| Property | Type | Required | Description |
|---|---|---|---|
ctx | object | No | |
input | any | No | |
loc | array of string or integer | Yes | |
msg | string | Yes | |
type | string | Yes |