{"openapi":"3.1.0","info":{"title":"Datalab API","version":""},"paths":{"/api/v1/compliance/webhook":{"post":{"tags":["compliance"],"summary":"Compliance Webhook","description":"Provider webhook: verify, persist the raw event (deduped), enqueue reconcile.\nReturns 200 fast; the enqueued reconcile re-fetches authoritative status.","operationId":"compliance_webhook_api_v1_compliance_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Compliance Webhook Api V1 Compliance Webhook Post"}}}}}}},"/api/v1/health":{"get":{"summary":"Health","description":"This endpoint is used to check the health of the API.  Returns a JSON object with the key \"status\" set to \"ok\".","operationId":"health_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/api/v1/user_health":{"get":{"summary":"Api Health","description":"This endpoint is used to check the health of the API, given an API key.","operationId":"api_health_api_v1_user_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/marker/extraction/gen_schemas":{"post":{"summary":"Generate Extraction Schemas","description":"For a given file, generate potential extraction schemas.","operationId":"gen_schemas_api_v1_marker_extraction_gen_schemas_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionGenSchemasRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/table_rec":{"post":{"summary":"[DEPRECATED] Table Recognition","description":"[DEPRECATED] This endpoint is deprecated and will be removed in the future.\nThis endpoint is used to submit a request for table recognition.  The detected tables will be returned, as well as their parsed structure.","operationId":"table_rec_api_v1_table_rec_post","deprecated":true,"security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_table_rec_api_v1_table_rec_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ocr":{"post":{"summary":"[DEPRECATED] OCR","description":"[DEPRECATED] This endpoint is deprecated and will be removed in the future.\nThis endpoint is used to submit a PDF or image for OCR.  The OCR text lines will be returned, along with their bbox and polygon coordinates.","operationId":"ocr_api_v1_ocr_post","deprecated":true,"security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_ocr_api_v1_ocr_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/fill":{"post":{"summary":"Form Filling","description":"Fill PDF or image forms with provided field data. Supports PDFs with and without native form fields.","operationId":"fill_api_v1_fill_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_fill_api_v1_fill_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/create-document":{"post":{"summary":"Create Document","description":"Create a DOCX document from markdown with track changes support. Supports <ins>, <del>, and <comment> tags.","operationId":"create_document_api_v1_create_document_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocumentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/convert":{"post":{"summary":"Convert Document","description":"Convert a PDF, image, or document to markdown, HTML, JSON, or chunks. Use save_checkpoint=true to save parsed state for later /extract or /segment calls.","operationId":"convert_api_v1_convert_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_convert_api_v1_convert_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom-pipeline":{"post":{"summary":"Run Custom Pipeline","description":"Execute a custom pipeline configuration. The pipeline_id must reference a completed custom pipeline ID or a template ID.","operationId":"custom_pipeline_api_v1_custom_pipeline_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_custom_pipeline_api_v1_custom_pipeline_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom-processor":{"post":{"summary":"Run Custom Processor","description":"Execute a custom processor configuration. The pipeline_id must reference a completed custom processor ID or a template ID.","operationId":"custom_pipeline_api_v1_custom_processor_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_custom_pipeline_api_v1_custom_processor_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/track-changes":{"post":{"summary":"Track Changes","description":"Extract and display tracked changes from DOCX documents. Returns markdown, HTML, and/or chunks with change annotations.","operationId":"track_changes_endpoint_api_v1_track_changes_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_track_changes_endpoint_api_v1_track_changes_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/thumbnails/{lookup_key}":{"get":{"summary":"Thumbnails","operationId":"thumbnails_api_v1_thumbnails__lookup_key__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"lookup_key","in":"path","required":true,"schema":{"type":"string","title":"Lookup Key"}},{"name":"page_range","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Range"}},{"name":"thumb_width","in":"query","required":false,"schema":{"type":"integer","default":300,"title":"Thumb Width"}},{"name":"track_changes","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Track Changes"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThumbnailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/marker/{request_id}":{"get":{"summary":"Marker Result Check","description":"Poll this endpoint to check status of Marker request and retrieve final results","operationId":"result_response_api_v1_marker__request_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkerFinalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ocr/{request_id}":{"get":{"summary":"OCR Result Check","description":"Poll this endpoint to check status of an OCR request and retrieve final results","operationId":"result_response_api_v1_ocr__request_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OCRFinalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/table_rec/{request_id}":{"get":{"summary":"Table Rec Result Check","description":"Poll this endpoint to check status of Table Rec request and retrieve final results","operationId":"result_response_api_v1_table_rec__request_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableRecFinalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/marker/extraction/gen_schemas/{request_id}":{"get":{"summary":"Extraction Schema Generation Result Check","description":"Poll this endpoint to check status of an Extraction Schema Generation request and retrieve final results","operationId":"result_response_api_v1_marker_extraction_gen_schemas__request_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionGenSchemasResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/fill/{request_id}":{"get":{"summary":"Form Filling Result Check","description":"Poll this endpoint to check status of a Form Filling request and retrieve the filled form","operationId":"result_response_api_v1_fill__request_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormFillingFinalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/create-document/{request_id}":{"get":{"summary":"Create Document Result Check","description":"Poll this endpoint to check status of a Create Document request and retrieve the generated document","operationId":"result_response_api_v1_create_document__request_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocumentFinalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/convert/{request_id}":{"get":{"summary":"Convert Result Check","description":"Poll this endpoint to check the status of a Convert request and retrieve the converted document.","operationId":"result_response_api_v1_convert__request_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkerFinalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/extract/{request_id}":{"get":{"summary":"Extract Result Check","description":"Poll this endpoint to check the status of an Extract request and retrieve the extracted structured data.","operationId":"result_response_api_v1_extract__request_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkerFinalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/segment/{request_id}":{"get":{"summary":"Segment Result Check","description":"Poll this endpoint to check the status of a Segment request and retrieve the segmentation results.","operationId":"result_response_api_v1_segment__request_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkerFinalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom-processor/{request_id}":{"get":{"summary":"Custom Processor Result Check","description":"Poll this endpoint to check the status of a Custom Processor request and retrieve the results.","operationId":"result_response_api_v1_custom_processor__request_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkerFinalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/track-changes/{request_id}":{"get":{"summary":"Track Changes Result Check","description":"Poll this endpoint to check the status of a Track Changes request and retrieve the results.","operationId":"result_response_api_v1_track_changes__request_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkerFinalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/marker":{"post":{"summary":"[DEPRECATED] Marker","description":"**DEPRECATED**: Use the new endpoints instead:\n- `/convert` for document conversion\n- `/extract` for structured data extraction\n- `/segment` for document segmentation\n- `/custom-pipeline` for custom pipeline execution\n\nThis endpoint will be removed in a future version.","operationId":"marker_api_v1_marker_post","deprecated":true,"security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_marker_api_v1_marker_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/extract":{"post":{"summary":"Extract Structured Data","description":"Extract structured data from a document using a JSON schema. Provide a file for end-to-end processing, or a checkpoint_id from a previous /convert call to skip re-parsing.","operationId":"extract_api_v1_extract_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_extract_api_v1_extract_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/segment":{"post":{"summary":"Segment Document","description":"Segment a document into sections using a schema. Returns page ranges for each identified segment. Provide a file for end-to-end processing, or a checkpoint_id from a previous /convert call.","operationId":"segment_api_v1_segment_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_segment_api_v1_segment_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_processors/access":{"get":{"tags":["Custom Processors"],"summary":"Check Pipeline Access","description":"Check if the current user's team has access to custom processors.\n\nCustom processors are generally available: every team has access and can\ncreate/iterate. Kept (always-true) for backwards compatibility with deployed\nfrontends and API integrations that still poll this endpoint; creation volume\nis governed by the per-plan creation allowance, not by an access gate.","operationId":"check_pipeline_access_api_v1_custom_processors_access_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomProcessorAccessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_processors/creation-allowance":{"get":{"tags":["Custom Processors"],"summary":"Get Creation Allowance","description":"2026 custom-processor CREATION allowance preview for the current team (§5).\n\nThe frontend reads this BEFORE creating a NEW processor to show the at-cap block\n(Free / developer hard cap) or the one-time $5 confirmation (Team).\n\nNOTE: the path is registered BEFORE /custom_pipelines/{lookup_key} so the literal\n\"creation-allowance\" segment is matched by this route, not captured as a lookup_key.","operationId":"get_creation_allowance_api_v1_custom_processors_creation_allowance_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomProcessorCreationAllowanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_processors":{"post":{"tags":["Custom Processors"],"summary":"Submit Custom Pipeline","description":"Submit a custom processor generation request.","operationId":"submit_custom_pipeline_api_v1_custom_processors_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_submit_custom_pipeline_api_v1_custom_processors_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomProcessorInitialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Custom Processors"],"summary":"List Custom Pipelines","description":"List all custom processors for a team.\nReturns processors ordered by creation date (newest first).","operationId":"list_custom_pipelines_api_v1_custom_processors_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomProcessorListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_processors/{lookup_key}":{"get":{"tags":["Custom Processors"],"summary":"Get Custom Pipeline Status","description":"Check the status of a custom processor generation request using the request_check_url from the initial submission.","operationId":"get_custom_pipeline_status_api_v1_custom_processors__lookup_key__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"lookup_key","in":"path","required":true,"schema":{"type":"string","title":"Lookup Key"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomProcessorStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_processors/{processor_id}/transfer":{"post":{"tags":["Custom Processors"],"summary":"Transfer Custom Pipeline","description":"Transfer a custom processor to another team.\nThis endpoint allows admins to transfer ownership of a custom processor from one team\nto another. This is useful for:\n1. Beta testing: Create and test processors internally, then transfer to customers\n2. Sharing: Move successful processor configurations between teams\n3. Updating: Push iterated versions to an existing customer processor (via to_processor_id)\n\nSuperusers can transfer any processor regardless of team ownership.","operationId":"transfer_custom_pipeline_api_v1_custom_processors__processor_id__transfer_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_transfer_custom_pipeline_api_v1_custom_processors__processor_id__transfer_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomProcessorTransferResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_processors/{processor_id}/archive":{"post":{"tags":["Custom Processors"],"summary":"Archive Custom Pipeline","description":"Archive a custom processor (soft-delete).\nAvailable to any team member with pipeline access.","operationId":"archive_custom_pipeline_api_v1_custom_processors__processor_id__archive_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_processors/{processor_id}":{"delete":{"tags":["Custom Processors"],"summary":"Delete Custom Pipeline","description":"Permanently delete a custom processor and all its versions. Admin-only.","operationId":"delete_custom_pipeline_api_v1_custom_processors__processor_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_processors/{processor_id}/restore":{"post":{"tags":["Custom Processors"],"summary":"Restore Custom Pipeline","description":"Restore an archived custom processor. Admin-only.","operationId":"restore_custom_pipeline_api_v1_custom_processors__processor_id__restore_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_restore_custom_pipeline_api_v1_custom_processors__processor_id__restore_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_processors/{processor_id}/iterate":{"post":{"tags":["Custom Processors"],"summary":"Iterate Custom Pipeline","description":"Iterate on an existing custom processor.\n\nProvides feedback to the agent which resumes from the previous session,\ncreating a new version of the processor parameters.","operationId":"iterate_custom_pipeline_api_v1_custom_processors__processor_id__iterate_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_iterate_custom_pipeline_api_v1_custom_processors__processor_id__iterate_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomProcessorInitialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_processors/{processor_id}/versions":{"get":{"tags":["Custom Processors"],"summary":"List Pipeline Versions","description":"List all versions of a custom processor, ordered by version descending.","operationId":"list_pipeline_versions_api_v1_custom_processors__processor_id__versions_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessorVersionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_processors/{processor_id}/versions/{version}":{"get":{"tags":["Custom Processors"],"summary":"Get Processor Version Detail","description":"Get detailed data for a specific processor version, including pipeline_params and eval_definition.","operationId":"get_processor_version_detail_api_v1_custom_processors__processor_id__versions__version__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"version","in":"path","required":true,"schema":{"type":"integer","title":"Version"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessorVersionDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_processors/{processor_id}/set_active":{"post":{"tags":["Custom Processors"],"summary":"Set Active Pipeline Version","description":"Set the active version of a custom processor.\nChanges the active_version pointer to any existing version.","operationId":"set_active_pipeline_version_api_v1_custom_processors__processor_id__set_active_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_set_active_pipeline_version_api_v1_custom_processors__processor_id__set_active_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_processors/{processor_id}/pipelines":{"get":{"tags":["Custom Processors"],"summary":"Get Pipelines Using Processor","description":"List pipelines (from the Pipeline table) that reference this custom processor\nin their steps JSON.","operationId":"get_pipelines_using_processor_api_v1_custom_processors__processor_id__pipelines_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelinesUsingProcessorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_processors/seed":{"post":{"tags":["Custom Processors"],"summary":"Seed Custom Pipeline","description":"Directly create a completed custom processor from JSON. Admin-only.\n\nSkips the agent entirely -- useful for seeding test data, local development,\nand populating demos. The processor is immediately usable via POST /api/v1/marker.\n\nUSE WITH CAUTION","operationId":"seed_custom_pipeline_api_v1_custom_processors_seed_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeedPipelineRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeedPipelineResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_processors/{processor_id}/eval_definition":{"get":{"tags":["Custom Processors"],"summary":"Get Pipeline Eval Definition","description":"Get the eval_definition from a custom processor's active version.","operationId":"get_pipeline_eval_definition_api_v1_custom_processors__processor_id__eval_definition_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Custom Processors"],"summary":"Update Pipeline Eval Definition","description":"Update the eval_definition on a custom processor's active version.","operationId":"update_pipeline_eval_definition_api_v1_custom_processors__processor_id__eval_definition_put","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Eval Definition"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_processors/{processor_id}/eval_rubric":{"patch":{"tags":["Custom Processors"],"summary":"Set Processor Eval Rubric","description":"Link or detach an EvalRubric on a custom processor.\n\nDUAL WRITE (mirrors the generation-agent flow in\ncustom_processors/tasks.py, where the version's eval_definition and the\nprocessor.eval_rubric_id back-link are always written together): the\nexecution engine reads ONLY the rubric copy embedded in the ACTIVE\nversion's eval_definition, so the back-link and that copy must move as one.\n\n- `{\"eval_rubric_id\": <id>}`: verifies the rubric exists on this team\n  (404) and isn't archived (400), then sets processor.eval_rubric_id AND\n  mirrors rubric.eval_definition into the active version. Requires a\n  completed active version (400 otherwise) — a link without the mirrored\n  copy would silently never score.\n- `{\"eval_rubric_id\": null}`: clears processor.eval_rubric_id AND the\n  active version's eval_definition. Tolerates a processor with no active\n  version (nothing to clear on the version side), so a dangling link is\n  always removable.","operationId":"set_processor_eval_rubric_api_v1_custom_processors__processor_id__eval_rubric_patch","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetProcessorEvalRubricRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_processors/{processor_id}/export":{"get":{"tags":["Custom Processors"],"summary":"Export Custom Pipeline","description":"Export a custom processor with all versions. Admin-only.\n\nNote: This endpoint allows admins to export ANY processor across all teams,\nnot just processors belonging to the admin's team.\n\nReturns the full processor record and all version data, suitable for\nuse as training data or re-importing via the seed endpoint.","operationId":"export_custom_pipeline_api_v1_custom_processors__processor_id__export_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_processors/describe":{"post":{"tags":["Custom Processors"],"summary":"Describe Customizer","description":"Conversational endpoint for building a custom processor description.\nAccepts the chat history, returns the next assistant message.\nWhen the system has enough context, includes a proposed_description.","operationId":"describe_customizer_api_v1_custom_processors_describe_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomizerDescribeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomizerDescribeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/processor_templates":{"get":{"tags":["Processor Templates"],"summary":"List Templates","description":"List all published pipeline templates.","operationId":"list_templates_api_v1_processor_templates_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Processor Templates"],"summary":"Promote To Template","description":"Create a template by copying an existing completed processor. Admin-only.\n\nCreates an independent copy so the admin can iterate on the source processor\nwithout affecting the template. Only the active version is copied, and\nagent session/checkpoint data is stripped so cloned copies don't share\nClaude sessions.","operationId":"promote_to_template_api_v1_processor_templates_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_promote_to_template_api_v1_processor_templates_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/processor_templates/{slug}":{"get":{"tags":["Processor Templates"],"summary":"Get Template","description":"Get detailed info for a pipeline template.","operationId":"get_template_api_v1_processor_templates__slug__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Processor Templates"],"summary":"Update Template","description":"Update template metadata. Admin-only.","operationId":"update_template_api_v1_processor_templates__slug__put","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_update_template_api_v1_processor_templates__slug__put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Processor Templates"],"summary":"Remove Template","description":"Un-template a pipeline (sets is_template=False). Admin-only.","operationId":"remove_template_api_v1_processor_templates__slug__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/processor_templates/{slug}/examples/{filename}":{"get":{"tags":["Processor Templates"],"summary":"Download Template Example","description":"Fetch example file from R2 and return content directly.","operationId":"download_template_example_api_v1_processor_templates__slug__examples__filename__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Processor Templates"],"summary":"Remove Template Example","description":"Remove an example file from a template. Admin-only.","operationId":"remove_template_example_api_v1_processor_templates__slug__examples__filename__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/processor_templates/{slug}/examples/{filename}/thumbnail":{"get":{"tags":["Processor Templates"],"summary":"Download Template Example Thumbnail","description":"Stream thumbnail image for an example file.","operationId":"download_template_example_thumbnail_api_v1_processor_templates__slug__examples__filename__thumbnail_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/processor_templates/{slug}/clone":{"post":{"tags":["Processor Templates"],"summary":"Clone Template","description":"Clone a template to the user's team as a new custom processor.","operationId":"clone_template_api_v1_processor_templates__slug__clone_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateCloneResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/processor_templates/{slug}/examples":{"post":{"tags":["Processor Templates"],"summary":"Add Template Examples","description":"Upload example files for a template. Admin-only.","operationId":"add_template_examples_api_v1_processor_templates__slug__examples_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_add_template_examples_api_v1_processor_templates__slug__examples_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_pipelines/access":{"get":{"tags":["Custom Pipelines (Deprecated)"],"summary":"Check Pipeline Access","description":"Check if the current user's team has access to custom processors.\n\nCustom processors are generally available: every team has access and can\ncreate/iterate. Kept (always-true) for backwards compatibility with deployed\nfrontends and API integrations that still poll this endpoint; creation volume\nis governed by the per-plan creation allowance, not by an access gate.","operationId":"check_pipeline_access_api_v1_custom_pipelines_access_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomProcessorAccessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_pipelines/creation-allowance":{"get":{"tags":["Custom Pipelines (Deprecated)"],"summary":"Get Creation Allowance","description":"2026 custom-processor CREATION allowance preview for the current team (§5).\n\nThe frontend reads this BEFORE creating a NEW processor to show the at-cap block\n(Free / developer hard cap) or the one-time $5 confirmation (Team).\n\nNOTE: the path is registered BEFORE /custom_pipelines/{lookup_key} so the literal\n\"creation-allowance\" segment is matched by this route, not captured as a lookup_key.","operationId":"get_creation_allowance_api_v1_custom_pipelines_creation_allowance_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomProcessorCreationAllowanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_pipelines":{"post":{"tags":["Custom Pipelines (Deprecated)"],"summary":"Submit Custom Pipeline","description":"Submit a custom processor generation request.","operationId":"submit_custom_pipeline_api_v1_custom_pipelines_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_submit_custom_pipeline_api_v1_custom_pipelines_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomProcessorInitialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Custom Pipelines (Deprecated)"],"summary":"List Custom Pipelines","description":"List all custom processors for a team.\nReturns processors ordered by creation date (newest first).","operationId":"list_custom_pipelines_api_v1_custom_pipelines_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomProcessorListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_pipelines/{lookup_key}":{"get":{"tags":["Custom Pipelines (Deprecated)"],"summary":"Get Custom Pipeline Status","description":"Check the status of a custom processor generation request using the request_check_url from the initial submission.","operationId":"get_custom_pipeline_status_api_v1_custom_pipelines__lookup_key__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"lookup_key","in":"path","required":true,"schema":{"type":"string","title":"Lookup Key"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomProcessorStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_pipelines/{processor_id}/transfer":{"post":{"tags":["Custom Pipelines (Deprecated)"],"summary":"Transfer Custom Pipeline","description":"Transfer a custom processor to another team.\nThis endpoint allows admins to transfer ownership of a custom processor from one team\nto another. This is useful for:\n1. Beta testing: Create and test processors internally, then transfer to customers\n2. Sharing: Move successful processor configurations between teams\n3. Updating: Push iterated versions to an existing customer processor (via to_processor_id)\n\nSuperusers can transfer any processor regardless of team ownership.","operationId":"transfer_custom_pipeline_api_v1_custom_pipelines__processor_id__transfer_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_transfer_custom_pipeline_api_v1_custom_pipelines__processor_id__transfer_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomProcessorTransferResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_pipelines/{processor_id}/archive":{"post":{"tags":["Custom Pipelines (Deprecated)"],"summary":"Archive Custom Pipeline","description":"Archive a custom processor (soft-delete).\nAvailable to any team member with pipeline access.","operationId":"archive_custom_pipeline_api_v1_custom_pipelines__processor_id__archive_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_pipelines/{processor_id}":{"delete":{"tags":["Custom Pipelines (Deprecated)"],"summary":"Delete Custom Pipeline","description":"Permanently delete a custom processor and all its versions. Admin-only.","operationId":"delete_custom_pipeline_api_v1_custom_pipelines__processor_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_pipelines/{processor_id}/restore":{"post":{"tags":["Custom Pipelines (Deprecated)"],"summary":"Restore Custom Pipeline","description":"Restore an archived custom processor. Admin-only.","operationId":"restore_custom_pipeline_api_v1_custom_pipelines__processor_id__restore_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_restore_custom_pipeline_api_v1_custom_pipelines__processor_id__restore_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_pipelines/{processor_id}/iterate":{"post":{"tags":["Custom Pipelines (Deprecated)"],"summary":"Iterate Custom Pipeline","description":"Iterate on an existing custom processor.\n\nProvides feedback to the agent which resumes from the previous session,\ncreating a new version of the processor parameters.","operationId":"iterate_custom_pipeline_api_v1_custom_pipelines__processor_id__iterate_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_iterate_custom_pipeline_api_v1_custom_pipelines__processor_id__iterate_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomProcessorInitialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_pipelines/{processor_id}/versions":{"get":{"tags":["Custom Pipelines (Deprecated)"],"summary":"List Pipeline Versions","description":"List all versions of a custom processor, ordered by version descending.","operationId":"list_pipeline_versions_api_v1_custom_pipelines__processor_id__versions_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessorVersionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_pipelines/{processor_id}/versions/{version}":{"get":{"tags":["Custom Pipelines (Deprecated)"],"summary":"Get Processor Version Detail","description":"Get detailed data for a specific processor version, including pipeline_params and eval_definition.","operationId":"get_processor_version_detail_api_v1_custom_pipelines__processor_id__versions__version__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"version","in":"path","required":true,"schema":{"type":"integer","title":"Version"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessorVersionDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_pipelines/{processor_id}/set_active":{"post":{"tags":["Custom Pipelines (Deprecated)"],"summary":"Set Active Pipeline Version","description":"Set the active version of a custom processor.\nChanges the active_version pointer to any existing version.","operationId":"set_active_pipeline_version_api_v1_custom_pipelines__processor_id__set_active_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_set_active_pipeline_version_api_v1_custom_pipelines__processor_id__set_active_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_pipelines/{processor_id}/pipelines":{"get":{"tags":["Custom Pipelines (Deprecated)"],"summary":"Get Pipelines Using Processor","description":"List pipelines (from the Pipeline table) that reference this custom processor\nin their steps JSON.","operationId":"get_pipelines_using_processor_api_v1_custom_pipelines__processor_id__pipelines_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelinesUsingProcessorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_pipelines/seed":{"post":{"tags":["Custom Pipelines (Deprecated)"],"summary":"Seed Custom Pipeline","description":"Directly create a completed custom processor from JSON. Admin-only.\n\nSkips the agent entirely -- useful for seeding test data, local development,\nand populating demos. The processor is immediately usable via POST /api/v1/marker.\n\nUSE WITH CAUTION","operationId":"seed_custom_pipeline_api_v1_custom_pipelines_seed_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeedPipelineRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeedPipelineResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_pipelines/{processor_id}/eval_definition":{"get":{"tags":["Custom Pipelines (Deprecated)"],"summary":"Get Pipeline Eval Definition","description":"Get the eval_definition from a custom processor's active version.","operationId":"get_pipeline_eval_definition_api_v1_custom_pipelines__processor_id__eval_definition_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Custom Pipelines (Deprecated)"],"summary":"Update Pipeline Eval Definition","description":"Update the eval_definition on a custom processor's active version.","operationId":"update_pipeline_eval_definition_api_v1_custom_pipelines__processor_id__eval_definition_put","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Eval Definition"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_pipelines/{processor_id}/eval_rubric":{"patch":{"tags":["Custom Pipelines (Deprecated)"],"summary":"Set Processor Eval Rubric","description":"Link or detach an EvalRubric on a custom processor.\n\nDUAL WRITE (mirrors the generation-agent flow in\ncustom_processors/tasks.py, where the version's eval_definition and the\nprocessor.eval_rubric_id back-link are always written together): the\nexecution engine reads ONLY the rubric copy embedded in the ACTIVE\nversion's eval_definition, so the back-link and that copy must move as one.\n\n- `{\"eval_rubric_id\": <id>}`: verifies the rubric exists on this team\n  (404) and isn't archived (400), then sets processor.eval_rubric_id AND\n  mirrors rubric.eval_definition into the active version. Requires a\n  completed active version (400 otherwise) — a link without the mirrored\n  copy would silently never score.\n- `{\"eval_rubric_id\": null}`: clears processor.eval_rubric_id AND the\n  active version's eval_definition. Tolerates a processor with no active\n  version (nothing to clear on the version side), so a dangling link is\n  always removable.","operationId":"set_processor_eval_rubric_api_v1_custom_pipelines__processor_id__eval_rubric_patch","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetProcessorEvalRubricRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_pipelines/{processor_id}/export":{"get":{"tags":["Custom Pipelines (Deprecated)"],"summary":"Export Custom Pipeline","description":"Export a custom processor with all versions. Admin-only.\n\nNote: This endpoint allows admins to export ANY processor across all teams,\nnot just processors belonging to the admin's team.\n\nReturns the full processor record and all version data, suitable for\nuse as training data or re-importing via the seed endpoint.","operationId":"export_custom_pipeline_api_v1_custom_pipelines__processor_id__export_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom_pipelines/describe":{"post":{"tags":["Custom Pipelines (Deprecated)"],"summary":"Describe Customizer","description":"Conversational endpoint for building a custom processor description.\nAccepts the chat history, returns the next assistant message.\nWhen the system has enough context, includes a proposed_description.","operationId":"describe_customizer_api_v1_custom_pipelines_describe_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomizerDescribeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomizerDescribeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pipeline_templates":{"get":{"tags":["Pipeline Templates (Deprecated)"],"summary":"List Templates","description":"List all published pipeline templates.","operationId":"list_templates_api_v1_pipeline_templates_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Pipeline Templates (Deprecated)"],"summary":"Promote To Template","description":"Create a template by copying an existing completed processor. Admin-only.\n\nCreates an independent copy so the admin can iterate on the source processor\nwithout affecting the template. Only the active version is copied, and\nagent session/checkpoint data is stripped so cloned copies don't share\nClaude sessions.","operationId":"promote_to_template_api_v1_pipeline_templates_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_promote_to_template_api_v1_pipeline_templates_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pipeline_templates/{slug}":{"get":{"tags":["Pipeline Templates (Deprecated)"],"summary":"Get Template","description":"Get detailed info for a pipeline template.","operationId":"get_template_api_v1_pipeline_templates__slug__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Pipeline Templates (Deprecated)"],"summary":"Update Template","description":"Update template metadata. Admin-only.","operationId":"update_template_api_v1_pipeline_templates__slug__put","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_update_template_api_v1_pipeline_templates__slug__put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Pipeline Templates (Deprecated)"],"summary":"Remove Template","description":"Un-template a pipeline (sets is_template=False). Admin-only.","operationId":"remove_template_api_v1_pipeline_templates__slug__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pipeline_templates/{slug}/examples/{filename}":{"get":{"tags":["Pipeline Templates (Deprecated)"],"summary":"Download Template Example","description":"Fetch example file from R2 and return content directly.","operationId":"download_template_example_api_v1_pipeline_templates__slug__examples__filename__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Pipeline Templates (Deprecated)"],"summary":"Remove Template Example","description":"Remove an example file from a template. Admin-only.","operationId":"remove_template_example_api_v1_pipeline_templates__slug__examples__filename__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pipeline_templates/{slug}/examples/{filename}/thumbnail":{"get":{"tags":["Pipeline Templates (Deprecated)"],"summary":"Download Template Example Thumbnail","description":"Stream thumbnail image for an example file.","operationId":"download_template_example_thumbnail_api_v1_pipeline_templates__slug__examples__filename__thumbnail_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pipeline_templates/{slug}/clone":{"post":{"tags":["Pipeline Templates (Deprecated)"],"summary":"Clone Template","description":"Clone a template to the user's team as a new custom processor.","operationId":"clone_template_api_v1_pipeline_templates__slug__clone_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateCloneResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pipeline_templates/{slug}/examples":{"post":{"tags":["Pipeline Templates (Deprecated)"],"summary":"Add Template Examples","description":"Upload example files for a template. Admin-only.","operationId":"add_template_examples_api_v1_pipeline_templates__slug__examples_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_add_template_examples_api_v1_pipeline_templates__slug__examples_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/upload":{"post":{"tags":["files"],"summary":"Request Upload Url","description":"Request a presigned upload URL for direct client-side upload to storage.\n\nThis is the recommended upload flow:\n1. Client calls this endpoint with filename and content_type\n2. Backend creates a pending file record and returns presigned PUT URL\n3. Client uploads directly to storage using the presigned URL\n4. Client calls /confirm to verify upload and get actual file size","operationId":"request_upload_url_api_v1_files_upload_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestUploadUrlRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestUploadUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/{file_id_or_hashid}/confirm":{"get":{"tags":["files"],"summary":"Confirm Upload","description":"Confirm that a file was successfully uploaded to storage.\n\nCall this endpoint after successfully uploading a file using the presigned URL\nfrom /upload. This will verify the file exists, get the actual file size,\nand mark it as completed.\n\nAccepts either integer file_id (e.g., \"4\") or hashid (e.g., \"npl94jxy\").\n\nThis makes the file available for use in workflows.","operationId":"confirm_upload_api_v1_files__file_id_or_hashid__confirm_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"file_id_or_hashid","in":"path","required":true,"schema":{"type":"string","title":"File Id Or Hashid"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/{file_id}":{"get":{"tags":["files"],"summary":"Get File Metadata","description":"Get metadata for an uploaded file.\n\nReturns file information including size, content type, and upload timestamp.","operationId":"get_file_metadata_api_v1_files__file_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"integer","title":"File Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileMetadataResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["files"],"summary":"Delete File","description":"Delete an uploaded file.\n\nRemoves the file from both storage and the database.","operationId":"delete_file_api_v1_files__file_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"integer","title":"File Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteFileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/{file_id}/download":{"get":{"tags":["files"],"summary":"Get File Download Url","description":"Generate presigned URL for downloading a file.\n\nThe URL is valid for the specified expiry time (default: 1 hour).\n\nArgs:\n    file_id: File ID\n    expires_in: URL expiry time in seconds (default: 3600, max: 86400)","operationId":"get_file_download_url_api_v1_files__file_id__download_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"integer","title":"File Id"}},{"name":"expires_in","in":"query","required":false,"schema":{"type":"integer","default":3600,"title":"Expires In"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileDownloadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files":{"get":{"tags":["files"],"summary":"List Files","description":"List all uploaded files for the team.\n\nSupports pagination with limit and offset parameters.\n\nArgs:\n    limit: Maximum number of files to return (default: 50, max: 100)\n    offset: Number of files to skip (default: 0)","operationId":"list_files_api_v1_files_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFilesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval_rubrics":{"post":{"tags":["eval_rubrics"],"summary":"Create Eval Rubric","description":"Create new eval rubric for the team.","operationId":"create_eval_rubric_api_v1_eval_rubrics_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEvalRubricRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalRubricResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["eval_rubrics"],"summary":"List Eval Rubrics","description":"List eval rubrics for the team.","operationId":"list_eval_rubrics_api_v1_eval_rubrics_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalRubricListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval_rubrics/{rubric_id}":{"get":{"tags":["eval_rubrics"],"summary":"Get Eval Rubric","description":"Get eval rubric by ID.","operationId":"get_eval_rubric_api_v1_eval_rubrics__rubric_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"rubric_id","in":"path","required":true,"schema":{"type":"integer","title":"Rubric Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalRubricResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["eval_rubrics"],"summary":"Update Eval Rubric","description":"Update eval rubric.","operationId":"update_eval_rubric_api_v1_eval_rubrics__rubric_id__put","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"rubric_id","in":"path","required":true,"schema":{"type":"integer","title":"Rubric Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEvalRubricRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalRubricResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["eval_rubrics"],"summary":"Delete Eval Rubric","description":"Soft-delete (archive) eval rubric.","operationId":"delete_eval_rubric_api_v1_eval_rubrics__rubric_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"rubric_id","in":"path","required":true,"schema":{"type":"integer","title":"Rubric Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalRubricResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval_rubrics/import_from_pipeline":{"post":{"tags":["eval_rubrics"],"summary":"Import From Pipeline","description":"Import eval_definition from a custom pipeline's active version.","operationId":"import_from_pipeline_api_v1_eval_rubrics_import_from_pipeline_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportFromPipelineRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalRubricResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval_rubrics/from_feedback":{"post":{"tags":["eval_rubrics"],"summary":"Create From Feedback","description":"Convert user feedback items into structured eval rubric using LLM rewrite.","operationId":"create_from_feedback_api_v1_eval_rubrics_from_feedback_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRubricFromFeedbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalRubricResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval_rubrics/generate_from_feedback":{"post":{"tags":["eval_rubrics"],"summary":"Generate From Feedback","description":"Generate eval rubric from feedback items using LLM rewrite (no DB save).","operationId":"generate_from_feedback_api_v1_eval_rubrics_generate_from_feedback_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateFromFeedbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateFromFeedbackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval_rubrics/generate_from_description":{"post":{"tags":["eval_rubrics"],"summary":"Generate From Description","description":"Generate a draft eval rubric from a plain-language quality description (no DB save).","operationId":"generate_from_description_api_v1_eval_rubrics_generate_from_description_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateFromDescriptionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateFromDescriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections":{"post":{"tags":["collections"],"summary":"Create Collection","description":"Create a new collection.","operationId":"create_collection_api_v1_collections_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCollectionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["collections"],"summary":"List Collections","description":"List collections for the team.","operationId":"list_collections_api_v1_collections_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/s3-statuses":{"get":{"tags":["collections"],"summary":"List Collection S3 Statuses","description":"List minimal S3 status for collection rows without source configuration.","operationId":"list_collection_s3_statuses_api_v1_collections_s3_statuses_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionS3StatusesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/{collection_id}":{"get":{"tags":["collections"],"summary":"Get Collection","description":"Get collection summary and S3 sync status.","operationId":"get_collection_api_v1_collections__collection_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"integer","title":"Collection Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["collections"],"summary":"Update Collection","description":"Update collection name/description.","operationId":"update_collection_api_v1_collections__collection_id__put","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"integer","title":"Collection Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCollectionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["collections"],"summary":"Delete Collection","description":"Soft-delete (archive) collection.","operationId":"delete_collection_api_v1_collections__collection_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"integer","title":"Collection Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/{collection_id}/s3-source":{"get":{"tags":["collections"],"summary":"Get Collection S3 Source","description":"Get redacted S3 source configuration and sync status for a collection.","operationId":"get_collection_s3_source_api_v1_collections__collection_id__s3_source_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"integer","title":"Collection Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CollectionS3SourceResponse"},{"type":"null"}],"title":"Response Get Collection S3 Source Api V1 Collections  Collection Id  S3 Source Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["collections"],"summary":"Upsert Collection S3 Source","description":"Create or update a collection's S3 source and enqueue a sync.","operationId":"upsert_collection_s3_source_api_v1_collections__collection_id__s3_source_put","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"integer","title":"Collection Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertCollectionS3SourceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionS3SourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["collections"],"summary":"Delete Collection S3 Source","description":"Disconnect a collection's S3 source and remove its synthetic file rows.","operationId":"delete_collection_s3_source_api_v1_collections__collection_id__s3_source_delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"integer","title":"Collection Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/{collection_id}/s3-source/output":{"put":{"tags":["collections"],"summary":"Upsert Collection S3 Output","description":"Create or update a collection's S3 output writeback destination.","operationId":"upsert_collection_s3_output_api_v1_collections__collection_id__s3_source_output_put","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"integer","title":"Collection Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertCollectionS3OutputRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionS3SourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["collections"],"summary":"Delete Collection S3 Output","description":"Disable a collection's S3 output writeback destination.","operationId":"delete_collection_s3_output_api_v1_collections__collection_id__s3_source_output_delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"integer","title":"Collection Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionS3SourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/{collection_id}/s3-source/output/writeback":{"post":{"tags":["collections"],"summary":"Trigger Collection S3 Writeback","description":"Enqueue S3 output writeback for the latest completed batch run.","operationId":"trigger_collection_s3_writeback_api_v1_collections__collection_id__s3_source_output_writeback_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"integer","title":"Collection Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionS3SourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/{collection_id}/s3-source/sync":{"post":{"tags":["collections"],"summary":"Trigger Collection S3 Sync","description":"Enqueue a resync for an existing collection S3 source.","operationId":"trigger_collection_s3_sync_api_v1_collections__collection_id__s3_source_sync_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"integer","title":"Collection Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionS3SourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/{collection_id}/files":{"get":{"tags":["collections"],"summary":"List Collection Files","description":"List collection files with cursor pagination.","operationId":"list_collection_files_api_v1_collections__collection_id__files_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"integer","title":"Collection Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionFilesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["collections"],"summary":"Add Files To Collection","description":"Link existing uploaded files to a collection.","operationId":"add_files_to_collection_api_v1_collections__collection_id__files_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"integer","title":"Collection Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddFilesToCollectionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/{collection_id}/files/{uploaded_file_id}":{"delete":{"tags":["collections"],"summary":"Remove File From Collection","description":"Unlink a file from a collection (does NOT delete the uploaded file).","operationId":"remove_file_from_collection_api_v1_collections__collection_id__files__uploaded_file_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"integer","title":"Collection Id"}},{"name":"uploaded_file_id","in":"path","required":true,"schema":{"type":"integer","title":"Uploaded File Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval_batch_runs":{"post":{"tags":["collections"],"summary":"Start Batch Run","description":"Start a batch evaluation run on all files in the collection.","operationId":"start_batch_run_api_v1_eval_batch_runs_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartBatchRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalBatchRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["collections"],"summary":"List Batch Runs","description":"List batch runs for the team, optionally filtered by collection, eval rubric, and/or pipeline.","operationId":"list_batch_runs_api_v1_eval_batch_runs_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"collection_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Collection Id"}},{"name":"eval_rubric_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Eval Rubric Id"}},{"name":"pipeline_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalBatchRunListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval_results/trend":{"get":{"tags":["collections"],"summary":"Get Eval Results Trend","description":"Eval score trend from the evalresult fact table — one series per\n(source step, rubric), one point per scored execution, across EVERY\npath that scores (workspace runs, API runs with run_evals, batch runs,\nand later policy sampling).\n\npl_-prefixed targets chart the pipeline's executions; anything else\ncharts the custom processor's. Both hit their composite index\n((team, pipeline|processor, created)). Capped at 5000 rows per window;\ntotal_points reports the pre-group count so callers can see truncation.\n\nCached in Redis DB 3 for 5 minutes per (team, target, window).","operationId":"get_eval_results_trend_api_v1_eval_results_trend_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"target_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"pl_ pipeline id or custom-processor id to chart","title":"Target Id"},"description":"pl_ pipeline id or custom-processor id to chart"},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"Trailing window in days","default":90,"title":"Days"},"description":"Trailing window in days"},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalResultTrendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval_batch_runs/{run_id}":{"get":{"tags":["collections"],"summary":"Get Batch Run","description":"Get batch run status and progress.","operationId":"get_batch_run_api_v1_eval_batch_runs__run_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"integer","title":"Run Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalBatchRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval_batch_runs/{run_id}/results":{"get":{"tags":["collections"],"summary":"Get Batch Run Results","description":"Get per-file results for a batch run.","operationId":"get_batch_run_results_api_v1_eval_batch_runs__run_id__results_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"integer","title":"Run Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchRunResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pipelines":{"post":{"tags":["pipelines"],"summary":"Create Pipeline","description":"Create a new pipeline for the team.\n\nWith reuse_draft=true this is find-or-create: the team's most recent\nunsaved, unarchived pipeline with an identical ordered step-TYPE chain\n(types only — configs are not compared) is reused instead of minting a\nduplicate. The reused draft's steps are overwritten with the request's\nsteps and the response carries reused=true. Saved pipelines are never\nreused.","operationId":"create_pipeline_api_v1_pipelines_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePipelineRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["pipelines"],"summary":"List Pipelines","description":"List pipelines for the team.","operationId":"list_pipelines_api_v1_pipelines_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"saved_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Saved Only"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pipelines/executions/{execution_id}":{"get":{"tags":["pipelines"],"summary":"Get Pipeline Execution","description":"Poll execution status. Returns per-step status with lookup keys for partial results.\n\nDecision rule: Check PG PipelineExecution.status first.\n- If terminal (completed/failed): return from PostgreSQL (post-sync, complete data)\n- If running/pending: read Firestore for real-time step status","operationId":"get_pipeline_execution_api_v1_pipelines_executions__execution_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"execution_id","in":"path","required":true,"schema":{"type":"string","title":"Execution Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineExecutionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pipelines/executions/{execution_id}/steps/{step_index}/result":{"get":{"tags":["pipelines"],"summary":"Get Step Result","description":"Fetch intermediate result for a specific pipeline execution step.","operationId":"get_step_result_api_v1_pipelines_executions__execution_id__steps__step_index__result_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"execution_id","in":"path","required":true,"schema":{"type":"string","title":"Execution Id"}},{"name":"step_index","in":"path","required":true,"schema":{"type":"integer","title":"Step Index"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pipelines/{pipeline_id}":{"get":{"tags":["pipelines"],"summary":"Get Pipeline","description":"Get pipeline by pipeline_id.","operationId":"get_pipeline_api_v1_pipelines__pipeline_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"string","title":"Pipeline Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["pipelines"],"summary":"Update Pipeline","description":"Update pipeline steps. This is the auto-save path.","operationId":"update_pipeline_api_v1_pipelines__pipeline_id__put","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"string","title":"Pipeline Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePipelineRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pipelines/{pipeline_id}/save":{"put":{"tags":["pipelines"],"summary":"Save Pipeline","description":"Name and promote a pipeline to saved status.","operationId":"save_pipeline_api_v1_pipelines__pipeline_id__save_put","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"string","title":"Pipeline Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavePipelineRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pipelines/{pipeline_id}/archive":{"post":{"tags":["pipelines"],"summary":"Archive Pipeline","description":"Archive a pipeline, hiding it from the default list.","operationId":"archive_pipeline_api_v1_pipelines__pipeline_id__archive_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"string","title":"Pipeline Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pipelines/{pipeline_id}/unarchive":{"post":{"tags":["pipelines"],"summary":"Unarchive Pipeline","description":"Unarchive a pipeline, restoring it to the default list.","operationId":"unarchive_pipeline_api_v1_pipelines__pipeline_id__unarchive_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"string","title":"Pipeline Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pipelines/{pipeline_id}/versions":{"post":{"tags":["pipelines"],"summary":"Create Pipeline Version","description":"Create a new version snapshot of the pipeline's current steps.","operationId":"create_pipeline_version_api_v1_pipelines__pipeline_id__versions_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"string","title":"Pipeline Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePipelineVersionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineVersionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["pipelines"],"summary":"List Pipeline Versions","description":"List all versions of a pipeline, newest first.","operationId":"list_pipeline_versions_api_v1_pipelines__pipeline_id__versions_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"string","title":"Pipeline Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineVersionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pipelines/{pipeline_id}/discard":{"post":{"tags":["pipelines"],"summary":"Discard Draft","description":"Discard draft changes and reset Pipeline.steps to a published version's steps.","operationId":"discard_draft_api_v1_pipelines__pipeline_id__discard_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"string","title":"Pipeline Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscardDraftRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pipelines/{pipeline_id}/rate":{"get":{"tags":["pipelines"],"summary":"Get Pipeline Rate","description":"Get the pipeline rate based on plan and effective processing region.","operationId":"get_pipeline_rate_api_v1_pipelines__pipeline_id__rate_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"string","title":"Pipeline Id"}},{"name":"processing_location","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional residency region override (e.g. us, eu). When provided, use file_url or direct-upload; multipart uploads are rejected. When omitted, the request uses the team's configured residency and profile.","title":"Processing Location"},"description":"Optional residency region override (e.g. us, eu). When provided, use file_url or direct-upload; multipart uploads are rejected. When omitted, the request uses the team's configured residency and profile."},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pipelines/quote":{"post":{"tags":["pipelines"],"summary":"Quote Parse Config","description":"Quote an AD-HOC convert config (no saved pipeline) — the authenticated\nplayground's run receipt (F1 of the config-panel work).\n\nPrices the single-convert blueprint the playground config maps to through\nthe SAME machinery GET /{pipeline_id}/rate uses, so the quote carries the\nteam's real personal rates (plan, EU regional modifier, legacy convert\nholds, per-team overrides) instead of the frontend's hand-synced\n\"standard rate\" mirror. Response envelope == /rate\n({rate_per_1000_pages_cents, rate_breakdown}) so the receipt consumes it\nunchanged:\n\n  - 2026-regime teams (everyone but the classic-pinned grandfathers) get\n    the additive headline + the D7b ``line_items`` itemization — one\n    \"step\" line for the convert base, one \"addon\" line per priced extra\n    (track_changes framed as a convert ADD-ON, never a standalone quote —\n    the framing law), and one \"eval\" line when ``eval`` is set\n    (``eval_rubric_id`` is null: the flag prices the eval PASS, not a\n    specific rubric). As on /rate, eval never moves the headline.\n  - classic-pinned teams get the classic convert rate as the step line\n    with NO ``line_items`` — mirroring /rate byte-for-byte, so the\n    receipt falls back to its hedged mirror rates for add-ons.\n\nCheap by design (hence no extra rate limit — the router has none): no\npipeline row is read or written; the only DB reads are the team +\nsubscription lookups every /rate call already performs.","operationId":"quote_parse_config_api_v1_pipelines_quote_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processing_location","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional residency region override (e.g. us, eu). When provided, use file_url or direct-upload; multipart uploads are rejected. When omitted, the request uses the team's configured residency and profile.","title":"Processing Location"},"description":"Optional residency region override (e.g. us, eu). When provided, use file_url or direct-upload; multipart uploads are rejected. When omitted, the request uses the team's configured residency and profile."},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteParseConfigRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pipelines/{pipeline_id}/run":{"post":{"tags":["pipelines"],"summary":"Run Pipeline","description":"Execute a pipeline on a file, creating an execution DAG with per-step tracking and billing.","operationId":"run_pipeline_api_v1_pipelines__pipeline_id__run_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"string","title":"Pipeline Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_run_pipeline_api_v1_pipelines__pipeline_id__run_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineExecutionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pipelines/{pipeline_id}/executions":{"get":{"tags":["pipelines"],"summary":"List Pipeline Executions","description":"List recent executions for a pipeline.","operationId":"list_pipeline_executions_api_v1_pipelines__pipeline_id__executions_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"string","title":"Pipeline Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineExecutionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent-studio/processors":{"get":{"tags":["agent-studio"],"summary":"List Processors","description":"Platform processors + the team's own, with latest version, run counts\n(split by plane), the windowed pass_rate, and the caller's proactive\n``design_access`` capability flag (closed-beta allowlist).\n\nRun/flag counts are the CALLER team's (platform processors are shared\ndefinitions; their activity is always per-team).","operationId":"list_processors_api_v1_agent_studio_processors_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessorListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent-studio/processors/{processor_id}":{"get":{"tags":["agent-studio"],"summary":"Get Processor","description":"One processor with its full version history (oldest first).","operationId":"get_processor_api_v1_agent_studio_processors__processor_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessorDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["agent-studio"],"summary":"Rename Processor","description":"Rename a TEAM processor (W5 naming): ``{\"name\": str}`` is the whole\nbody — the name is the only mutable field (drafts and published versions\nalike; version contracts are untouched).\n\nVisibility follows ``get_processor`` with one tightening: PLATFORM\nprocessors (team_id NULL) are visible to every team but never renamable —\nthey answer 404 (not 403), indistinguishable from another team's\nprocessor. Returns the refreshed detail shape.","operationId":"rename_processor_api_v1_agent_studio_processors__processor_id__patch","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessorRenameRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessorDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent-studio/processors/{processor_id}/runs":{"get":{"tags":["agent-studio"],"summary":"List Processor Runs","description":"The team's runs of this processor, newest first (version-groupable:\neach run carries its pinned version label; plane-filterable).","operationId":"list_processor_runs_api_v1_agent_studio_processors__processor_id__runs_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter to one version label, e.g. '1.0'.","title":"Version"},"description":"Filter to one version label, e.g. '1.0'."},{"name":"plane","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(design|execution)$"},{"type":"null"}],"description":"Filter to one plane (design | execution); default both.","title":"Plane"},"description":"Filter to one plane (design | execution); default both."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["agent-studio"],"summary":"Launch Processor Run","description":"Launch an execution-plane run of this processor's newest PUBLISHED\nversion over an uploaded document — the processor page's \"New run\".\n\nIntake is the shared A7 path (``intake.stage_agent_doc``: accept-list,\noffice→PDF staging, spreadsheets natively onto the sheet path); the\nstaged file rides the uploaded-files machinery and ``launch_run``\nresolves it via the ``datalab://file-{id}`` convention. 409 when nothing\nis published (drafts are a design-session concern). Returns the run\nsummary — poll ``GET /runs/{id}`` for progress.","operationId":"launch_processor_run_api_v1_agent_studio_processors__processor_id__runs_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_launch_processor_run_api_v1_agent_studio_processors__processor_id__runs_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent-studio/runs/{run_id}":{"get":{"tags":["agent-studio"],"summary":"Get Run","description":"RunCard-shaped detail: status, scorecard, check results with locators,\nerror kind/message.","operationId":"get_run_api_v1_agent_studio_runs__run_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"integer","title":"Run Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent-studio/runs/{run_id}/review":{"get":{"tags":["agent-studio"],"summary":"Get Run Review","description":"The full-review manifest (plan A5): source pages via the EXISTING\nthumbnail endpoint, the per-shape result payloads (INLINE from the run's own\nstored result — no artifact or intermediates listing, so no workspace path\nreaches a client), and the projected trace.","operationId":"get_run_review_api_v1_agent_studio_runs__run_id__review_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"integer","title":"Run Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewManifestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent-studio/runs/{run_id}/tail":{"get":{"tags":["agent-studio"],"summary":"Tail Run Trace","description":"Live-tail (plan A6): projected trace steps appended since ``cursor``.\nCheap polling — one ranged R2 read per call against the mid-run mirrored\ntrace object; ``done`` flips when the run row is terminal (keep polling\nuntil done AND an empty batch, so the final flush is never missed).","operationId":"tail_run_trace_api_v1_agent_studio_runs__run_id__tail_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"integer","title":"Run Id"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Byte cursor into the trace.","default":0,"title":"Cursor"},"description":"Byte cursor into the trace."},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceTailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent-studio/runs/{run_id}/files/{path}":{"get":{"tags":["agent-studio"],"summary":"Get Run File","description":"Authenticated proxy for the ONE lazily-loaded piece of the review:\nspilled sheet-block HTML.\n\nThe review is otherwise fully inline — deliverables ride out in the run\nresult and the manifest lists no workspace files at all, so a customer\nnever sees a storage path or gets a handle on the workspace. The single\nexception is a sheet block whose HTML exceeded the manifest's inline cap\n(``SHEET_BLOCK_HTML_INLINE_MAX``, 200KB) and was spilled to\n``run/document/sheets/{sheet}/{block}.html``; the sheet pane fetches those\non demand, which is exactly why they were spilled. Anything else under the\nworkspace — the staged document, intermediates, output artifacts, the raw\n``trace/trace.jsonl`` (full message arrays, MISSION text), ``result.json``\n— is a backend input and is NOT servable here.","operationId":"get_run_file_api_v1_agent_studio_runs__run_id__files__path__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"integer","title":"Run Id"}},{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent-studio/flags":{"post":{"tags":["agent-studio"],"summary":"Create Flag","description":"Flag a run finding (run review / drawer). The locator is validated\nagainst the spec §3 grammar; surface.number is 0-indexed here.\n\nDesign-plane linkage (frontend audit finding 1): flagging a run OWNED BY A\nLIVE design session is a design-plane input — the flag row and a user\n``activity`` event land in ONE transaction (the ingest job_completed\npattern) and the tick is enqueued after commit, so the brain sees the flag\non its next turn. Execution-plane flags (no session) stay row-only, and so\ndo flags on terminal (published/archived) sessions — a frozen session's\ntranscript never grows and its brain never wakes; the row still feeds the\nreview queue and rides a future reopen (R6).","operationId":"create_flag_api_v1_agent_studio_flags_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlagCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlagResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["agent-studio"],"summary":"List Flags","description":"The team's flags, newest first; optionally scoped to one processor.","operationId":"list_flags_api_v1_agent_studio_flags_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"processor_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by public processor id (slug).","title":"Processor Id"},"description":"Filter by public processor id (slug)."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(open|resolved)$"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlagListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent-studio/sessions":{"post":{"tags":["agent-studio"],"summary":"Create Session","description":"Start a design session: from a template, reopened on a processor\n(optionally seeded with a flag's context — R6), or BLANK when neither is\ngiven — an empty draft the brain grounds from the first message/doc.","operationId":"create_session_api_v1_agent_studio_sessions_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionSnapshotResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["agent-studio"],"summary":"List Sessions","description":"The team's design sessions, newest first.","operationId":"list_sessions_api_v1_agent_studio_sessions_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent-studio/sessions/{session_id}/snapshot":{"get":{"tags":["agent-studio"],"summary":"Get Session Snapshot","description":"The whole session view-model in one poll: state (draft, pending, docs,\nversions, jobs) + the events past the cursor.","operationId":"get_session_snapshot_api_v1_agent_studio_sessions__session_id__snapshot_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}},{"name":"since_seq","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Return events with seq > since_seq (poll cursor).","default":0,"title":"Since Seq"},"description":"Return events with seq > since_seq (poll cursor)."},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionSnapshotResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent-studio/sessions/{session_id}/message":{"post":{"tags":["agent-studio"],"summary":"Post Message","description":"Append a user message and tick the brain.\n\nSemantics pinned from plan §4a: plain free text while a QUESTION is\npending answers it (R2); a message carrying resolved @-mentions is an\nINTROSPECTION query — it never consumes the pending card and is answered\nfrom state by the brain.","operationId":"post_message_api_v1_agent_studio_sessions__session_id__message_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionEventResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent-studio/sessions/{session_id}/answer":{"post":{"tags":["agent-studio"],"summary":"Post Answer","description":"Answer the pending question (option pick or free text).","operationId":"post_answer_api_v1_agent_studio_sessions__session_id__answer_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionAnswerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionEventResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent-studio/sessions/{session_id}/diff/accept":{"post":{"tags":["agent-studio"],"summary":"Accept Diff","description":"Apply the pending proposal to the draft. Stale ids are idempotent\nno-ops with a gentle note (S3).","operationId":"accept_diff_api_v1_agent_studio_sessions__session_id__diff_accept_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiffDecisionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiffDecisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent-studio/sessions/{session_id}/diff/reject":{"post":{"tags":["agent-studio"],"summary":"Reject Diff","description":"Clear the pending proposal without applying it.","operationId":"reject_diff_api_v1_agent_studio_sessions__session_id__diff_reject_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiffDecisionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiffDecisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent-studio/sessions/{session_id}/draft":{"post":{"tags":["agent-studio"],"summary":"Edit Draft","description":"Direct draft edit (frontend editGoal/editRule/editSchema/\ntoggleCheckBlocking — S2): applies immediately, appends a user\n``artifact_edit`` event, and ticks the brain. It NEVER consumes the\npending question/diff card — direct edits and card decisions are\nindependent.","operationId":"edit_draft_api_v1_agent_studio_sessions__session_id__draft_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftEditResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent-studio/sessions/{session_id}/commit":{"post":{"tags":["agent-studio"],"summary":"Commit Session","description":"Snapshot the draft into a committed 0.x version and re-exercise the\nreference set against it. (Versions are normally agent-managed — the\nbrain commits via its own action; this is the direct path.)","operationId":"commit_session_api_v1_agent_studio_sessions__session_id__commit_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent-studio/sessions/{session_id}/publish":{"post":{"tags":["agent-studio"],"summary":"Publish Session","description":"Promote the latest committed version to published (1.x) and return\nthe API address. Gated on the green board (no in-flight or failing runs\npinned to the candidate).","operationId":"publish_session_api_v1_agent_studio_sessions__session_id__publish_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent-studio/sessions/{session_id}/docs":{"post":{"tags":["agent-studio"],"summary":"Upload Docs","description":"Attach reference documents to the session, reusing the /agent intake\nvalidation (PDF/image direct; office/HTML/EPUB staged to PDF at upload\nwhen LibreOffice is available — otherwise the run-time pipeline converts;\nspreadsheets stored NATIVELY on the sheet path — doc_kind='sheet',\npage_count counts sheets). This route ADDITIONALLY accepts ``.md/.txt``\ntext files (D1 doc roles): stored as role-LOCKED context docs\n(doc_kind='text') with an upload-time excerpt — never launched, their\ncontent feeds the design agent's context. Stored through the\nuploaded-files machinery (the shared ``intake.stage_agent_doc`` path —\nthe processor page's new-run upload uses the same helper WITHOUT the\ntext widening); the doc_key is the ``file-{id}`` reference launch_run\nresolves.","operationId":"upload_docs_api_v1_agent_studio_sessions__session_id__docs_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_docs_api_v1_agent_studio_sessions__session_id__docs_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent-studio/sessions/{session_id}/docs/{doc_id}":{"patch":{"tags":["agent-studio"],"summary":"Set Doc Role","description":"Flip one reference doc between 'process' and 'context' (D1 doc roles\n— the chip toggle). Text docs are role-LOCKED to context (400). A\nsame-role PATCH is an idempotent no-op (200, no event). A real flip\nappends a USER-actor activity event (consumable — the brain learns and\nreacts) and ticks the session. Flipping to context does NOT cancel\nin-flight runs — runs pin their inputs at launch (chronology honesty).","operationId":"set_doc_role_api_v1_agent_studio_sessions__session_id__docs__doc_id__patch","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}},{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceDocResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/extraction_schemas":{"post":{"tags":["extraction_schemas"],"summary":"Create Extraction Schema","description":"Create a new extraction schema for the team.","operationId":"create_extraction_schema_api_v1_extraction_schemas_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExtractionSchemaRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionSchemaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["extraction_schemas"],"summary":"List Extraction Schemas","description":"List extraction schemas for the team.","operationId":"list_extraction_schemas_api_v1_extraction_schemas_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionSchemaListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/extraction_schemas/{schema_id}":{"get":{"tags":["extraction_schemas"],"summary":"Get Extraction Schema","description":"Get extraction schema by ID.","operationId":"get_extraction_schema_api_v1_extraction_schemas__schema_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"schema_id","in":"path","required":true,"schema":{"type":"string","title":"Schema Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionSchemaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["extraction_schemas"],"summary":"Update Extraction Schema","description":"Update extraction schema. Optionally create a new version.","operationId":"update_extraction_schema_api_v1_extraction_schemas__schema_id__put","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"schema_id","in":"path","required":true,"schema":{"type":"string","title":"Schema Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateExtractionSchemaRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionSchemaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["extraction_schemas"],"summary":"Delete Extraction Schema","description":"Soft-delete (archive) extraction schema.","operationId":"delete_extraction_schema_api_v1_extraction_schemas__schema_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"schema_id","in":"path","required":true,"schema":{"type":"string","title":"Schema Id"}},{"name":"wos-session","in":"cookie","required":false,"schema":{"type":"string","title":"Wos-Session"}},{"name":"datalab_active_team","in":"cookie","required":false,"schema":{"type":"string","title":"Datalab Active Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionSchemaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AddFilesToCollectionRequest":{"properties":{"uploaded_file_ids":{"items":{"type":"integer"},"type":"array","maxItems":100,"minItems":1,"title":"Uploaded File Ids"}},"type":"object","required":["uploaded_file_ids"],"title":"AddFilesToCollectionRequest"},"BatchRunFileResult":{"properties":{"request_id":{"type":"integer","title":"Request Id"},"filename":{"type":"string","title":"Filename"},"status":{"type":"string","title":"Status"},"eval_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Eval Score"},"eval_results":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Eval Results"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"lookup_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lookup Key"}},"type":"object","required":["request_id","filename","status"],"title":"BatchRunFileResult"},"BatchRunResultsResponse":{"properties":{"batch_run":{"$ref":"#/components/schemas/EvalBatchRunResponse"},"file_results":{"items":{"$ref":"#/components/schemas/BatchRunFileResult"},"type":"array","title":"File Results"}},"type":"object","required":["batch_run","file_results"],"title":"BatchRunResultsResponse"},"Body_add_template_examples_api_v1_pipeline_templates__slug__examples_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files","description":"Example files to upload"}},"type":"object","required":["files"],"title":"Body_add_template_examples_api_v1_pipeline_templates__slug__examples_post"},"Body_add_template_examples_api_v1_processor_templates__slug__examples_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files","description":"Example files to upload"}},"type":"object","required":["files"],"title":"Body_add_template_examples_api_v1_processor_templates__slug__examples_post"},"Body_convert_api_v1_convert_post":{"properties":{"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url","description":"Optional file URL (http/https). If provided, the server will download and process it."},"mode":{"type":"string","title":"Mode","description":"Which output mode to use. Valid values: 'fast' (lowest latency), 'balanced' (balanced accuracy and latency), 'accurate' (highest accuracy).","default":"fast","choices":["fast","balanced","accurate"],"dashboard":{"description":"Processing mode balancing speed and accuracy."}},"max_pages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Pages","description":"The maximum number of pages in the document to convert."},"page_range":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Range","description":"The page range to convert, comma separated like 0,5-10,20. Overrides max_pages if provided.","dashboard":{"description":"Comma-separated page ranges to process, e.g. '0-2,4'. Leave empty for all pages."}},"merge_cross_page":{"type":"boolean","title":"Merge Cross Page","description":"Merge content that is split across pages back into single logical blocks: tables (long tables continued vertically, and wide tables printed as per-page column panels), paragraphs broken mid-sentence, and lists continued on the next page (continuation items keep the indent level of the list they belong to). Merged blocks carry a data-merged-pages attribute listing their source pages. Billed as a compute surcharge on the measured merge cost, like agent extraction.","default":false,"dashboard":{"description":"Beta. Merge tables, paragraphs, and lists split across pages into single logical blocks. Bills a variable compute surcharge based on the measured merge cost — generally around $0.50 per document — and applies on every run of this pipeline."}},"paginate":{"type":"boolean","title":"Paginate","description":"Whether to paginate the output. Each page will be separated by a horizontal rule with the page number.","default":false,"dashboard":{"description":"Separate output by page with horizontal rules."}},"add_block_ids":{"type":"boolean","title":"Add Block Ids","description":"Add data-block-id attributes to HTML elements for citation tracking. Only applies when output_format includes 'html'.","default":false},"include_markdown_in_chunks":{"type":"boolean","title":"Include Markdown In Chunks","description":"Include markdown field in chunks and JSON output.","default":false},"disable_image_extraction":{"type":"boolean","title":"Disable Image Extraction","description":"Disable image extraction from the document.","default":false,"dashboard":{}},"disable_image_captions":{"type":"boolean","title":"Disable Image Captions","description":"Disable synthetic image captions/descriptions in output.","default":false,"dashboard":{}},"word_bboxes":{"type":"boolean","title":"Word Bboxes","description":"When enabled, predict per-word bounding boxes with confidence scores for each page. Each word is inlined into the HTML output as a span carrying data-bbox and data-confidence attributes (markdown output strips these).","default":false},"fence_synthetic_captions":{"type":"boolean","title":"Fence Synthetic Captions","description":"Wrap synthetic image captions with HTML comment markers for easy identification/removal.","default":false},"output_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Format","description":"The output format. Can be 'json', 'html', 'markdown', or 'chunks'. Defaults to 'markdown'. Comma separate multiple formats.","dashboard":{"choices":["markdown","html","json","chunks"],"description":"Output format for the converted document.","type":"select"}},"token_efficient_markdown":{"type":"boolean","title":"Token Efficient Markdown","description":"Optimize markdown for LLM token usage (compact tables, single-space indents).","default":false},"skip_cache":{"type":"boolean","title":"Skip Cache","description":"Skip the cache and re-run the conversion.","default":false,"dashboard":{"description":"Skip cache and re-run processing."}},"save_checkpoint":{"type":"boolean","title":"Save Checkpoint","description":"Save a checkpoint after conversion. The checkpoint_id in the response can be used with /extract or /segment to skip re-parsing.","default":false,"dashboard":{"description":"Save a checkpoint for later /extract or /segment calls."}},"additional_config":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additional Config","description":"Additional configuration as a JSON string. Supported keys: 'keep_pageheader_in_output', 'keep_pagefooter_in_output', 'keep_spreadsheet_formatting'."},"extras":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extras","description":"Comma-separated list of extra features to enable. Currently supports: 'track_changes', 'chart_understanding', 'table_cell_bboxes' (per-cell bounding boxes for each table, instead of one box for the whole table; includes word bounding boxes), 'list_item_bboxes' (per-item bounding boxes for each list or list group, instead of one box for the whole list; includes word bounding boxes), 'extract_links', 'extract_bookmarks' (PDF outline/bookmark tree in metadata.pdf_bookmarks; safety-limit truncation is reported by metadata.pdf_bookmarks_truncated), 'infographic', 'new_block_types'.","dashboard":{"description":"Comma-separated list of extra features to enable. Currently supports: 'track_changes', 'chart_understanding', 'table_cell_bboxes' (per-cell bounding boxes for each table, instead of one box for the whole table; includes word bounding boxes), 'list_item_bboxes' (per-item bounding boxes for each list or list group, instead of one box for the whole list; includes word bounding boxes), 'extract_links', 'extract_bookmarks' (PDF outline/bookmark tree in metadata.pdf_bookmarks; safety-limit truncation is reported by metadata.pdf_bookmarks_truncated), 'infographic', 'new_block_types'."}},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"Optional webhook URL to call when the request is complete."},"processing_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processing Location","description":"Optional residency region override (e.g. us, eu). When provided, use file_url or direct-upload; multipart uploads are rejected. When omitted, the request uses the team's configured residency and profile."},"eval_rubric_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Eval Rubric Id","description":"Optional eval rubric ID to run evaluation after conversion."},"model_override_settings":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Override Settings"},"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File","description":"Input PDF, word document, powerpoint, or image file, uploaded as multipart form data.  Images must be png, jpg, or webp format."}},"type":"object","title":"Body_convert_api_v1_convert_post"},"Body_custom_pipeline_api_v1_custom_pipeline_post":{"properties":{"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url","description":"Optional file URL (http/https). If provided, the server will download and process it."},"pipeline_id":{"type":"string","title":"Pipeline Id","description":"The custom pipeline ID or template ID to execute. Must be a completed pipeline created via the custom pipeline API, or a valid template slug.","dashboard":{"description":"The ID or template ID of the custom pipeline to execute."}},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version","description":"Optional version number to use. If not provided, the active version of the pipeline will be used."},"run_eval":{"type":"boolean","title":"Run Eval","description":"Run evaluation rules defined for this custom pipeline.","default":false,"dashboard":{}},"mode":{"type":"string","title":"Mode","description":"Output mode for the underlying parsing step.","default":"fast","choices":["fast","balanced","accurate"]},"max_pages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Pages","description":"The maximum number of pages to process."},"page_range":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Range","description":"The page range to process, comma separated like 0,5-10,20."},"output_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Format","description":"The output format. Can be 'json', 'html', 'markdown', or 'chunks'. Defaults to 'markdown'."},"paginate":{"type":"boolean","title":"Paginate","description":"Whether to paginate the output. If set to True, each page of the output will be separated by a horizontal rule that contains the page number.","default":false},"add_block_ids":{"type":"boolean","title":"Add Block Ids","description":"Add data-block-id attributes to HTML elements for citation tracking. Only applies when output_format includes 'html'.","default":false},"include_markdown_in_chunks":{"type":"boolean","title":"Include Markdown In Chunks","description":"Include markdown field in chunks and JSON output. When enabled, each chunk will have a 'markdown' field with the markdown representation of that block. Only applies when output_format includes 'json' or 'chunks'.","default":false},"disable_image_extraction":{"type":"boolean","title":"Disable Image Extraction","description":"Disable image extraction from the PDF. Defaults to False.","default":false},"disable_image_captions":{"type":"boolean","title":"Disable Image Captions","description":"Disable synthetic image captions/descriptions in output. Images will be rendered as plain img tags without alt text. Defaults to False.","default":false},"skip_cache":{"type":"boolean","title":"Skip Cache","description":"Skip the cache and re-run.","default":false},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"Optional webhook URL to call when the request is complete."},"processing_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processing Location","description":"Optional residency region override (e.g. us, eu). When provided, use file_url or direct-upload; multipart uploads are rejected. When omitted, the request uses the team's configured residency and profile."},"model_override_settings":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Override Settings"},"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File","description":"Input PDF, word document, powerpoint, or image file, uploaded as multipart form data.  Images must be png, jpg, or webp format."}},"type":"object","required":["pipeline_id"],"title":"Body_custom_pipeline_api_v1_custom_pipeline_post"},"Body_custom_pipeline_api_v1_custom_processor_post":{"properties":{"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url","description":"Optional file URL (http/https). If provided, the server will download and process it."},"pipeline_id":{"type":"string","title":"Pipeline Id","description":"The custom pipeline ID or template ID to execute. Must be a completed pipeline created via the custom pipeline API, or a valid template slug.","dashboard":{"description":"The ID or template ID of the custom pipeline to execute."}},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version","description":"Optional version number to use. If not provided, the active version of the pipeline will be used."},"run_eval":{"type":"boolean","title":"Run Eval","description":"Run evaluation rules defined for this custom pipeline.","default":false,"dashboard":{}},"mode":{"type":"string","title":"Mode","description":"Output mode for the underlying parsing step.","default":"fast","choices":["fast","balanced","accurate"]},"max_pages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Pages","description":"The maximum number of pages to process."},"page_range":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Range","description":"The page range to process, comma separated like 0,5-10,20."},"output_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Format","description":"The output format. Can be 'json', 'html', 'markdown', or 'chunks'. Defaults to 'markdown'."},"paginate":{"type":"boolean","title":"Paginate","description":"Whether to paginate the output. If set to True, each page of the output will be separated by a horizontal rule that contains the page number.","default":false},"add_block_ids":{"type":"boolean","title":"Add Block Ids","description":"Add data-block-id attributes to HTML elements for citation tracking. Only applies when output_format includes 'html'.","default":false},"include_markdown_in_chunks":{"type":"boolean","title":"Include Markdown In Chunks","description":"Include markdown field in chunks and JSON output. When enabled, each chunk will have a 'markdown' field with the markdown representation of that block. Only applies when output_format includes 'json' or 'chunks'.","default":false},"disable_image_extraction":{"type":"boolean","title":"Disable Image Extraction","description":"Disable image extraction from the PDF. Defaults to False.","default":false},"disable_image_captions":{"type":"boolean","title":"Disable Image Captions","description":"Disable synthetic image captions/descriptions in output. Images will be rendered as plain img tags without alt text. Defaults to False.","default":false},"skip_cache":{"type":"boolean","title":"Skip Cache","description":"Skip the cache and re-run.","default":false},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"Optional webhook URL to call when the request is complete."},"processing_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processing Location","description":"Optional residency region override (e.g. us, eu). When provided, use file_url or direct-upload; multipart uploads are rejected. When omitted, the request uses the team's configured residency and profile."},"model_override_settings":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Override Settings"},"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File","description":"Input PDF, word document, powerpoint, or image file, uploaded as multipart form data.  Images must be png, jpg, or webp format."}},"type":"object","required":["pipeline_id"],"title":"Body_custom_pipeline_api_v1_custom_processor_post"},"Body_extract_api_v1_extract_post":{"properties":{"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url","description":"Optional file URL. Provide either file/file_url or checkpoint_id."},"checkpoint_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkpoint Id","description":"Checkpoint ID from a previous /convert request (with save_checkpoint=true). Skips re-parsing when provided."},"page_schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Schema","description":"The JSON schema for structured extraction. Generate with Pydantic .model_dump_json() or write manually. Must contain a 'properties' key. Mutually exclusive with schema_id.","dashboard":{"description":"Valid Pydantic JSON schema defining the structured data to extract. Generate with YourModel.model_json_schema().","type":"json"}},"schema_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schema Id","description":"ID of a saved extraction schema (e.g. sch_k8Hx9mP2nQ4v). Mutually exclusive with page_schema."},"schema_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schema Version","description":"Version number of the schema to use. Only valid with schema_id. If omitted, the latest version is used."},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode","description":"Output mode for parsing (only used when providing a file, not a checkpoint). Defaults to 'accurate' for balanced extraction and 'fast' otherwise.","choices":["fast","balanced","accurate"],"dashboard":{"description":"Processing mode balancing speed and accuracy."}},"max_pages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Pages","description":"The maximum number of pages to process."},"page_range":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Range","description":"The page range to process, comma separated like 0,5-10,20.","dashboard":{"description":"Comma-separated page ranges to process, e.g. '0-2,4'. Leave empty for all pages."}},"output_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Format","description":"The output format for the parsed text alongside extraction results. Defaults to 'markdown'.","dashboard":{"choices":["markdown","html","json"],"description":"Output format for the parsed text alongside extraction results.","type":"select"}},"save_checkpoint":{"type":"boolean","title":"Save Checkpoint","description":"Save a checkpoint after processing for future extraction/segmentation calls.","default":false,"dashboard":{"description":"Save a checkpoint for later /extract or /segment calls."}},"skip_cache":{"type":"boolean","title":"Skip Cache","description":"Skip the cache and re-run.","default":false,"dashboard":{"description":"Skip cache and re-run processing."}},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"Optional webhook URL to call when the request is complete."},"processing_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processing Location","description":"Optional residency region override (e.g. us, eu). When provided, use file_url or direct-upload; multipart uploads are rejected. When omitted, the request uses the team's configured residency and profile."},"extraction_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extraction Mode","description":"Extraction mode: 'turbo' (fastest; image-only, no OCR/citations/verification, returns JSON only), 'fast' (low latency and cost), 'balanced' (high accuracy with per-field verification, reasoning, and citations; slower), or 'accurate' (highest accuracy — same as balanced but runs the strongest extraction model; slowest and most expensive). Defaults to 'balanced'."},"model_override_settings":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Override Settings"},"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File","description":"Input PDF, word document, powerpoint, or image file, uploaded as multipart form data.  Images must be png, jpg, or webp format."}},"type":"object","title":"Body_extract_api_v1_extract_post"},"Body_fill_api_v1_fill_post":{"properties":{"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url","description":"Optional file URL (http/https). If provided, the server will download and process it."},"field_data":{"type":"string","title":"Field Data","description":"JSON string mapping field keys to values and descriptions. Format: {\"field_key\": {\"value\": \"...\", \"description\": \"...\"}}","dashboard":{"description":"JSON mapping field keys to values and descriptions.","type":"json"}},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context","description":"Optional context to guide form filling (e.g., 'Initial hire for new employee')."},"confidence_threshold":{"type":"number","title":"Confidence Threshold","description":"Minimum confidence for field matching (0.0-1.0). Fields below this threshold won't be filled.","default":0.5,"dashboard":{"description":"Minimum confidence for field matching.","max_value":1.0,"min_value":0.0}},"page_range":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Range","description":"Pages to process, comma separated like 0,5-10,20. Example: '0,2-4' will process pages 0, 2, 3, and 4."},"skip_cache":{"type":"boolean","title":"Skip Cache","description":"Skip the cache and re-run the inference. Defaults to False.","default":false},"processing_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processing Location","description":"Optional residency region override (e.g. us, eu). When provided, use file_url or direct-upload; multipart uploads are rejected. When omitted, the request uses the team's configured residency and profile."},"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File","description":"Input PDF, word document, powerpoint, or image file, uploaded as multipart form data.  Images must be png, jpg, or webp format."}},"type":"object","required":["field_data"],"title":"Body_fill_api_v1_fill_post"},"Body_iterate_custom_pipeline_api_v1_custom_pipelines__processor_id__iterate_post":{"properties":{"request":{"type":"string","title":"Request","description":"Feedback / instructions for the iteration"},"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files","description":"Optional additional example documents","default":[]},"file_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Instructions","description":"JSON array of per-file instructions"}},"type":"object","required":["request"],"title":"Body_iterate_custom_pipeline_api_v1_custom_pipelines__processor_id__iterate_post"},"Body_iterate_custom_pipeline_api_v1_custom_processors__processor_id__iterate_post":{"properties":{"request":{"type":"string","title":"Request","description":"Feedback / instructions for the iteration"},"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files","description":"Optional additional example documents","default":[]},"file_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Instructions","description":"JSON array of per-file instructions"}},"type":"object","required":["request"],"title":"Body_iterate_custom_pipeline_api_v1_custom_processors__processor_id__iterate_post"},"Body_launch_processor_run_api_v1_agent_studio_processors__processor_id__runs_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"Input PDF, image, office document (doc/docx/ppt/pptx), HTML, EPUB, or spreadsheet (xlsx/xlsm/xls/ods/csv) file. Office documents are staged to PDF at upload when possible; spreadsheets stage natively onto the per-sheet path (same intake as the design session docs upload)."}},"type":"object","required":["file"],"title":"Body_launch_processor_run_api_v1_agent_studio_processors__processor_id__runs_post"},"Body_marker_api_v1_marker_post":{"properties":{"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url","description":"Optional file URL (http/https). If provided, the server will download and process it."},"mode":{"type":"string","title":"Mode","description":"Which output mode to use. Valid values: 'fast' (lowest latency, great for real-time use cases), 'balanced' (balanced accuracy and latency, works well with most documents), 'accurate' (highest accuracy and latency, good on the most complex documents).","default":"fast","choices":["fast","balanced","accurate"]},"max_pages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Pages","description":"The maximum number of pages in the PDF to convert."},"page_range":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Range","description":"The page range to parse, comma separated like 0,5-10,20. This will override max_pages if provided. Example: '0,2-4' will process pages 0, 2, 3, and 4."},"langs":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Langs","description":"Note: This parameter has been deprecated, and will be ignored in the current version.  The languages to use if OCR is needed, comma separated.  Must be either the names or codes from https://github.com/datalab-to/surya/blob/master/surya/languages.py.  Any other inputs will be ignored."},"force_ocr":{"type":"boolean","title":"Force Ocr","description":"[DEPRECATED] This parameter is deprecated and has no effect. OCR is handled automatically by the parsing pipeline.","default":false,"deprecated":true},"format_lines":{"type":"boolean","title":"Format Lines","description":"[DEPRECATED] This parameter is deprecated and has no effect. Line formatting is handled automatically by the parsing pipeline.","default":false,"deprecated":true},"paginate":{"type":"boolean","title":"Paginate","description":"Whether to paginate the output.  Defaults to False.  If set to True, each page of the output will be separated by a horizontal rule that contains the page number (2 newlines, {PAGE_NUMBER}, 48 - characters, 2 newlines).","default":false},"merge_cross_page":{"type":"boolean","title":"Merge Cross Page","description":"Merge content that is split across pages back into single logical blocks: tables (long tables continued vertically, and wide tables printed as per-page column panels), paragraphs broken mid-sentence, and lists continued on the next page (continuation items keep the indent level of the list they belong to). Merged blocks carry a data-merged-pages attribute listing their source pages. Billed as a compute surcharge on the measured merge cost, like agent extraction.","default":false},"add_block_ids":{"type":"boolean","title":"Add Block Ids","description":"Add data-block-id attributes to HTML elements for citation tracking. Only applies when output_format includes 'html'.","default":false},"include_markdown_in_chunks":{"type":"boolean","title":"Include Markdown In Chunks","description":"Include markdown field in chunks and JSON output. When enabled, each chunk will have a 'markdown' field with the markdown representation of that block. Only applies when output_format includes 'json' or 'chunks'.","default":false},"strip_existing_ocr":{"type":"boolean","title":"Strip Existing Ocr","description":"[DEPRECATED] This parameter is deprecated and has no effect. OCR handling is managed automatically by the parsing pipeline.","default":false,"deprecated":true},"disable_image_extraction":{"type":"boolean","title":"Disable Image Extraction","description":"Disable image extraction from the PDF.  If use_llm is also set, then images will be automatically captioned.  Defaults to False.","default":false},"disable_image_captions":{"type":"boolean","title":"Disable Image Captions","description":"Disable synthetic image captions/descriptions in output. Images will be rendered as plain img tags without alt text or the img-description wrapper div. Defaults to False.","default":false},"fence_synthetic_captions":{"type":"boolean","title":"Fence Synthetic Captions","description":"Wrap synthetic image captions in markdown with HTML comment markers (<!-- BEGIN IMAGE CAPTION --> ... <!-- END IMAGE CAPTION -->) for easy identification/removal. Only applies to markdown output.","default":false},"disable_ocr_math":{"type":"boolean","title":"Disable Ocr Math","description":"[DEPRECATED] This parameter is deprecated and has no effect. Math recognition is handled automatically by the parsing pipeline.","default":false,"deprecated":true},"use_llm":{"type":"boolean","title":"Use Llm","description":"[DEPRECATED] This parameter is deprecated. Use the 'mode' parameter instead: 'balanced' or 'accurate' modes.","default":false,"deprecated":true},"output_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Format","description":"The output format for the text.  Can be 'json', 'html', 'markdown', or 'chunks'.  Defaults to 'markdown'.  You can comma separate multiple formats, like `markdown,html`."},"token_efficient_markdown":{"type":"boolean","title":"Token Efficient Markdown","description":"When enabled, the markdown output uses token-efficient formatting optimized for LLMs (compact tables with single-dash headers, single-space list indents).","default":false},"skip_cache":{"type":"boolean","title":"Skip Cache","description":"Skip the cache and re-run the inference.  Defaults to False.  If set to True, the cache will be skipped and the inference will be re-run.","default":false},"save_checkpoint":{"type":"boolean","title":"Save Checkpoint","description":"Save the checkpoint after processing.  Defaults to False.  This is only useful if you're applying custom rules iteratively.","default":false},"block_correction_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Block Correction Prompt","description":"[DEPRECATED] This parameter is deprecated and has no effect. Block correction is not currently supported.","deprecated":true},"page_schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Schema","description":"The schema to use for structured extraction (only used with structured extraction endpoint). The ideal way to generate this is to create a Pydantic schema, then convert to JSON with .model_dump_json()."},"segmentation_schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Segmentation Schema","description":"The schema to use for document segmentation. JSON object (passed as a string) with a 'segments' list of {name, description} objects and an optional 'segmentation_strategy' ('custom' to honor the provided segments, 'document_boundary' for automatic detection). Same format as the /segment endpoint's segmentation_schema."},"additional_config":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additional Config","description":"Additional configuration options as a JSON string. Only these keys have effect: 'keep_pageheader_in_output' (bool), 'keep_pagefooter_in_output' (bool), 'keep_spreadsheet_formatting' (bool)."},"extras":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extras","description":"Comma-separated list of extra features to enable. Currently supports: 'track_changes', 'chart_understanding', 'table_cell_bboxes' (per-cell bounding boxes for each table, instead of one box for the whole table; includes word bounding boxes), 'list_item_bboxes' (per-item bounding boxes for each list or list group, instead of one box for the whole list; includes word bounding boxes), 'extract_links', 'extract_bookmarks' (PDF outline/bookmark tree in metadata.pdf_bookmarks; safety-limit truncation is reported by metadata.pdf_bookmarks_truncated), 'infographic', 'new_block_types'."},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"Optional webhook URL to call when the request is complete. If provided, this will override the webhook URL stored in your account settings for this specific request."},"processing_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processing Location","description":"Optional residency region override (e.g. us, eu). When provided, use file_url or direct-upload; multipart uploads are rejected. When omitted, the request uses the team's configured residency and profile."},"pipeline_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Id","description":"Optional custom pipeline ID. If provided, will execute the custom pipeline configuration associated with this ID."},"run_eval":{"type":"boolean","title":"Run Eval","description":"Internal: run evals over custom pipeline.","default":false},"model_override_settings":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Override Settings"},"word_bboxes":{"type":"boolean","title":"Word Bboxes","description":"When enabled, predict per-word bounding boxes with confidence scores for each page. Each word is inlined into the HTML output as a span carrying data-bbox and data-confidence attributes (markdown output strips these).","default":false},"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File","description":"Input PDF, word document, powerpoint, or image file, uploaded as multipart form data.  Images must be png, jpg, or webp format."}},"type":"object","title":"Body_marker_api_v1_marker_post"},"Body_ocr_api_v1_ocr_post":{"properties":{"max_pages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Pages","description":"The maximum number of pages in the PDF to convert."},"page_range":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Range","description":"The page range to parse, comma separated like 0,5-10,20. This will override max_pages if provided. Example: '0,2-4' will process pages 0, 2, 3, and 4."},"langs":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Langs","description":"Note: This parameter has been deprecated, and is no longer used. The languages to use for OCR, comma separated.  Can be up to 4 languages. Must be either the names or codes from https://github.com/datalab-to/surya/blob/master/surya/languages.py.  Any other inputs will be ignored.  Defaults to 'en' if not provided."},"skip_cache":{"type":"boolean","title":"Skip Cache","description":"Skip the cache and re-run the inference.  Defaults to False.  If set to True, the cache will be skipped and the inference will be re-run.","default":false},"processing_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processing Location","description":"Optional residency region override (e.g. us, eu). When provided, use file_url or direct-upload; multipart uploads are rejected. When omitted, the request uses the team's configured residency and profile."},"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File","description":"Input PDF, word document, powerpoint, or image file, uploaded as multipart form data.  Images must be png, jpg, or webp format."}},"type":"object","title":"Body_ocr_api_v1_ocr_post"},"Body_promote_to_template_api_v1_pipeline_templates_post":{"properties":{"processor_id":{"type":"string","title":"Processor Id","description":"Processor ID to copy as a template"},"slug":{"type":"string","title":"Slug","description":"URL-friendly slug (e.g. 'invoice-extraction')"},"template_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Description","description":"Public-facing description"},"template_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Category","description":"Category (e.g. Finance, Healthcare)"},"sort_order":{"type":"integer","title":"Sort Order","description":"Display ordering","default":0}},"type":"object","required":["processor_id","slug"],"title":"Body_promote_to_template_api_v1_pipeline_templates_post"},"Body_promote_to_template_api_v1_processor_templates_post":{"properties":{"processor_id":{"type":"string","title":"Processor Id","description":"Processor ID to copy as a template"},"slug":{"type":"string","title":"Slug","description":"URL-friendly slug (e.g. 'invoice-extraction')"},"template_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Description","description":"Public-facing description"},"template_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Category","description":"Category (e.g. Finance, Healthcare)"},"sort_order":{"type":"integer","title":"Sort Order","description":"Display ordering","default":0}},"type":"object","required":["processor_id","slug"],"title":"Body_promote_to_template_api_v1_processor_templates_post"},"Body_restore_custom_pipeline_api_v1_custom_pipelines__processor_id__restore_post":{"properties":{"team_id":{"type":"integer","title":"Team Id","description":"Team ID that owns the processor"}},"type":"object","required":["team_id"],"title":"Body_restore_custom_pipeline_api_v1_custom_pipelines__processor_id__restore_post"},"Body_restore_custom_pipeline_api_v1_custom_processors__processor_id__restore_post":{"properties":{"team_id":{"type":"integer","title":"Team Id","description":"Team ID that owns the processor"}},"type":"object","required":["team_id"],"title":"Body_restore_custom_pipeline_api_v1_custom_processors__processor_id__restore_post"},"Body_run_pipeline_api_v1_pipelines__pipeline_id__run_post":{"properties":{"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url","description":"Optional file URL (http/https). If provided, the server will download and process it."},"page_range":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Range","description":"Page range to process, e.g. '0,2-4'."},"output_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Format","description":"Output format: json, html, markdown, or chunks."},"run_evals":{"type":"boolean","title":"Run Evals","description":"Whether to run evaluation steps.","default":false},"run_evals_steps":{"items":{"type":"string"},"type":"array","title":"Run Evals Steps","description":"Optional per-step eval run flags: repeat the field once per step type (e.g. run_evals_steps=convert&run_evals_steps=extract). When omitted, every step with an eval rubric attached is evaluated; when provided, only the listed step types are (intersected with the rubric'd steps — unknown types are ignored). Ignored while run_evals is false."},"skip_cache":{"type":"boolean","title":"Skip Cache","description":"Skip the executor cache and re-run all steps.","default":false},"checkpoint_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkpoint Id","description":"Checkpoint from a previous run's convert step. When provided, re-parsing is skipped and only downstream steps run. The file must still be provided. Ignored when run_evals is set."},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"URL to POST when the execution completes."},"processing_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processing Location","description":"Optional residency region override (e.g. us, eu). When provided, use file_url or direct-upload; multipart uploads are rejected. When omitted, the request uses the team's configured residency and profile."},"version":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Version","description":"Pipeline version to execute. 0 = use draft steps. Omit to use the active published version (or draft if unpublished)."},"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File","description":"Input PDF, word document, powerpoint, or image file, uploaded as multipart form data.  Images must be png, jpg, or webp format."}},"type":"object","title":"Body_run_pipeline_api_v1_pipelines__pipeline_id__run_post"},"Body_segment_api_v1_segment_post":{"properties":{"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url","description":"Optional file URL. Provide either file/file_url or checkpoint_id."},"checkpoint_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkpoint Id","description":"Checkpoint ID from a previous /convert request (with save_checkpoint=true). Skips re-parsing when provided."},"segmentation_schema":{"type":"string","title":"Segmentation Schema","description":"JSON object (passed as a string) defining how to segment the document: {\"segments\": [{\"name\": ..., \"description\": ...}, ...], \"segmentation_strategy\": \"custom\"}. When 'segments' are provided they guide which sections to identify; for fully automatic document-boundary detection pass {\"segmentation_strategy\": \"document_boundary\"} with no segments. The same object (JSON-encoded) is used for segment steps in pipelines via settings.segmentation_schema.","dashboard":{"description":"JSON schema with segment names and descriptions for identifying page ranges.","type":"json"}},"mode":{"type":"string","title":"Mode","description":"Output mode for parsing (only used when providing a file, not a checkpoint).","default":"fast","choices":["fast","balanced","accurate"],"dashboard":{"description":"Processing mode balancing speed and accuracy."}},"max_pages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Pages","description":"The maximum number of pages to process."},"page_range":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Range","description":"The page range to process, comma separated like 0,5-10,20.","dashboard":{"description":"Comma-separated page ranges to process, e.g. '0-2,4'. Leave empty for all pages."}},"save_checkpoint":{"type":"boolean","title":"Save Checkpoint","description":"Save a checkpoint after processing for future extraction/segmentation calls.","default":false,"dashboard":{"description":"Save a checkpoint for later /extract or /segment calls."}},"skip_cache":{"type":"boolean","title":"Skip Cache","description":"Skip the cache and re-run.","default":false,"dashboard":{"description":"Skip cache and re-run processing."}},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"Optional webhook URL to call when the request is complete."},"processing_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processing Location","description":"Optional residency region override (e.g. us, eu). When provided, use file_url or direct-upload; multipart uploads are rejected. When omitted, the request uses the team's configured residency and profile."},"model_override_settings":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Override Settings"},"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File","description":"Input PDF, word document, powerpoint, or image file, uploaded as multipart form data.  Images must be png, jpg, or webp format."}},"type":"object","required":["segmentation_schema"],"title":"Body_segment_api_v1_segment_post"},"Body_set_active_pipeline_version_api_v1_custom_pipelines__processor_id__set_active_post":{"properties":{"version":{"type":"integer","title":"Version","description":"Version number to set as active"}},"type":"object","required":["version"],"title":"Body_set_active_pipeline_version_api_v1_custom_pipelines__processor_id__set_active_post"},"Body_set_active_pipeline_version_api_v1_custom_processors__processor_id__set_active_post":{"properties":{"version":{"type":"integer","title":"Version","description":"Version number to set as active"}},"type":"object","required":["version"],"title":"Body_set_active_pipeline_version_api_v1_custom_processors__processor_id__set_active_post"},"Body_submit_custom_pipeline_api_v1_custom_pipelines_post":{"properties":{"request":{"type":"string","title":"Request","description":"Natural language description of desired processor behavior"},"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files","description":"Example documents (PDFs, images, etc.) to use for testing"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Short display name for the processor (max 120 chars)"},"file_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Instructions","description":"JSON array of per-file instructions: [{\"filename\": \"doc.pdf\", \"general_instructions\": \"...\", \"page_instructions\": [{\"page\": 3, \"instructions\": \"...\"}]}]"},"original_params":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Params","description":"JSON string of base ChandraParsePipeline parameters (e.g., '{\"output_formats\": [\"markdown\"]}')"},"eval_rubric_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Eval Rubric Id","description":"Optional ID of an EvalRubric to attach as the eval definition for this processor"}},"type":"object","required":["request","files"],"title":"Body_submit_custom_pipeline_api_v1_custom_pipelines_post"},"Body_submit_custom_pipeline_api_v1_custom_processors_post":{"properties":{"request":{"type":"string","title":"Request","description":"Natural language description of desired processor behavior"},"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files","description":"Example documents (PDFs, images, etc.) to use for testing"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Short display name for the processor (max 120 chars)"},"file_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Instructions","description":"JSON array of per-file instructions: [{\"filename\": \"doc.pdf\", \"general_instructions\": \"...\", \"page_instructions\": [{\"page\": 3, \"instructions\": \"...\"}]}]"},"original_params":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Params","description":"JSON string of base ChandraParsePipeline parameters (e.g., '{\"output_formats\": [\"markdown\"]}')"},"eval_rubric_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Eval Rubric Id","description":"Optional ID of an EvalRubric to attach as the eval definition for this processor"}},"type":"object","required":["request","files"],"title":"Body_submit_custom_pipeline_api_v1_custom_processors_post"},"Body_table_rec_api_v1_table_rec_post":{"properties":{"max_pages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Pages","description":"The maximum number of pages in the PDF to convert."},"page_range":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Range","description":"The page range to parse, comma separated like 0,5-10,20. This will override max_pages if provided. Example: '0,2-4' will process pages 0, 2, 3, and 4."},"output_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Format","description":"The output format for the table.  Can be 'json', 'html', or 'markdown'.  Defaults to 'markdown'."},"skip_cache":{"type":"boolean","title":"Skip Cache","description":"Skip the cache and re-run the inference.  Defaults to False.  If set to True, the cache will be skipped and the inference will be re-run.","default":false},"processing_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processing Location","description":"Optional residency region override (e.g. us, eu). When provided, use file_url or direct-upload; multipart uploads are rejected. When omitted, the request uses the team's configured residency and profile."},"paginate":{"type":"boolean","title":"Paginate","description":"Whether to paginate the output.  Defaults to False.  If set to True, each page of the output will be separated by a horizontal rule that contains the page number (2 newlines, {PAGE_NUMBER}, 48 - characters, 2 newlines).","default":false},"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File","description":"Input PDF, word document, powerpoint, or image file, uploaded as multipart form data.  Images must be png, jpg, or webp format."}},"type":"object","title":"Body_table_rec_api_v1_table_rec_post"},"Body_track_changes_endpoint_api_v1_track_changes_post":{"properties":{"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url","description":"Optional file URL (http/https). If provided, the server will download and process it."},"output_format":{"type":"string","title":"Output Format","description":"Comma-separated output formats. Supports: markdown, html, chunks.","default":"markdown,html,chunks","dashboard":{}},"max_pages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Pages","description":"The maximum number of pages to process."},"page_range":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Range","description":"The page range to process, comma separated like 0,5-10,20."},"paginate":{"type":"boolean","title":"Paginate","description":"Whether to separate the output by page with horizontal rules.","default":false,"dashboard":{"description":"Separate output by page with horizontal rules."}},"skip_cache":{"type":"boolean","title":"Skip Cache","description":"Skip the cache and re-run the inference.","default":false},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"Optional webhook URL to call when the request is complete."},"processing_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processing Location","description":"Optional residency region override (e.g. us, eu). When provided, use file_url or direct-upload; multipart uploads are rejected. When omitted, the request uses the team's configured residency and profile."},"model_override_settings":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Override Settings"},"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File","description":"Input PDF, word document, powerpoint, or image file, uploaded as multipart form data.  Images must be png, jpg, or webp format."}},"type":"object","title":"Body_track_changes_endpoint_api_v1_track_changes_post"},"Body_transfer_custom_pipeline_api_v1_custom_pipelines__processor_id__transfer_post":{"properties":{"to_team_id":{"type":"integer","title":"To Team Id","description":"Team ID to transfer the processor to"},"to_processor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Processor Id","description":"Optional: existing pipeline ID on the target team to update in place. If provided, replaces the target processor's versions and metadata instead of creating a new copy."},"copy_mode":{"$ref":"#/components/schemas/CopyMode","description":"Copy mode: 'with_history' copies all versions with checkpoints and session. 'without_history' copies only the active version as v1, stripping checkpoints and session.","default":"with_history"}},"type":"object","required":["to_team_id"],"title":"Body_transfer_custom_pipeline_api_v1_custom_pipelines__processor_id__transfer_post"},"Body_transfer_custom_pipeline_api_v1_custom_processors__processor_id__transfer_post":{"properties":{"to_team_id":{"type":"integer","title":"To Team Id","description":"Team ID to transfer the processor to"},"to_processor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Processor Id","description":"Optional: existing pipeline ID on the target team to update in place. If provided, replaces the target processor's versions and metadata instead of creating a new copy."},"copy_mode":{"$ref":"#/components/schemas/CopyMode","description":"Copy mode: 'with_history' copies all versions with checkpoints and session. 'without_history' copies only the active version as v1, stripping checkpoints and session.","default":"with_history"}},"type":"object","required":["to_team_id"],"title":"Body_transfer_custom_pipeline_api_v1_custom_processors__processor_id__transfer_post"},"Body_update_template_api_v1_pipeline_templates__slug__put":{"properties":{"template_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Description"},"template_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Category"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","title":"Body_update_template_api_v1_pipeline_templates__slug__put"},"Body_update_template_api_v1_processor_templates__slug__put":{"properties":{"template_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Description"},"template_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Category"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","title":"Body_update_template_api_v1_processor_templates__slug__put"},"Body_upload_docs_api_v1_agent_studio_sessions__session_id__docs_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files","description":"Reference documents: PDF/image/office/HTML/EPUB (processing docs), spreadsheets (sheet path), and .md/.txt text files (context-only)."}},"type":"object","required":["files"],"title":"Body_upload_docs_api_v1_agent_studio_sessions__session_id__docs_post"},"ChatMessage":{"properties":{"role":{"type":"string","enum":["user","assistant"],"title":"Role"},"content":{"type":"string","maxLength":5000,"title":"Content"}},"type":"object","required":["role","content"],"title":"ChatMessage","description":"A single message in the customizer description chat."},"CheckResultResponse":{"properties":{"check_id":{"type":"string","title":"Check Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","enum":["pass","fail","warn","na"],"title":"Status"},"blocking":{"type":"boolean","title":"Blocking"},"message":{"type":"string","title":"Message"},"locators":{"items":{"$ref":"#/components/schemas/Locator"},"type":"array","title":"Locators"}},"type":"object","required":["check_id","name","status","blocking","message"],"title":"CheckResultResponse"},"CheckSpecModel":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description","default":""},"kind":{"type":"string","enum":["code","judge"],"title":"Kind"},"blocking":{"type":"boolean","title":"Blocking","default":false},"source":{"type":"string","enum":["base","catalog","user"],"title":"Source","default":"base"},"modified_from_base":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Modified From Base"}},"type":"object","required":["id","label","kind"],"title":"CheckSpecModel","description":"One verifier in the contract (frontend CheckSpec, snake_case)."},"CollectionFileResponse":{"properties":{"uploaded_file_id":{"type":"integer","title":"Uploaded File Id"},"original_filename":{"type":"string","title":"Original Filename"},"file_size":{"type":"integer","title":"File Size"},"content_type":{"type":"string","title":"Content Type"},"sort_order":{"type":"integer","title":"Sort Order"},"source_type":{"type":"string","enum":["upload","s3"],"title":"Source Type","default":"upload"},"external_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Key"},"external_etag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Etag"},"external_last_modified":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"External Last Modified"},"external_deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"External Deleted At"},"last_eval_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Last Eval Score"},"last_score_breakdown":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Last Score Breakdown"}},"type":"object","required":["uploaded_file_id","original_filename","file_size","content_type","sort_order"],"title":"CollectionFileResponse"},"CollectionFilesResponse":{"properties":{"files":{"items":{"$ref":"#/components/schemas/CollectionFileResponse"},"type":"array","title":"Files"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["files","total","limit","has_more"],"title":"CollectionFilesResponse"},"CollectionListResponse":{"properties":{"collections":{"items":{"$ref":"#/components/schemas/CollectionResponse"},"type":"array","title":"Collections"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["collections","total"],"title":"CollectionListResponse"},"CollectionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"archived":{"type":"boolean","title":"Archived"},"file_count":{"type":"integer","title":"File Count","default":0},"files":{"items":{"$ref":"#/components/schemas/CollectionFileResponse"},"type":"array","title":"Files"},"s3_source":{"anyOf":[{"$ref":"#/components/schemas/CollectionS3SourceResponse"},{"type":"null"}]},"s3_status":{"anyOf":[{"$ref":"#/components/schemas/CollectionS3StatusResponse"},{"type":"null"}]},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated"}},"type":"object","required":["id","name","description","archived","created","updated"],"title":"CollectionResponse"},"CollectionS3SourceResponse":{"properties":{"id":{"type":"integer","title":"Id"},"bucket":{"type":"string","title":"Bucket"},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"credentials_type":{"type":"string","enum":["access_key","public"],"title":"Credentials Type"},"aws_access_key_id":{"type":"string","title":"Aws Access Key Id"},"aws_secret_access_key_redacted":{"type":"string","title":"Aws Secret Access Key Redacted"},"sync_status":{"type":"string","title":"Sync Status"},"last_sync_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sync Started At"},"last_sync_completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sync Completed At"},"last_sync_file_count":{"type":"integer","title":"Last Sync File Count"},"last_sync_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Sync Error"},"output_bucket":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Bucket"},"output_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Prefix"},"output_region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Region"},"output_credentials_type":{"type":"string","enum":["source","access_key"],"title":"Output Credentials Type"},"output_aws_access_key_id":{"type":"string","title":"Output Aws Access Key Id"},"output_aws_secret_access_key_redacted":{"type":"string","title":"Output Aws Secret Access Key Redacted"},"writeback_status":{"type":"string","title":"Writeback Status"},"last_writeback_run_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Writeback Run Id"},"last_writeback_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Writeback Started At"},"last_writeback_completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Writeback Completed At"},"last_writeback_file_count":{"type":"integer","title":"Last Writeback File Count"},"last_writeback_total_file_count":{"type":"integer","title":"Last Writeback Total File Count"},"last_writeback_failed_file_count":{"type":"integer","title":"Last Writeback Failed File Count"},"last_writeback_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Writeback Error"},"last_writeback_error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Writeback Error Code"},"last_writeback_manifest_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Writeback Manifest Uri"}},"type":"object","required":["id","bucket","prefix","region","credentials_type","aws_access_key_id","aws_secret_access_key_redacted","sync_status","last_sync_started_at","last_sync_completed_at","last_sync_file_count","last_sync_error","output_bucket","output_prefix","output_region","output_credentials_type","output_aws_access_key_id","output_aws_secret_access_key_redacted","writeback_status","last_writeback_run_id","last_writeback_started_at","last_writeback_completed_at","last_writeback_file_count","last_writeback_total_file_count","last_writeback_failed_file_count","last_writeback_error","last_writeback_error_code","last_writeback_manifest_uri"],"title":"CollectionS3SourceResponse"},"CollectionS3StatusResponse":{"properties":{"collection_id":{"type":"integer","title":"Collection Id"},"sync_status":{"type":"string","title":"Sync Status"},"writeback_status":{"type":"string","title":"Writeback Status"}},"type":"object","required":["collection_id","sync_status","writeback_status"],"title":"CollectionS3StatusResponse"},"CollectionS3StatusesResponse":{"properties":{"statuses":{"items":{"$ref":"#/components/schemas/CollectionS3StatusResponse"},"type":"array","title":"Statuses"}},"type":"object","required":["statuses"],"title":"CollectionS3StatusesResponse"},"CommitResponse":{"properties":{"version":{"$ref":"#/components/schemas/VersionResponse"},"launched_run_ids":{"items":{"type":"integer"},"type":"array","title":"Launched Run Ids"}},"type":"object","required":["version"],"title":"CommitResponse"},"ConfirmUploadResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the confirmation was successful","default":true},"file_id":{"type":"integer","title":"File Id","description":"File ID"},"reference":{"type":"string","title":"Reference","description":"File reference in datalab://file-{id} format"},"message":{"type":"string","title":"Message","description":"Confirmation message"}},"type":"object","required":["file_id","reference","message"],"title":"ConfirmUploadResponse","description":"Response after confirming upload."},"ContractModel":{"properties":{"goal":{"type":"string","title":"Goal"},"output_shape":{"type":"string","enum":["parse","json","jats","wcag","segment"],"title":"Output Shape"},"output_schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Schema"},"rules":{"items":{"$ref":"#/components/schemas/RuleFragmentModel"},"type":"array","title":"Rules"},"parse_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Parse Params"},"knobs":{"anyOf":[{"$ref":"#/components/schemas/KnobsModel"},{"type":"null"}]}},"type":"object","required":["goal","output_shape"],"title":"ContractModel","description":"The freezable record a version snapshots (contract JSONB)."},"CopyMode":{"type":"string","enum":["with_history","without_history"],"title":"CopyMode"},"CreateCollectionRequest":{"properties":{"name":{"type":"string","maxLength":200,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name"],"title":"CreateCollectionRequest"},"CreateDocumentFinalResponse":{"properties":{"status":{"type":"string","title":"Status","description":"The status of the request. Should be 'complete' when the request is done."},"result_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Url","description":"Signed URL for downloading the completed result JSON when direct result download is required."},"expires_in":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires In","description":"Number of seconds until result_url expires."},"success":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Success","description":"Whether the document creation was successful."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message if document creation failed."},"output_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Format","description":"Output format: 'docx'."},"output_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Base64","description":"Base64-encoded document (DOCX)."},"runtime":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Runtime","description":"Processing time in seconds."},"page_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Count","description":"Number of pages in the document."},"cost_breakdown":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Cost Breakdown","description":"A dictionary of the cost breakdown of this request."},"versions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"},{"type":"null"}],"title":"Versions","description":"A dictionary of the versions of the libraries used in the request."}},"type":"object","required":["status"],"title":"CreateDocumentFinalResponse","description":"Response model for create document endpoint."},"CreateDocumentRequest":{"properties":{"markdown":{"type":"string","title":"Markdown","description":"The markdown content to convert to a document. Supports track changes markup (<ins>, <del>, <comment> tags)."},"output_format":{"type":"string","title":"Output Format","description":"The output format for the document. Currently only 'docx' is supported.","default":"docx"},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"Optional webhook URL to call when the request is complete."},"processing_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processing Location","description":"Optional residency region override (e.g. us, eu). When provided, use file_url or direct-upload; multipart uploads are rejected. When omitted, the request uses the team's configured residency and profile."},"model_override_settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Model Override Settings","include_in_schema":false}},"type":"object","required":["markdown"],"title":"CreateDocumentRequest","description":"Request model for creating documents from markdown."},"CreateEvalRubricRequest":{"properties":{"name":{"type":"string","maxLength":200,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"eval_definition":{"additionalProperties":true,"type":"object","title":"Eval Definition","description":"Evaluation definition JSON matching EvalDefinition schema"},"source":{"type":"string","enum":["manual","feedback","pipeline_import","generated"],"title":"Source","description":"Provenance of the rubric (defaults to manual)","default":"manual"}},"type":"object","required":["name","eval_definition"],"title":"CreateEvalRubricRequest"},"CreateExtractionSchemaRequest":{"properties":{"name":{"type":"string","maxLength":200,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"schema_json":{"additionalProperties":true,"type":"object","title":"Schema Json","description":"JSON schema for extraction (must contain 'properties' key)"}},"type":"object","required":["name","schema_json"],"title":"CreateExtractionSchemaRequest"},"CreatePipelineRequest":{"properties":{"steps":{"items":{"$ref":"#/components/schemas/PipelineStep"},"type":"array","minItems":1,"title":"Steps","description":"Ordered list of pipeline steps"},"reuse_draft":{"type":"boolean","title":"Reuse Draft","description":"Find-or-create: when true, reuse the team's most recent unsaved, unarchived draft with an identical ordered step-type chain instead of creating a duplicate. Saved pipelines are never reused.","default":false}},"type":"object","required":["steps"],"title":"CreatePipelineRequest"},"CreatePipelineVersionRequest":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Optional description for this version snapshot"}},"type":"object","title":"CreatePipelineVersionRequest"},"CreateRubricFromFeedbackRequest":{"properties":{"name":{"type":"string","maxLength":200,"title":"Name"},"feedback_items":{"items":{"$ref":"#/components/schemas/FeedbackItem"},"type":"array","maxItems":20,"minItems":1,"title":"Feedback Items"}},"type":"object","required":["name","feedback_items"],"title":"CreateRubricFromFeedbackRequest"},"CustomProcessorAccessResponse":{"properties":{"has_access":{"type":"boolean","title":"Has Access","description":"Whether the user's team can access custom processors"},"can_create":{"type":"boolean","title":"Can Create","description":"Whether the user can create new custom processors (superuser only)","default":false},"can_iterate":{"type":"boolean","title":"Can Iterate","description":"Whether the user can iterate on existing custom processors (superuser or team override)","default":false}},"type":"object","required":["has_access"],"title":"CustomProcessorAccessResponse","description":"Response for processor access check."},"CustomProcessorCreationAllowanceResponse":{"properties":{"creations_this_cycle":{"type":"integer","title":"Creations This Cycle","description":"Successful NEW-processor creations counted this billing month"},"limit":{"type":"integer","title":"Limit","description":"Included creations per month for the team's plan (or per-team override)"},"at_cap":{"type":"boolean","title":"At Cap","description":"True when a hard-cap plan has used all its included creations (next creation is blocked with 402)"},"will_incur_fee":{"type":"boolean","title":"Will Incur Fee","description":"True when the next creation would incur the one-time overage fee (Team)"},"fee_cents":{"type":"integer","title":"Fee Cents","description":"The one-time fee in cents the next creation would incur (0 when within the allowance or hard-capped)"},"overage_unit_fee_cents":{"type":"integer","title":"Overage Unit Fee Cents","description":"The plan's per-extra-creation fee in cents regardless of current count (0 for hard-cap plans) — lets the UI state the overage policy up front","default":0},"plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan","description":"The plan whose limits apply (the team's active API plan, else 'free')"},"cycle_resets_at":{"type":"string","title":"Cycle Resets At","description":"ISO timestamp when the monthly creation count resets"}},"type":"object","required":["creations_this_cycle","limit","at_cap","will_incur_fee","fee_cents","cycle_resets_at"],"title":"CustomProcessorCreationAllowanceResponse","description":"2026 custom-processor CREATION allowance preview for the current team (§5).\n\nThe frontend uses this BEFORE creating a NEW processor to show the at-cap block (Free\n/ developer hard cap) or the one-time $5 confirmation (Team)."},"CustomProcessorInitialResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the request was accepted","default":true},"response_check_url":{"type":"string","title":"Response Check Url","description":"URL to poll for status and results. Once generation completes, the status response will include the processor_id for execution."}},"type":"object","required":["response_check_url"],"title":"CustomProcessorInitialResponse","description":"Initial response returned immediately after submitting a custom processor request."},"CustomProcessorListResponse":{"properties":{"pipelines":{"items":{"$ref":"#/components/schemas/ProcessorListItem"},"type":"array","title":"Pipelines","description":"List of custom processors"}},"type":"object","title":"CustomProcessorListResponse","description":"Response schema for listing all custom processors."},"CustomProcessorStatusResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Current status: 'processing', 'completed', or 'failed'"},"processor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processor Id","description":"Unique ID for executing this processor (format: cp_XXXXX). Only available when status='completed' and success=True."},"request_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Description","description":"Request description (from active version)"},"sent_at":{"type":"string","title":"Sent At","description":"ISO timestamp when request was submitted"},"success":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Success","description":"Whether generation succeeded"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message","description":"Error message if failed"},"runtime":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Runtime","description":"Execution time in seconds"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At","description":"ISO timestamp when request completed"},"pipeline_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Pipeline Params","description":"Active version pipeline parameters"},"pipeline_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Id","description":"Pipeline ID (pl_XXXXX) for the auto-created workspace pipeline. Only available when status='completed' and success=True."}},"type":"object","required":["status","sent_at"],"title":"CustomProcessorStatusResponse","description":"Response schema for checking the status of a custom processor request."},"CustomProcessorTransferResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the transfer was successful"},"processor_id":{"type":"string","title":"Processor Id","description":"The processor ID that was transferred"},"from_team_id":{"type":"integer","title":"From Team Id","description":"Team ID the processor was transferred from"},"to_team_id":{"type":"integer","title":"To Team Id","description":"Team ID the processor was transferred to"},"message":{"type":"string","title":"Message","description":"Success or error message"}},"type":"object","required":["success","processor_id","from_team_id","to_team_id","message"],"title":"CustomProcessorTransferResponse","description":"Response schema for transferring a custom processor to another team."},"CustomizerDescribeRequest":{"properties":{"messages":{"items":{"$ref":"#/components/schemas/ChatMessage"},"type":"array","maxItems":10,"title":"Messages"}},"type":"object","required":["messages"],"title":"CustomizerDescribeRequest","description":"Request for the customizer description chat endpoint."},"CustomizerDescribeResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Assistant's response text"},"proposed_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Description","description":"Non-null when the system has enough conviction to propose a processor description"}},"type":"object","required":["message"],"title":"CustomizerDescribeResponse","description":"Response from the customizer description chat endpoint."},"DeleteFileResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the deletion was successful","default":true},"message":{"type":"string","title":"Message","description":"Confirmation message"}},"type":"object","required":["message"],"title":"DeleteFileResponse","description":"Response after deleting a file."},"DiffDecisionRequest":{"properties":{"diff_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Diff Id","description":"The proposal being decided; stale ids are idempotent no-ops (plan §4a S3)."}},"type":"object","title":"DiffDecisionRequest"},"DiffDecisionResponse":{"properties":{"applied":{"type":"boolean","title":"Applied"},"stale":{"type":"boolean","title":"Stale"},"draft_contract":{"$ref":"#/components/schemas/ContractModel"},"draft_checks":{"items":{"$ref":"#/components/schemas/CheckSpecModel"},"type":"array","title":"Draft Checks"}},"type":"object","required":["applied","stale","draft_contract"],"title":"DiffDecisionResponse"},"DiscardDraftRequest":{"properties":{"version":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Version","description":"Version to revert to. If omitted, reverts to the active published version."}},"type":"object","title":"DiscardDraftRequest"},"DocRoleRequest":{"properties":{"role":{"type":"string","enum":["process","context"],"title":"Role"}},"type":"object","required":["role"],"title":"DocRoleRequest","description":"PATCH /sessions/{id}/docs/{doc_id} — flip one reference doc's role\n(D1 doc roles). Text docs are role-LOCKED to context (400)."},"DocsUploadResponse":{"properties":{"docs":{"items":{"$ref":"#/components/schemas/ReferenceDocResponse"},"type":"array","title":"Docs"}},"type":"object","required":["docs"],"title":"DocsUploadResponse"},"DraftEditRequest":{"properties":{"op":{"type":"string","enum":["goal","rule","schema","check_blocking"],"title":"Op"},"text":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}],"title":"Text","description":"New goal text (op=goal), rule text (op=rule), or schema source text (op=schema)."},"rule_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Id","description":"Required for op=rule."},"check_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Check Id","description":"Required for op=check_blocking."}},"type":"object","required":["op"],"title":"DraftEditRequest","description":"One direct draft edit (frontend SessionEngineApi: editGoal / editRule /\neditSchema / toggleCheckBlocking). S2 semantics: the edit applies\nimmediately, appends a user ``artifact_edit`` event, and ticks the brain\n— it never consumes the pending question/diff card."},"DraftEditResponse":{"properties":{"event":{"$ref":"#/components/schemas/SessionEventResponse"},"draft_contract":{"$ref":"#/components/schemas/ContractModel"},"draft_checks":{"items":{"$ref":"#/components/schemas/CheckSpecModel"},"type":"array","title":"Draft Checks"}},"type":"object","required":["event","draft_contract"],"title":"DraftEditResponse"},"EvalBatchRunListResponse":{"properties":{"batch_runs":{"items":{"$ref":"#/components/schemas/EvalBatchRunResponse"},"type":"array","title":"Batch Runs"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["batch_runs","total"],"title":"EvalBatchRunListResponse"},"EvalBatchRunResponse":{"properties":{"id":{"type":"integer","title":"Id"},"collection_id":{"type":"integer","title":"Collection Id"},"eval_rubric_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Eval Rubric Id"},"pipeline_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Id"},"pipeline_type":{"type":"string","title":"Pipeline Type"},"status":{"type":"string","title":"Status"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"total_files":{"type":"integer","title":"Total Files"},"completed_files":{"type":"integer","title":"Completed Files"},"avg_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Score"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"eval_rubric_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Eval Rubric Version"},"eval_definition_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Eval Definition Snapshot"},"pipeline_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pipeline Version"}},"type":"object","required":["id","collection_id","eval_rubric_id","pipeline_id","pipeline_type","status","started_at","completed_at","total_files","completed_files","avg_score","created"],"title":"EvalBatchRunResponse"},"EvalResultTrendPoint":{"properties":{"created":{"type":"string","format":"date-time","title":"Created"},"score":{"type":"number","title":"Score"},"pipeline_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pipeline Version"},"eval_rubric_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Eval Rubric Version"},"source":{"type":"string","title":"Source"},"apirequest_id":{"type":"integer","title":"Apirequest Id"},"eval_batch_run_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Eval Batch Run Id"},"n":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"N"},"lookup_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lookup Key"},"input_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Filename"},"pipeline_execution_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Execution Id"},"parse_quality":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Parse Quality"}},"type":"object","required":["created","score","pipeline_version","eval_rubric_version","source","apirequest_id","eval_batch_run_id"],"title":"EvalResultTrendPoint","description":"One scored execution's per-step fact — or, for kind=\"parse_quality\"\nseries, one DAILY bucket (created = day at noon UTC, score = day average,\nn = runs in the bucket, apirequest_id = 0 sentinel)."},"EvalResultTrendResponse":{"properties":{"series":{"items":{"$ref":"#/components/schemas/EvalResultTrendSeries"},"type":"array","title":"Series"},"total_points":{"type":"integer","title":"Total Points"}},"type":"object","required":["series","total_points"],"title":"EvalResultTrendResponse"},"EvalResultTrendSeries":{"properties":{"kind":{"type":"string","title":"Kind","default":"rubric"},"source_step_type":{"type":"string","title":"Source Step Type"},"eval_rubric_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Eval Rubric Id"},"rubric_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rubric Name"},"points":{"items":{"$ref":"#/components/schemas/EvalResultTrendPoint"},"type":"array","title":"Points"}},"type":"object","required":["source_step_type","eval_rubric_id","rubric_name","points"],"title":"EvalResultTrendSeries","description":"One line on the chart: a (step, rubric) pair's per-run points, or a\nparse-quality series of daily buckets. ``kind`` keeps the grains from\never blending client-side."},"EvalRubricListResponse":{"properties":{"rubrics":{"items":{"$ref":"#/components/schemas/EvalRubricResponse"},"type":"array","title":"Rubrics"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["rubrics","total"],"title":"EvalRubricListResponse"},"EvalRubricResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"eval_definition":{"additionalProperties":true,"type":"object","title":"Eval Definition"},"source":{"type":"string","title":"Source"},"source_processor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Processor Id"},"archived":{"type":"boolean","title":"Archived"},"version":{"type":"integer","title":"Version"},"version_history":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Version History"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated"}},"type":"object","required":["id","name","description","eval_definition","source","source_processor_id","archived","version","created","updated"],"title":"EvalRubricResponse"},"EvaluationResults":{"properties":{"eval_definition_name":{"type":"string","title":"Eval Definition Name","description":"Name of the evaluation definition"},"evaluations":{"items":{"$ref":"#/components/schemas/EvaluationRuleSummary"},"type":"array","title":"Evaluations","description":"Per-rule evaluation summaries"},"total_items_evaluated":{"type":"integer","title":"Total Items Evaluated","description":"Total number of items evaluated across all rules"}},"type":"object","required":["eval_definition_name","evaluations","total_items_evaluated"],"title":"EvaluationResults","description":"Container for evaluation results."},"EvaluationRuleSummary":{"properties":{"name":{"type":"string","title":"Name","description":"Name of the evaluation rule"},"type":{"type":"string","title":"Type","description":"Type of evaluation: block, page, or document"},"rule_score":{"type":"number","title":"Rule Score","description":"Aggregated score for this rule (0-5)"},"items_evaluated":{"type":"integer","title":"Items Evaluated","description":"Number of items evaluated"},"individual_results":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Individual Results","description":"Bottom-k lowest scoring individual results with score, feedback, block_id, page_id, block_type"}},"type":"object","required":["name","type","rule_score","items_evaluated"],"title":"EvaluationRuleSummary","description":"Summary of a single evaluation rule result."},"ExtractionGenSchemasRequest":{"properties":{"checkpoint_id":{"type":"string","title":"Checkpoint Id"},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url"},"processing_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processing Location","description":"Optional residency region override (e.g. us, eu). When provided, use file_url or direct-upload; multipart uploads are rejected. When omitted, the request uses the team's configured residency and profile."},"model_override_settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Model Override Settings","include_in_schema":false}},"type":"object","required":["checkpoint_id"],"title":"ExtractionGenSchemasRequest"},"ExtractionGenSchemasResponse":{"properties":{"success":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Success"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"suggestions":{"anyOf":[{"$ref":"#/components/schemas/GenSchema"},{"type":"null"}]},"status":{"type":"string","title":"Status"},"result_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Url","description":"Signed URL for downloading the completed result JSON when direct result download is required."},"expires_in":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires In","description":"Number of seconds until result_url expires."},"page_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Count"},"total_cost":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Cost"}},"type":"object","required":["status"],"title":"ExtractionGenSchemasResponse"},"ExtractionSchemaListResponse":{"properties":{"schemas":{"items":{"$ref":"#/components/schemas/ExtractionSchemaResponse"},"type":"array","title":"Schemas"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["schemas","total"],"title":"ExtractionSchemaListResponse"},"ExtractionSchemaResponse":{"properties":{"id":{"type":"integer","title":"Id"},"schema_id":{"type":"string","title":"Schema Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"schema_json":{"additionalProperties":true,"type":"object","title":"Schema Json"},"version":{"type":"integer","title":"Version"},"version_history":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Version History"},"archived":{"type":"boolean","title":"Archived"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated"}},"type":"object","required":["id","schema_id","name","description","schema_json","version","archived","created","updated"],"title":"ExtractionSchemaResponse"},"FeedbackItem":{"properties":{"block_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Block Id"},"block_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Block Type"},"page_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Number"},"content_snippet":{"type":"string","title":"Content Snippet","description":"The block's current markdown/text"},"feedback":{"type":"string","title":"Feedback","description":"User's feedback text"},"expected_output":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Output"},"feedback_type":{"type":"string","enum":["incorrect","missing","formatting","other"],"title":"Feedback Type","description":"One of: incorrect, missing, formatting, other"}},"type":"object","required":["content_snippet","feedback","feedback_type"],"title":"FeedbackItem"},"FieldResultResponse":{"properties":{"path":{"type":"string","title":"Path","description":"JSON pointer, e.g. /analytes/0/value."},"label":{"type":"string","title":"Label"},"value":{"type":"string","title":"Value"},"verification":{"type":"string","enum":["PASS","FAIL_FIX","FAIL_CITATIONS","FAIL_UNRESOLVABLE","ITEMS_MISSING","PENDING"],"title":"Verification","default":"PENDING"},"reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning"},"citations":{"items":{"$ref":"#/components/schemas/Locator"},"type":"array","title":"Citations"}},"type":"object","required":["path","label","value"],"title":"FieldResultResponse","description":"One extracted field (json shape): value + SIX-state verification +\ncitation Locators (frontend FieldResult). PENDING until the run carried\nthe extraction-grounding verifier (plan A5 provenance honesty)."},"FileDownloadResponse":{"properties":{"download_url":{"type":"string","title":"Download Url","description":"Presigned URL for downloading the file"},"expires_in":{"type":"integer","title":"Expires In","description":"URL expiry time in seconds"},"file_id":{"type":"integer","title":"File Id","description":"File ID"},"original_filename":{"type":"string","title":"Original Filename","description":"Original filename"}},"type":"object","required":["download_url","expires_in","file_id","original_filename"],"title":"FileDownloadResponse","description":"Response with presigned download URL."},"FileMetadataResponse":{"properties":{"file_id":{"type":"integer","title":"File Id","description":"Unique file ID"},"original_filename":{"type":"string","title":"Original Filename","description":"Original filename"},"content_type":{"type":"string","title":"Content Type","description":"MIME type"},"file_size":{"type":"integer","title":"File Size","description":"File size in bytes"},"upload_status":{"type":"string","title":"Upload Status","description":"Upload status: pending, completed, or failed"},"created":{"type":"string","format":"date-time","title":"Created","description":"Upload timestamp"},"reference":{"type":"string","title":"Reference","description":"File reference in datalab://file-{id} format"}},"type":"object","required":["file_id","original_filename","content_type","file_size","upload_status","created","reference"],"title":"FileMetadataResponse","description":"Response with file metadata."},"FlagCreateRequest":{"properties":{"run_id":{"type":"integer","title":"Run Id"},"locator":{"$ref":"#/components/schemas/Locator"},"note":{"type":"string","maxLength":4000,"minLength":1,"title":"Note"}},"type":"object","required":["run_id","locator","note"],"title":"FlagCreateRequest"},"FlagListResponse":{"properties":{"flags":{"items":{"$ref":"#/components/schemas/FlagResponse"},"type":"array","title":"Flags"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["flags","total"],"title":"FlagListResponse"},"FlagResponse":{"properties":{"id":{"type":"integer","title":"Id"},"run_id":{"type":"integer","title":"Run Id"},"processor_id":{"type":"string","title":"Processor Id","description":"Public processor id (slug)."},"locator":{"$ref":"#/components/schemas/Locator"},"note":{"type":"string","title":"Note"},"status":{"type":"string","enum":["open","resolved"],"title":"Status"},"addressed_in_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Addressed In Version"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"}},"type":"object","required":["id","run_id","processor_id","locator","note","status"],"title":"FlagResponse"},"FormFillingFinalResponse":{"properties":{"status":{"type":"string","title":"Status","description":"The status of the request. Should be 'complete' when the request is done."},"result_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Url","description":"Signed URL for downloading the completed result JSON when direct result download is required."},"expires_in":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires In","description":"Number of seconds until result_url expires."},"success":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Success","description":"Whether form filling succeeded."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message if form filling failed."},"output_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Format","description":"Output format: 'pdf' or 'png'."},"output_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Base64","description":"Base64-encoded filled form (PDF or PNG)."},"fields_filled":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Fields Filled","description":"List of field keys that were successfully filled."},"fields_not_found":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Fields Not Found","description":"List of field keys that couldn't be matched to form fields."},"runtime":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Runtime","description":"Processing time in seconds."},"page_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Count","description":"Number of pages processed."},"cost_breakdown":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Cost Breakdown","description":"A dictionary of the cost breakdown of this request."},"versions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"},{"type":"null"}],"title":"Versions","description":"A dictionary of the versions of the libraries used in the request."}},"type":"object","required":["status"],"title":"FormFillingFinalResponse"},"GenSchema":{"properties":{"simple_schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Simple Schema"},"moderate_schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Moderate Schema"},"complex_schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Complex Schema"}},"type":"object","required":["simple_schema","moderate_schema","complex_schema"],"title":"GenSchema"},"GenerateFromDescriptionRequest":{"properties":{"description":{"type":"string","maxLength":5000,"title":"Description","description":"Plain-language description of what good output looks like"}},"type":"object","required":["description"],"title":"GenerateFromDescriptionRequest"},"GenerateFromDescriptionResponse":{"properties":{"eval_definition":{"additionalProperties":true,"type":"object","title":"Eval Definition"}},"type":"object","required":["eval_definition"],"title":"GenerateFromDescriptionResponse"},"GenerateFromFeedbackRequest":{"properties":{"feedback_items":{"items":{"$ref":"#/components/schemas/FeedbackItem"},"type":"array","maxItems":20,"minItems":1,"title":"Feedback Items"}},"type":"object","required":["feedback_items"],"title":"GenerateFromFeedbackRequest"},"GenerateFromFeedbackResponse":{"properties":{"eval_definition":{"additionalProperties":true,"type":"object","title":"Eval Definition"}},"type":"object","required":["eval_definition"],"title":"GenerateFromFeedbackResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status","description":"The status of the service. Should be 'ok' if the service is running correctly."}},"type":"object","required":["status"],"title":"HealthResponse"},"ImportFromPipelineRequest":{"properties":{"pipeline_id":{"type":"string","title":"Pipeline Id","description":"Custom pipeline ID (cp_XXXXX) to import eval_definition from"}},"type":"object","required":["pipeline_id"],"title":"ImportFromPipelineRequest"},"InitialResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the request was successful.","default":true},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"If the request was not successful, this will contain an error message."},"request_id":{"type":"string","title":"Request Id","description":"The ID of the request. This ID can be used to check the status of the request."},"request_check_url":{"type":"string","title":"Request Check Url","description":"The URL to check the status of the request and get results."},"versions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"},{"type":"null"}],"title":"Versions","description":"A dictionary of the versions of the libraries used in the request."},"checkpoint_reused":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Checkpoint Reused","description":"True when this run automatically reused a checkpoint from a previous run of the same file, so the conversion step is not re-billed. Absent/None otherwise."}},"type":"object","required":["request_id","request_check_url"],"title":"InitialResponse"},"KnobsModel":{"properties":{"max_turns":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Turns"},"timeout_s":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Timeout S"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},"type":"object","title":"KnobsModel"},"ListFilesResponse":{"properties":{"files":{"items":{"$ref":"#/components/schemas/FileMetadataResponse"},"type":"array","title":"Files","description":"List of uploaded files"},"total":{"type":"integer","title":"Total","description":"Total number of files"},"limit":{"type":"integer","title":"Limit","description":"Limit per page"},"offset":{"type":"integer","title":"Offset","description":"Current offset"}},"type":"object","required":["files","total","limit","offset"],"title":"ListFilesResponse","description":"Response with list of files."},"Locator":{"properties":{"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"doc_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Doc Name"},"surface":{"anyOf":[{"$ref":"#/components/schemas/LocatorSurface"},{"type":"null"}]},"block_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Block Id","description":"Path-shaped block id, production convention: /page/{n}/{type}/{i}."},"cell":{"anyOf":[{"$ref":"#/components/schemas/LocatorCell"},{"type":"null"}]},"word_range":{"anyOf":[{"prefixItems":[{"type":"integer"},{"type":"integer"}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Word Range"},"bbox":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"type":"null"}],"title":"Bbox"},"field_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field Path","description":"JSON pointer into the extraction result, e.g. /analytes/3/value."},"check_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Check Id"},"rule_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Id"},"segment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Segment"},"turn":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Turn"}},"additionalProperties":false,"type":"object","title":"Locator","description":"The canonical reference shape (frontend spec §3, backend plan A3).\n\nAnchor (run_id/doc_name) → source chain (surface → block_id →\ncell/word_range/bbox) → semantic axis (field_path | check_id | rule_id |\nsegment) → trace turn. Everything is optional; axes co-occur (an\nextraction citation = field_path + surface + block_id)."},"LocatorCell":{"properties":{"row":{"type":"integer","minimum":0.0,"title":"Row"},"col":{"type":"integer","minimum":0.0,"title":"Col"}},"additionalProperties":false,"type":"object","required":["row","col"],"title":"LocatorCell"},"LocatorSurface":{"properties":{"kind":{"type":"string","enum":["page","sheet"],"title":"Kind"},"label":{"type":"string","title":"Label","description":"Display label, e.g. 'page 3', 'Sheet1'."},"number":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Number","description":"0-indexed surface number at the API boundary (display convention is 1-based — that belongs in `label`)."}},"additionalProperties":false,"type":"object","required":["kind","label"],"title":"LocatorSurface","description":"Source surface: a page (pdf/image) or a sheet (spreadsheet)."},"MarkerFinalResponse":{"properties":{"status":{"type":"string","title":"Status","description":"The status of the request. Should be 'complete' when the request is done."},"result_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Url","description":"Signed URL for downloading the completed result JSON when direct result download is required."},"expires_in":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires In","description":"Number of seconds until result_url expires."},"output_format":{"type":"string","title":"Output Format","description":"The format of the output.  'markdown' or 'json'."},"chunks":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"},{"type":"null"}],"title":"Chunks","description":"The output in chunks format.  The top-level key 'blocks' contains a list of blocks from the document with metadata."},"json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"},{"type":"null"}],"title":"Json","description":"The JSON representation of the PDF if the output format is 'json'."},"markdown":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Markdown","description":"The markdown representation of the PDF if the output format is 'markdown'."},"html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Html","description":"The HTML representation of the PDF if the output format is 'html'."},"extraction_schema_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extraction Schema Json","description":"The output of a marker extraction request containing the filled in extraction schema."},"extraction_score_average":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Extraction Score Average","description":"Average confidence score (1-5) across all extracted fields, when scoring is applied."},"extraction_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extraction Mode","description":"The extraction mode used for this request: 'turbo', 'fast', 'balanced', or 'accurate'."},"segmentation_results":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Segmentation Results","description":"Results of document segmentation showing page ranges for each identified segment. Contains segment names, page ranges, and confidence levels (high/medium/low)."},"segmentation_schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Segmentation Schema","description":"The segmentation schema that was applied to this request, echoed back for reference."},"images":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Images","description":"A dictionary of the images in the PDF, where the key is the filename for the image, and the value is the base64 encoded image.  Images should be stored in the same directory as the PDF."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"A dictionary of metadata about the PDF and the conversion process."},"success":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Success","description":"Whether the conversion was successful."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"If the conversion was not successful, this will contain an error message."},"parse_quality_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Parse Quality Score","description":"The parse quality score of the output, if available."},"page_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Count","description":"The number of pages that were converted."},"total_cost":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Cost","description":"The total cost of the conversion.","deprecated":true},"cost_breakdown":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Cost Breakdown","description":"A dictionary of the cost breakdown of this request. Includes the list cost without discounts and final cost to clients after any discounts (e.g. for opting into model training)."},"runtime":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Runtime","description":"The runtime of the conversion."},"checkpoint_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkpoint Id","description":"The ID of the checkpoint that was created for this conversion.  This can be used to retrieve the checkpoint later."},"versions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"},{"type":"null"}],"title":"Versions","description":"A dictionary of the versions of the libraries used in the request."},"evaluation":{"anyOf":[{"$ref":"#/components/schemas/EvaluationResults"},{"type":"null"}],"description":"Evaluation results, when available, for requests that run evaluation. Contains per-rule scores for validating custom pipeline behavior."}},"type":"object","required":["status"],"title":"MarkerFinalResponse"},"OCRFinalResponse":{"properties":{"status":{"type":"string","title":"Status","description":"The status of the request. Should be 'complete' when the request is done."},"result_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Url","description":"Signed URL for downloading the completed result JSON when direct result download is required."},"expires_in":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires In","description":"Number of seconds until result_url expires."},"pages":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Pages","description":"The detected OCR text on each page.  Each page will have the bboxes and detected text within each line."},"success":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Success","description":"Whether the conversion was successful."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"If the conversion was not successful, this will contain an error message."},"page_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Count","description":"The number of pages that had ocr run on them."},"total_cost":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Cost","description":"The total cost of the conversion.","deprecated":true},"cost_breakdown":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Cost Breakdown","description":"A dictionary of the cost breakdown of this request. Includes the list cost without discounts and final cost to clients after any discounts (e.g. for opting into model training)."},"versions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"},{"type":"null"}],"title":"Versions","description":"A dictionary of the versions of the libraries used in the request."}},"type":"object","required":["status"],"title":"OCRFinalResponse"},"PipelineExecutionListResponse":{"properties":{"executions":{"items":{"$ref":"#/components/schemas/PipelineExecutionResponse"},"type":"array","title":"Executions"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["executions","total"],"title":"PipelineExecutionListResponse"},"PipelineExecutionResponse":{"properties":{"execution_id":{"type":"string","title":"Execution Id"},"pipeline_id":{"type":"string","title":"Pipeline Id"},"pipeline_version":{"type":"integer","title":"Pipeline Version"},"status":{"type":"string","title":"Status"},"steps":{"items":{"$ref":"#/components/schemas/PipelineExecutionStepResponse"},"type":"array","title":"Steps"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"config_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config Snapshot"},"input_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Config"},"rate_breakdown":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Rate Breakdown"}},"type":"object","required":["execution_id","pipeline_id","pipeline_version","status","steps"],"title":"PipelineExecutionResponse"},"PipelineExecutionStepResponse":{"properties":{"step_index":{"type":"integer","title":"Step Index"},"step_type":{"type":"string","title":"Step Type"},"status":{"type":"string","title":"Status"},"lookup_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lookup Key"},"result_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Url"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"source_step_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Step Type"},"checkpoint_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkpoint Id"}},"type":"object","required":["step_index","step_type","status"],"title":"PipelineExecutionStepResponse"},"PipelineListResponse":{"properties":{"pipelines":{"items":{"$ref":"#/components/schemas/PipelineResponse"},"type":"array","title":"Pipelines"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["pipelines","total"],"title":"PipelineListResponse"},"PipelineReference":{"properties":{"pipeline_id":{"type":"string","title":"Pipeline Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"}},"type":"object","required":["pipeline_id"],"title":"PipelineReference","description":"A pipeline that references a custom processor."},"PipelineResponse":{"properties":{"id":{"type":"integer","title":"Id"},"pipeline_id":{"type":"string","title":"Pipeline Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"steps":{"items":{},"type":"array","title":"Steps"},"is_saved":{"type":"boolean","title":"Is Saved"},"archived":{"type":"boolean","title":"Archived"},"active_version":{"type":"integer","title":"Active Version"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated"},"reused":{"type":"boolean","title":"Reused","default":false}},"type":"object","required":["id","pipeline_id","name","steps","is_saved","archived","active_version","created","updated"],"title":"PipelineResponse"},"PipelineStep":{"properties":{"type":{"type":"string","enum":["convert","extract","segment","custom","fill"],"title":"Type","description":"The type of processing step"},"settings":{"additionalProperties":true,"type":"object","title":"Settings","description":"Step-specific executor settings. For extract steps, includes 'page_schema' (JSON string, same format as the /extract endpoint's page_schema). For segment steps, includes 'segmentation_schema' (JSON string, same format as the /segment endpoint's segmentation_schema). These flow directly to the executor via config.update(settings)."},"custom_processor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Processor Id","description":"Custom processor ID (cp_XXXXX) for custom steps"},"eval_rubric_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Eval Rubric Id","description":"Eval rubric ID to score this step's output against"},"pending_check_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pending Check Url","description":"URL to poll for processor creation status (temporary, cleared on completion)"},"pending_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pending Name","description":"Display name while processor is generating (temporary, cleared on completion)"}},"type":"object","required":["type"],"title":"PipelineStep"},"PipelineVersionListResponse":{"properties":{"versions":{"items":{"$ref":"#/components/schemas/PipelineVersionResponse"},"type":"array","title":"Versions"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["versions","total"],"title":"PipelineVersionListResponse"},"PipelineVersionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"version":{"type":"integer","title":"Version"},"steps":{"items":{},"type":"array","title":"Steps"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"}},"type":"object","required":["id","version","steps","description","created"],"title":"PipelineVersionResponse"},"PipelinesUsingProcessorResponse":{"properties":{"pipelines":{"items":{"$ref":"#/components/schemas/PipelineReference"},"type":"array","title":"Pipelines"}},"type":"object","title":"PipelinesUsingProcessorResponse","description":"Response listing pipelines that use a given custom processor."},"ProcessorDetailResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Public processor id (slug) used in processor=<id>@<version>."},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"origin":{"type":"string","enum":["platform","team"],"title":"Origin"},"base_profile":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Profile"},"output_shape":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Shape","description":"Output shape of the latest version, if any."},"latest_version":{"anyOf":[{"$ref":"#/components/schemas/VersionResponse"},{"type":"null"}]},"published_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published Version","description":"Label of the newest published version, if any."},"run_count":{"type":"integer","title":"Run Count","description":"The caller team's total run count across BOTH planes (kept as the pre-split total for compatibility).","default":0},"execution_run_count":{"type":"integer","title":"Execution Run Count","description":"The caller team's execution-plane run count.","default":0},"design_run_count":{"type":"integer","title":"Design Run Count","description":"The caller team's design-plane run count.","default":0},"pass_rate":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Pass Rate","description":"Fraction of the caller team's terminal execution-plane runs that passed, over the newest 50 terminal execution runs (the window matches the UI's hydrated runs page). A run passes when its status is 'done' — by the error taxonomy a finished run with a failing BLOCKING check terminalizes as a contract error, so 'done' means every blocking check passed. None (never fabricated) when the team has no terminal execution runs."},"open_flag_count":{"type":"integer","title":"Open Flag Count","default":0},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated"},"versions":{"items":{"$ref":"#/components/schemas/VersionResponse"},"type":"array","title":"Versions"}},"type":"object","required":["id","name","description","origin"],"title":"ProcessorDetailResponse"},"ProcessorListItem":{"properties":{"processor_id":{"type":"string","title":"Processor Id","description":"Unique processor ID (format: cp_XXXXX)"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Short display name for the processor"},"request_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Description","description":"Description from the active version"},"status":{"type":"string","title":"Status","description":"Current status: 'processing', 'completed', or 'failed'"},"success":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Success","description":"Whether generation succeeded (null if still processing)"},"created_at":{"type":"string","title":"Created At","description":"ISO timestamp when processor was created"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At","description":"ISO timestamp when processor completed (null if still processing)"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message","description":"Error message if failed"},"active_version":{"type":"integer","title":"Active Version","description":"Currently active version number (0 = no version yet)","default":0},"max_version":{"type":"integer","title":"Max Version","description":"Highest version number that exists for this processor","default":0},"iteration_in_progress":{"type":"boolean","title":"Iteration In Progress","description":"Whether an iteration is currently running","default":false},"is_template":{"type":"boolean","title":"Is Template","description":"Whether this processor is also published as a template","default":false},"eval_rubric_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Eval Rubric Id","description":"ID of linked eval rubric"},"pipeline_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Id","description":"Pipeline workspace ID (pl_XXXXX) for this processor"}},"type":"object","required":["processor_id","status","created_at"],"title":"ProcessorListItem","description":"Minimal processor information for list view."},"ProcessorListResponse":{"properties":{"processors":{"items":{"$ref":"#/components/schemas/ProcessorSummaryResponse"},"type":"array","title":"Processors"},"total":{"type":"integer","title":"Total"},"design_access":{"type":"boolean","title":"Design Access","description":"Whether the CALLER's team may use the DESIGN plane (sessions / start-from-scratch) — the closed-beta allowlist (access.has_design_plane_access) exposed PROACTIVELY so the UI can hide design affordances instead of dead-ending on the 403. The session routes' gate stays the enforcement.","default":true}},"type":"object","required":["processors","total"],"title":"ProcessorListResponse"},"ProcessorRenameRequest":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name","description":"New display name. Whitespace-stripped before validation; must be non-empty and fit the column (120 chars)."}},"additionalProperties":false,"type":"object","required":["name"],"title":"ProcessorRenameRequest","description":"``PATCH /processors/{id}`` body (W5 processor naming): the name is the\nONLY mutable field — ``extra='forbid'`` so nothing else rides along."},"ProcessorSummaryResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Public processor id (slug) used in processor=<id>@<version>."},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"origin":{"type":"string","enum":["platform","team"],"title":"Origin"},"base_profile":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Profile"},"output_shape":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Shape","description":"Output shape of the latest version, if any."},"latest_version":{"anyOf":[{"$ref":"#/components/schemas/VersionResponse"},{"type":"null"}]},"published_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published Version","description":"Label of the newest published version, if any."},"run_count":{"type":"integer","title":"Run Count","description":"The caller team's total run count across BOTH planes (kept as the pre-split total for compatibility).","default":0},"execution_run_count":{"type":"integer","title":"Execution Run Count","description":"The caller team's execution-plane run count.","default":0},"design_run_count":{"type":"integer","title":"Design Run Count","description":"The caller team's design-plane run count.","default":0},"pass_rate":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Pass Rate","description":"Fraction of the caller team's terminal execution-plane runs that passed, over the newest 50 terminal execution runs (the window matches the UI's hydrated runs page). A run passes when its status is 'done' — by the error taxonomy a finished run with a failing BLOCKING check terminalizes as a contract error, so 'done' means every blocking check passed. None (never fabricated) when the team has no terminal execution runs."},"open_flag_count":{"type":"integer","title":"Open Flag Count","default":0},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated"}},"type":"object","required":["id","name","description","origin"],"title":"ProcessorSummaryResponse"},"ProcessorVersionDetailResponse":{"properties":{"version":{"type":"integer","title":"Version","description":"Version number"},"request_description":{"type":"string","title":"Request Description","description":"Description used for this version"},"pipeline_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Pipeline Params","description":"Full pipeline parameters including modifications[]"},"eval_definition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Eval Definition","description":"Evaluation definition including evaluations[]"},"runtime":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Runtime","description":"Execution time in seconds"},"created_at":{"type":"string","title":"Created At","description":"ISO timestamp when version was created"},"is_active":{"type":"boolean","title":"Is Active","description":"Whether this is the currently active version","default":false}},"type":"object","required":["version","request_description","created_at"],"title":"ProcessorVersionDetailResponse","description":"Detailed version data including pipeline_params and eval_definition."},"ProcessorVersionItem":{"properties":{"version":{"type":"integer","title":"Version","description":"Version number"},"request_description":{"type":"string","title":"Request Description","description":"Description used for this version"},"created_at":{"type":"string","title":"Created At","description":"ISO timestamp when version was created"},"runtime":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Runtime","description":"Execution time in seconds"},"is_active":{"type":"boolean","title":"Is Active","description":"Whether this is the currently active version","default":false}},"type":"object","required":["version","request_description","created_at"],"title":"ProcessorVersionItem","description":"Version information for a processor."},"ProcessorVersionListResponse":{"properties":{"versions":{"items":{"$ref":"#/components/schemas/ProcessorVersionItem"},"type":"array","title":"Versions","description":"List of processor versions"}},"type":"object","title":"ProcessorVersionListResponse","description":"Response schema for listing processor versions."},"PublishResponse":{"properties":{"version":{"$ref":"#/components/schemas/VersionResponse"},"processor_id":{"type":"string","title":"Processor Id","description":"Public processor slug."},"address":{"type":"string","title":"Address","description":"The execution address, e.g. processor=ap_x@1.0."}},"type":"object","required":["version","processor_id","address"],"title":"PublishResponse"},"QuoteParseConfigRequest":{"properties":{"mode":{"type":"string","enum":["fast","balanced","accurate"],"title":"Mode","description":"The EFFECTIVE convert mode. When Track Changes / Chart Understanding null the panel's mode picker, callers pass the remembered mode that still bills underneath.","default":"balanced"},"extras":{"items":{"type":"string"},"type":"array","title":"Extras","description":"Enabled priced extras, by billing key: track_changes, chart_understanding, infographic, word_bbox, table_cell_bboxes, list_item_bboxes."},"eval":{"type":"boolean","title":"Eval","description":"Quote the eval pass too (a rubric is attached). Adds an 'eval' line item; never moves the headline rate (eval bills only when a run scores).","default":false}},"type":"object","title":"QuoteParseConfigRequest","description":"An AD-HOC convert config to price — the authenticated playground's run\nreceipt (F1). No saved pipeline involved; this is the panel's current\nmode/extras/eval state, quoted at the team's real personal rates."},"ReferenceDocResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"page_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Count","description":"Surface count of `doc_kind` surfaces: pages for page docs, SHEETS for sheet docs (spreadsheets have no pages — sheet path, plan A7). Always None for text docs."},"doc_kind":{"anyOf":[{"type":"string","enum":["page","sheet","text"]},{"type":"null"}],"title":"Doc Kind","description":"What page_count counts (the locator surface vocabulary); 'text' = context-only .md/.txt doc. None = legacy row, page semantics."},"role":{"type":"string","enum":["process","context"],"title":"Role","description":"What the doc is FOR (D1): 'process' docs are exercised by commits/launches; 'context' docs feed the agent's context and never launch runs.","default":"process"},"role_locked":{"type":"boolean","title":"Role Locked","description":"True for text docs — they can only be context (no converter on the agent path covers text).","default":false},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"}},"type":"object","required":["id","name"],"title":"ReferenceDocResponse"},"RequestUploadUrlRequest":{"properties":{"filename":{"type":"string","title":"Filename","description":"Original filename (used for storage path and metadata)"},"content_type":{"type":"string","title":"Content Type","description":"MIME type of the file"},"processing_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processing Location","description":"Optional residency region override (e.g. us, eu). When provided, the direct-upload URL is issued for storage in that region."}},"type":"object","required":["filename","content_type"],"title":"RequestUploadUrlRequest","description":"Request to get a presigned upload URL."},"RequestUploadUrlResponse":{"properties":{"file_id":{"type":"integer","title":"File Id","description":"Unique file ID (use this to confirm upload)"},"upload_url":{"type":"string","title":"Upload Url","description":"Presigned PUT URL to upload the file to"},"expires_in":{"type":"integer","title":"Expires In","description":"URL expiry time in seconds","default":3600},"reference":{"type":"string","title":"Reference","description":"File reference in datalab://file-{id} format"}},"type":"object","required":["file_id","upload_url","reference"],"title":"RequestUploadUrlResponse","description":"Response with presigned PUT URL for direct storage upload."},"ReviewManifestResponse":{"properties":{"run":{"$ref":"#/components/schemas/RunResponse"},"pages":{"items":{"$ref":"#/components/schemas/RunPageResponse"},"type":"array","title":"Pages","description":"Page surfaces (pdf/image docs). EMPTY for spreadsheet runs — no page images exist for xlsx, matching production; the source pane is `sheets`."},"sheets":{"items":{"$ref":"#/components/schemas/RunSheetResponse"},"type":"array","title":"Sheets","description":"Sheet surfaces (spreadsheet docs): per-sheet block HTML + cell-range bounds for the sheet-tab source pane. EMPTY for page docs."},"output":{"$ref":"#/components/schemas/RunOutputResponse"},"trace":{"items":{"$ref":"#/components/schemas/TraceStepResponse"},"type":"array","title":"Trace"},"doc_aliases":{"additionalProperties":{"type":"string"},"type":"object","title":"Doc Aliases","description":"Workspace filename → original input filename. The sandbox anonymizes the staged document to <uuid>.<ext>; this maps those names back for display."}},"type":"object","required":["run","output"],"title":"ReviewManifestResponse","description":"Everything the full run review renders (frontend spec §4): chrome (the\nrun card), the source surfaces (pages OR sheets — never both), the\nper-shape result pane payload, and the projected trace.\n\nDeliberately NOT here: any listing of the run's workspace files. The\nreview shows the run's own output and derived views of it; raw workspace\nbrowsing would put storage paths in front of a customer."},"RuleFragmentModel":{"properties":{"id":{"type":"string","title":"Id"},"text":{"type":"string","title":"Text"},"source":{"type":"string","enum":["base","agent","user"],"title":"Source","default":"user"}},"type":"object","required":["id","text"],"title":"RuleFragmentModel"},"RunErrorResponse":{"properties":{"kind":{"type":"string","enum":["input","system","contract"],"title":"Kind"},"message":{"type":"string","title":"Message"}},"type":"object","required":["kind","message"],"title":"RunErrorResponse"},"RunListResponse":{"properties":{"runs":{"items":{"$ref":"#/components/schemas/RunResponse"},"type":"array","title":"Runs"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["runs","total"],"title":"RunListResponse"},"RunOutputResponse":{"properties":{"shape":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shape","description":"The run's output shape (parse|json|jats|wcag|segment)."},"markdown":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Markdown"},"html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Html"},"blocks":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Blocks","description":"The chunks block index (UI name: 'blocks') — flat block list with ids/bboxes for locator resolution."},"json_tree":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Json Tree","description":"The hierarchical blocks TREE (the parse result's `json` view — pages → nested blocks). Complements `blocks` (the flat chunks index): the review's blocks tab renders this; locator resolution keys on chunks."},"extraction":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extraction","description":"The filled schema (json shape)."},"fields":{"anyOf":[{"items":{"$ref":"#/components/schemas/FieldResultResponse"},"type":"array"},{"type":"null"}],"title":"Fields"},"segments":{"anyOf":[{"items":{"$ref":"#/components/schemas/SegmentSpanResponse"},"type":"array"},{"type":"null"}],"title":"Segments"},"verdict":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verdict","description":"Typed conformance verdict for artifact-family shapes."},"jats_xml":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jats Xml","description":"The JATS article XML (jats shape)."},"accessible_pdf":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accessible Pdf","description":"The tagged accessible PDF as base64 (wcag shape)."},"images":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Images","description":"Run images as base64, keyed by the name the output references. Only present when the run requested them."}},"type":"object","title":"RunOutputResponse","description":"Per-shape result payloads for the review's result pane (frontend\nRunOutput). Only the fields the run's shape produced are populated."},"RunPageResponse":{"properties":{"index":{"type":"integer","minimum":0.0,"title":"Index","description":"0-based page index."},"thumbnail_url":{"type":"string","title":"Thumbnail Url","description":"Authenticated thumbnail URL for this page (the /thumbnails endpoint scoped to one page). NOTE: it returns ThumbnailResponse JSON — {thumbnails: [<base64 image>], success, error} — not raw image bytes; the adapter decodes thumbnails[0]. This is exactly what the existing PipelineWorkspace consumer expects."}},"type":"object","required":["index","thumbnail_url"],"title":"RunPageResponse","description":"One source page of the full review. Served by the EXISTING thumbnail\nmachinery (same team-checked endpoint PipelineWorkspace uses); clients\nfetch lazily/batched."},"RunResponse":{"properties":{"id":{"type":"integer","title":"Id"},"processor_id":{"type":"string","title":"Processor Id","description":"Public processor id (slug)."},"version":{"type":"string","title":"Version","description":"Pinned version label."},"plane":{"type":"string","enum":["design","execution"],"title":"Plane"},"status":{"type":"string","enum":["queued","running","done","error"],"title":"Status"},"error":{"anyOf":[{"$ref":"#/components/schemas/RunErrorResponse"},{"type":"null"}]},"doc_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Doc Name"},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id","description":"APIRequest lookup key for the underlying inference request."},"scorecard":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Scorecard"},"check_results":{"items":{"$ref":"#/components/schemas/CheckResultResponse"},"type":"array","title":"Check Results"},"flag_ids":{"items":{"type":"integer"},"type":"array","title":"Flag Ids"},"token_usage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Token Usage"},"turns":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Turns","description":"Agent-loop turns the run took (the substrate result's turn count, persisted at ingest). None for runs that never reached the loop or predate the column."},"started":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started"},"finished":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"}},"type":"object","required":["id","processor_id","version","plane","status"],"title":"RunResponse","description":"RunCard-shaped (snake_case): the drawer/board consume this."},"RunSheetResponse":{"properties":{"index":{"type":"integer","minimum":0.0,"title":"Index","description":"0-based sheet index (API boundary)."},"name":{"type":"string","title":"Name"},"rows":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Rows","description":"Used row extent of the sheet."},"cols":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Cols","description":"Used column extent of the sheet."},"cells":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Cells","description":"Non-empty cell count."},"blocks":{"items":{"$ref":"#/components/schemas/SheetBlockResponse"},"type":"array","title":"Blocks"}},"type":"object","required":["index","name"],"title":"RunSheetResponse","description":"One sheet of a SPREADSHEET run's source document (the sheet-mode\nreview: sheet tabs instead of page thumbnails — spreadsheets have NO page\nimages, matching production)."},"SavePipelineRequest":{"properties":{"name":{"type":"string","maxLength":120,"title":"Name","description":"Display name for the saved pipeline","default":""}},"type":"object","title":"SavePipelineRequest"},"SeedPipelineRequest":{"properties":{"name":{"type":"string","maxLength":120,"title":"Name","description":"Display name for the processor"},"request_description":{"type":"string","title":"Request Description","description":"Description of what this processor does"},"pipeline_params":{"additionalProperties":true,"type":"object","title":"Pipeline Params","description":"Pipeline parameters (must contain 'modifications' array)"},"original_params":{"additionalProperties":true,"type":"object","title":"Original Params","description":"Base pipeline parameters"},"eval_definition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Eval Definition","description":"Evaluation definition for running evals against this processor"},"processor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processor Id","description":"Optional fixed processor ID (default: auto-generated)"},"template_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Slug","description":"URL-friendly slug to create this processor as a template"},"template_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Description","description":"Public-facing template description"},"template_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Category","description":"Template category (e.g. Research, Business)"},"display_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Display Config","description":"Display configuration for the template UI (recommended_view, changes_description, highlight_css)"}},"type":"object","required":["name","request_description","pipeline_params"],"title":"SeedPipelineRequest","description":"Request body for seeding a custom processor directly (no agent)."},"SeedPipelineResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"processor_id":{"type":"string","title":"Processor Id"}},"type":"object","required":["success","processor_id"],"title":"SeedPipelineResponse","description":"Response after seeding a custom processor."},"SegmentSpanResponse":{"properties":{"name":{"type":"string","title":"Name"},"pages":{"items":{"type":"integer"},"type":"array","minItems":1,"title":"Pages","description":"0-indexed pages this segment claims."},"confidence":{"anyOf":[{"type":"string","enum":["high","medium","low"]},{"type":"null"}],"title":"Confidence"}},"type":"object","required":["name","pages"],"title":"SegmentSpanResponse","description":"Production /segment sense: one segment of a file split into documents\n— ``{name, pages[], confidence}`` (supports non-contiguous segments).\nPages 0-indexed at the API boundary."},"SessionAnswerRequest":{"properties":{"option_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Option Id"},"free_text":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}],"title":"Free Text"}},"type":"object","title":"SessionAnswerRequest"},"SessionCreateRequest":{"properties":{"template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template","description":"Template id: picky-tables | extract-schema | jats-fork | wcag | segment."},"processor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processor Id","description":"Public processor id (slug) to reopen a design session on."},"flag_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Flag Id","description":"Optional flag to seed the reopened session's context (only with processor_id)."},"title":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Title"}},"type":"object","title":"SessionCreateRequest","description":"Start a session from a template, reopen one on a processor, or —\nwith NEITHER — start a blank session (empty draft, grounding welcome).\nAt most one of template / processor_id."},"SessionEventResponse":{"properties":{"id":{"type":"integer","title":"Id"},"seq":{"type":"integer","title":"Seq"},"ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ts"},"kind":{"type":"string","title":"Kind"},"actor":{"type":"string","enum":["user","agent","system"],"title":"Actor"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text","description":"Convenience copy of payload.text when present."},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Refs"}},"type":"object","required":["id","seq","kind","actor"],"title":"SessionEventResponse"},"SessionJobResponse":{"properties":{"id":{"type":"integer","title":"Id","description":"KIND-SCOPED row id: the agentrun id for kind=doc_run, the agentverify id for kind=verify_only — the two id spaces overlap, so consumers must key on (kind, id), never id alone. run_id always names the agentrun (the TARGET run for verify jobs); run refreshers must guard on kind === 'doc_run'."},"kind":{"type":"string","enum":["parse","doc_run","verify_only","optimize"],"title":"Kind","default":"doc_run"},"label":{"type":"string","title":"Label"},"pinned_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pinned Version"},"status":{"type":"string","enum":["running","done","failed"],"title":"Status"},"run_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Run Id"},"doc_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Doc Name","description":"Input document name — served directly so mid-poll job rows never need a per-run hydration."},"started":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started"},"finished":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished"}},"type":"object","required":["id","label","status"],"title":"SessionJobResponse","description":"One design-plane job line (types.ts Job). ``status`` collapses the\nrow vocabulary: queued|running -> running, done -> done, error ->\nfailed."},"SessionListResponse":{"properties":{"sessions":{"items":{"$ref":"#/components/schemas/SessionSummaryResponse"},"type":"array","title":"Sessions"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["sessions","total"],"title":"SessionListResponse"},"SessionMessageRequest":{"properties":{"text":{"type":"string","maxLength":20000,"minLength":1,"title":"Text"},"mentions":{"items":{"type":"string"},"type":"array","title":"Mentions","description":"Reference-doc names the user @-mentioned; resolved server-side to refs (latest run per doc)."}},"type":"object","required":["text"],"title":"SessionMessageRequest"},"SessionRescoreResponse":{"properties":{"run_id":{"type":"integer","title":"Run Id","description":"The TARGET agentrun id."},"verify_id":{"type":"integer","title":"Verify Id","description":"The agentverify row id."},"status":{"type":"string","enum":["queued","running","done"],"title":"Status"},"counts":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Counts","description":"{pass, fail, warn, na} at check grain (None in flight)."},"results":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Results","description":"[{check_id, name, status, message, locators[]}] — the overlay rows, built with the pinned ingest's own helpers (None in flight)."},"checks_fingerprint":{"type":"string","title":"Checks Fingerprint","description":"Fingerprint of the check set this verify EXECUTED — compare against draft_checks_fingerprint; mismatch = stale overlay (blocking flips deliberately do NOT change fingerprints)."},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"}},"type":"object","required":["run_id","verify_id","status","checks_fingerprint"],"title":"SessionRescoreResponse","description":"One run's verify-only overlay (verify-only-plan §7): the run's LIVE\nverify when one exists (always the newest — one live per run), else its\nlatest DONE verify. Error rows never surface here (their narration lives\nin the transcript). Pinned scorecards are untouched — this is the \"draft\nre-check\" layer the run card renders as a second, visually-distinct row.\nStaleness is ONE client-side comparison: ``checks_fingerprint`` vs the\nsnapshot's ``draft_checks_fingerprint``."},"SessionSnapshotResponse":{"properties":{"session":{"$ref":"#/components/schemas/SessionStateResponse"},"events":{"items":{"$ref":"#/components/schemas/SessionEventResponse"},"type":"array","title":"Events"},"cursor":{"type":"integer","title":"Cursor","description":"Max event seq served; pass back as since_seq on the next poll."}},"type":"object","required":["session","cursor"],"title":"SessionSnapshotResponse"},"SessionStateResponse":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"type":"string","title":"Title"},"status":{"type":"string","enum":["active","committed","published","archived"],"title":"Status"},"phase":{"type":"string","enum":["grounding","drafting","exercising","iterating","ready","frozen"],"title":"Phase"},"template_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Id"},"base_profile":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Profile"},"processor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processor Id","description":"Public processor slug once the first commit ran."},"draft_contract":{"$ref":"#/components/schemas/ContractModel"},"draft_checks":{"items":{"$ref":"#/components/schemas/CheckSpecModel"},"type":"array","title":"Draft Checks"},"pending":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Pending","description":"The single pending card: {kind: question|diff, payload, event_seq}."},"docs":{"items":{"$ref":"#/components/schemas/ReferenceDocResponse"},"type":"array","title":"Docs"},"versions":{"items":{"$ref":"#/components/schemas/VersionResponse"},"type":"array","title":"Versions"},"jobs":{"items":{"$ref":"#/components/schemas/SessionJobResponse"},"type":"array","title":"Jobs"},"rescores":{"items":{"$ref":"#/components/schemas/SessionRescoreResponse"},"type":"array","title":"Rescores","description":"Verify-only overlays, one per run with a live or done verify (verify-only-plan §7). Additive-optional: absent/empty for sessions that never re-checked."},"draft_checks_fingerprint":{"type":"string","title":"Draft Checks Fingerprint","description":"The CURRENT draft's execution-relevant check fingerprint — rescores whose checks_fingerprint differs are STALE.","default":""},"token_usage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Token Usage"},"last_consumed_seq":{"type":"integer","title":"Last Consumed Seq","default":0},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated"}},"type":"object","required":["id","title","status","phase","draft_contract"],"title":"SessionStateResponse"},"SessionSummaryResponse":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"type":"string","title":"Title"},"status":{"type":"string","enum":["active","committed","published","archived"],"title":"Status"},"template_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Id"},"processor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processor Id"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated"}},"type":"object","required":["id","title","status"],"title":"SessionSummaryResponse"},"SetProcessorEvalRubricRequest":{"properties":{"eval_rubric_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Eval Rubric Id","description":"EvalRubric ID to link to this processor, or null to detach the current rubric"}},"type":"object","title":"SetProcessorEvalRubricRequest","description":"Request body for linking/detaching an eval rubric on a custom processor.\n\neval_rubric_id set  -> link that rubric (dual write: back-link + mirror the\n                       rubric's eval_definition into the ACTIVE version).\neval_rubric_id null -> detach (clear the back-link AND the active version's\n                       embedded eval_definition)."},"SheetBlockResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Locator-grammar block id: /page/{sheetIndex}/{Type}/{i} with the 0-based SHEET index in the numeric slot — what citations and flags reference."},"source_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Id","description":"The production spreadsheet render's id for the same block (/page/{SheetName}/{Type}/{i}) — matches ids inside output.json_tree."},"block_type":{"type":"string","title":"Block Type"},"html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Html","description":"The block's HTML, inline when small. None when large — fetch html_url instead (exactly one of html/html_url is set for table/text blocks; picture blocks have neither)."},"html_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Html Url","description":"Authenticated files-proxy URL for oversized block HTML (the workspace spill file)."},"bounds":{"anyOf":[{"$ref":"#/components/schemas/SheetCellBoundsResponse"},{"type":"null"}]}},"type":"object","required":["id","block_type"],"title":"SheetBlockResponse","description":"One block of a sheet (table / metadata text / picture)."},"SheetCellBoundsResponse":{"properties":{"min_row":{"type":"integer","minimum":0.0,"title":"Min Row"},"min_col":{"type":"integer","minimum":0.0,"title":"Min Col"},"max_row":{"type":"integer","minimum":0.0,"title":"Max Row"},"max_col":{"type":"integer","minimum":0.0,"title":"Max Col"}},"type":"object","required":["min_row","min_col","max_row","max_col"],"title":"SheetCellBoundsResponse","description":"A block's cell-range bounds on its sheet — 1-based Excel coordinates\n(the spreadsheet pipeline's own geometry: bbox = [min_col, min_row,\nmax_col, max_row])."},"StartBatchRunRequest":{"properties":{"collection_id":{"type":"integer","title":"Collection Id","description":"ID of the collection to run against"},"eval_rubric_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Eval Rubric Id","description":"ID of the eval rubric to use. Required for standard pipelines, optional for custom pipelines (falls back to pipeline's eval_definition)."},"pipeline_type":{"type":"string","enum":["convert","extract","segment"],"title":"Pipeline Type","description":"One of: convert, extract, segment","default":"convert"},"pipeline_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Id","description":"Optional custom pipeline ID"},"page_schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Schema","description":"Required when pipeline_type=extract"},"segmentation_schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Segmentation Schema","description":"Required when pipeline_type=segment"},"output_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Format","description":"Comma-separated output formats (e.g. 'markdown,json,html')"},"run_evals":{"type":"boolean","title":"Run Evals","description":"Set false to process the collection through a pipeline WITHOUT scoring (e.g. S3 output writeback) — no rubric is required and none runs. Requires pipeline_id; incompatible with eval_rubric_id.","default":true}},"type":"object","required":["collection_id"],"title":"StartBatchRunRequest"},"TableRecFinalResponse":{"properties":{"status":{"type":"string","title":"Status","description":"The status of the request. Should be 'complete' when the request is done."},"result_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Url","description":"Signed URL for downloading the completed result JSON when direct result download is required."},"expires_in":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires In","description":"Number of seconds until result_url expires."},"output_format":{"type":"string","title":"Output Format","description":"The format of the output.  'markdown' or 'json'."},"json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Json","description":"The JSON representation of the PDF if the output format is 'json'."},"markdown":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Markdown","description":"The markdown representation of the PDF if the output format is 'markdown'."},"html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Html","description":"The HTML representation of the PDF if the output format is 'html'."},"images":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Images","description":"A dictionary of the images in the PDF, where the key is the filename for the image, and the value is the base64 encoded image.  Images should be stored in the same directory as the PDF."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"A dictionary of metadata about the PDF and the conversion process."},"success":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Success","description":"Whether the conversion was successful."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"If the conversion was not successful, this will contain an error message."},"page_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Count","description":"The number of pages that were converted."},"total_cost":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Cost","description":"The total cost of the conversion.","deprecated":true},"cost_breakdown":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Cost Breakdown","description":"A dictionary of the cost breakdown of this request. Includes the list cost without discounts and final cost to clients after any discounts (e.g. for opting into model training)."},"versions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"},{"type":"null"}],"title":"Versions","description":"A dictionary of the versions of the libraries used in the request."}},"type":"object","required":["status"],"title":"TableRecFinalResponse"},"TemplateCloneResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"processor_id":{"type":"string","title":"Processor Id","description":"The new processor ID for the cloned processor"}},"type":"object","required":["success","processor_id"],"title":"TemplateCloneResponse","description":"Response for cloning a template."},"TemplateDetailResponse":{"properties":{"processor_id":{"type":"string","title":"Processor Id"},"slug":{"type":"string","title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"template_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Description"},"template_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Category"},"request_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Description"},"example_files":{"items":{"$ref":"#/components/schemas/TemplateExampleFile"},"type":"array","title":"Example Files"},"display_config":{"anyOf":[{"$ref":"#/components/schemas/TemplateDisplayConfig"},{"type":"null"}]}},"type":"object","required":["processor_id","slug"],"title":"TemplateDetailResponse","description":"Detailed template info."},"TemplateDisplayConfig":{"properties":{"recommended_view":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommended View","description":"Which viewer tab to auto-select: 'blocks', 'html_rendered', 'html_raw', 'markdown', 'json'"},"changes_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Changes Description","description":"Human-readable summary of what this template changes"},"highlight_css":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Highlight Css","description":"CSS rules to inject into the HTML viewer to highlight template changes"}},"type":"object","title":"TemplateDisplayConfig","description":"Configuration for how the UI should display template results."},"TemplateExampleFile":{"properties":{"filename":{"type":"string","title":"Filename"},"file_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Size"},"content_type":{"type":"string","title":"Content Type","default":"application/pdf"}},"type":"object","required":["filename"],"title":"TemplateExampleFile","description":"Example file info for a template."},"TemplateListItem":{"properties":{"processor_id":{"type":"string","title":"Processor Id"},"slug":{"type":"string","title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"template_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Description"},"template_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Category"},"example_files":{"items":{"$ref":"#/components/schemas/TemplateExampleFile"},"type":"array","title":"Example Files"},"display_config":{"anyOf":[{"$ref":"#/components/schemas/TemplateDisplayConfig"},{"type":"null"}]}},"type":"object","required":["processor_id","slug"],"title":"TemplateListItem","description":"Template summary for list view."},"TemplateListResponse":{"properties":{"templates":{"items":{"$ref":"#/components/schemas/TemplateListItem"},"type":"array","title":"Templates"}},"type":"object","title":"TemplateListResponse","description":"Response for listing templates."},"ThumbnailResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the request was successful.","default":true},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"If the request was not successful, this will contain an error message."},"thumbnails":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Thumbnails","description":"A list of base64 encoded thumbnail images. Images are in JPG format. Set to None when there is an error."}},"type":"object","required":["thumbnails"],"title":"ThumbnailResponse"},"TraceStepResponse":{"properties":{"at":{"type":"number","title":"At","description":"Seconds from run start."},"kind":{"type":"string","enum":["thought","tool","verify","finish"],"title":"Kind"},"label":{"type":"string","title":"Label"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"status":{"anyOf":[{"type":"string","enum":["pass","fail","warn","na"]},{"type":"null"}],"title":"Status"}},"type":"object","required":["at","kind","label"],"title":"TraceStepResponse","description":"One projected trace step (types.ts TraceStep) — a PROJECTION, never the\nraw trace.jsonl."},"TraceTailResponse":{"properties":{"events":{"items":{"$ref":"#/components/schemas/TraceStepResponse"},"type":"array","title":"Events"},"cursor":{"type":"integer","minimum":0.0,"title":"Cursor","description":"Next byte cursor (pass back on the next poll). Advances only past complete trace lines."},"done":{"type":"boolean","title":"Done","description":"True when the run row is terminal."}},"type":"object","required":["cursor","done"],"title":"TraceTailResponse","description":"Live-tail batch (plan A6): projected steps since the byte cursor."},"UpdateCollectionRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archived"}},"type":"object","title":"UpdateCollectionRequest"},"UpdateEvalRubricRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"eval_definition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Eval Definition"}},"type":"object","title":"UpdateEvalRubricRequest"},"UpdateExtractionSchemaRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"schema_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Schema Json"},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archived"},"create_new_version":{"type":"boolean","title":"Create New Version","description":"If true, creates a new version instead of updating the current one","default":false}},"type":"object","title":"UpdateExtractionSchemaRequest"},"UpdatePipelineRequest":{"properties":{"steps":{"anyOf":[{"items":{"$ref":"#/components/schemas/PipelineStep"},"type":"array","minItems":1},{"type":"null"}],"title":"Steps","description":"Ordered list of pipeline steps"}},"type":"object","title":"UpdatePipelineRequest"},"UpsertCollectionS3OutputRequest":{"properties":{"output_bucket":{"type":"string","maxLength":255,"minLength":1,"title":"Output Bucket"},"output_prefix":{"type":"string","maxLength":1024,"minLength":1,"title":"Output Prefix"},"output_region":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Output Region"},"output_credentials_type":{"anyOf":[{"type":"string","enum":["source","access_key"]},{"type":"null"}],"title":"Output Credentials Type"},"output_aws_access_key_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Output Aws Access Key Id"},"output_aws_secret_access_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Aws Secret Access Key"},"reuse_output_aws_secret_access_key":{"type":"boolean","title":"Reuse Output Aws Secret Access Key","default":false}},"type":"object","required":["output_bucket","output_prefix"],"title":"UpsertCollectionS3OutputRequest"},"UpsertCollectionS3SourceRequest":{"properties":{"bucket":{"type":"string","maxLength":255,"minLength":1,"title":"Bucket"},"prefix":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"Prefix"},"region":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Region"},"aws_access_key_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Aws Access Key Id"},"aws_secret_access_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aws Secret Access Key"},"reuse_aws_secret_access_key":{"type":"boolean","title":"Reuse Aws Secret Access Key","default":false}},"type":"object","required":["bucket"],"title":"UpsertCollectionS3SourceRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VersionResponse":{"properties":{"label":{"type":"string","title":"Label"},"state":{"type":"string","enum":["draft","committed","published"],"title":"State"},"contract":{"$ref":"#/components/schemas/ContractModel"},"checks":{"items":{"$ref":"#/components/schemas/CheckSpecModel"},"type":"array","title":"Checks"},"caused_by":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Caused By"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"}},"type":"object","required":["label","state","contract","checks"],"title":"VersionResponse"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}}},"servers":[{"url":"https://www.datalab.to","description":"Datalab API"}]}