{"openapi":"3.1.0","info":{"title":"Outerport API","description":"API documentation for the Outerport platform.","version":"0.1.0"},"paths":{"/api/v0/job-statuses":{"get":{"tags":["Job Status"],"summary":"List Job Statuses","operationId":"list_job_statuses_api_v0_job_statuses_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status: queued, processing, done, error, cancelled.","title":"Status"},"description":"Filter by status: queued, processing, done, error, cancelled."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free-text search over document name and error message.","title":"Q"},"description":"Free-text search over document name and error message."},{"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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatusListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/job-statuses/summary":{"get":{"tags":["Job Status"],"summary":"Get Job Status Summary","description":"Global per-status counts for the activity dashboard summary cards.","operationId":"get_job_status_summary_api_v0_job_statuses_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatusSummaryResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v0/job-statuses/{job_status_id}/page-runs":{"get":{"tags":["Job Status"],"summary":"Get Job Page Runs","description":"Per-page worker-task runs for a *document-processing* job.\n\nOnly meaningful for jobs that fan out into per-page ``process_page``\ntasks — returns an empty ``page_runs`` for other job kinds (single-task\nreprocesses, agent runs, etc.). Assembled live from Hyrex task runs plus\npersisted ``page_failure_logs`` / degraded components; not read from a\n\"pages\" table (there isn't one). Bounded by Hyrex retention.","operationId":"get_job_page_runs_api_v0_job_statuses__job_status_id__page_runs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_status_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Status Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobPageRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/job-statuses/{job_status_id}":{"get":{"tags":["Job Status"],"summary":"Get Job Status","operationId":"get_job_status_api_v0_job_statuses__job_status_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_status_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Status Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatusGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/job-statuses/{job_status_id}/cancel":{"post":{"tags":["Job Status"],"summary":"Cancel Job","description":"Cancel a running job","operationId":"cancel_job_api_v0_job_statuses__job_status_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_status_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Status Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatusGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/queue-status":{"get":{"tags":["Queue Status"],"summary":"Get Queue Status","operationId":"get_queue_status_api_v0_queue_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"tasks_offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Tasks Offset"}},{"name":"tasks_limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Tasks Limit"}},{"name":"workers_offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Workers Offset"}},{"name":"workers_limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Workers Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/documents/tags":{"get":{"tags":["Documents"],"summary":"Get all tags","description":"Retrieves a list of all tags from documents the user has access to.","operationId":"get_all_tags_api_v0_documents_tags_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TagResponse"},"type":"array","title":"Response Get All Tags Api V0 Documents Tags Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v0/documents/{document_id}/tags":{"post":{"tags":["Documents"],"summary":"Add a tag to a document","description":"Associates a tag with a document. Creates the tag if it doesn't exist.","operationId":"add_tag_to_document_api_api_v0_documents__document_id__tags_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddTagRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Documents"],"summary":"Get tags for a document","description":"Retrieves a list of tags associated with a document.","operationId":"get_document_tags_api_v0_documents__document_id__tags_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TagResponse"},"title":"Response Get Document Tags Api V0 Documents  Document Id  Tags Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Documents"],"summary":"Remove a tag from a document","description":"Removes the association between a tag and a document.","operationId":"remove_tag_from_document_api_api_v0_documents__document_id__tags_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveTagRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/documents/search":{"post":{"tags":["Documents"],"summary":"Search for documents","description":"Searches for documents based on the provided query and optional filters.","operationId":"search_documents_api_v0_documents_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentSearchPostResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v0/documents/search/{search_id}":{"get":{"tags":["Documents"],"summary":"Get a document search by ID","description":"Retrieves a document search by its unique identifier.","operationId":"get_document_search_api_v0_documents_search__search_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"search_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Search Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentSearchGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/documents/formats":{"get":{"tags":["Documents"],"summary":"List supported upload formats","description":"Returns the document formats this server accepts for upload, so clients (e.g. the SDK) can discover them at runtime instead of hardcoding a list that drifts from the server.","operationId":"get_supported_formats_api_v0_documents_formats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportedFormatsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v0/documents/token-usage":{"post":{"tags":["Documents"],"summary":"Get token usage for a set of documents","description":"Get token usage / cost tracking aggregated over an explicit list of documents (e.g. the documents of a single batch upload).","operationId":"get_documents_token_usage_api_v0_documents_token_usage_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTokenUsageRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenUsageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v0/documents/stats":{"post":{"tags":["Documents"],"summary":"Get component stats for a set of documents","description":"Get component and page-type statistics aggregated over an explicit list of documents (e.g. the documents of a single batch upload).","operationId":"get_documents_stats_api_v0_documents_stats_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentStatsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v0/documents":{"post":{"tags":["Documents"],"summary":"Upload and process a document","description":"Creates a document from a file upload. Use multipart/form-data.","operationId":"process_document_post_api_v0_documents_post","security":[{"HTTPBearer":[]}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_process_document_post_api_v0_documents_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPostResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Documents"],"summary":"Get all documents","description":"Retrieves a paginated list of all visible documents in the system.","operationId":"get_documents_api_v0_documents_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Maximum number of documents to return per page.","default":50,"title":"Limit"},"description":"Maximum number of documents to return per page."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of documents to skip.","default":0,"title":"Offset"},"description":"Number of documents to skip."},{"name":"folder_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The ID of the folder to filter documents by.","title":"Folder Id"},"description":"The ID of the folder to filter documents by."},{"name":"tag_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the tag to filter documents by.","title":"Tag Name"},"description":"The name of the tag to filter documents by."},{"name":"owner_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The ID of the owner to filter documents by.","title":"Owner Id"},"description":"The ID of the owner to filter documents by."},{"name":"knowledge_base_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The ID of the knowledge base to filter documents by.","title":"Knowledge Base Id"},"description":"The ID of the knowledge base to filter documents by."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/documents/{document_id}":{"get":{"tags":["Documents"],"summary":"Get a document by ID","description":"Retrieves a document by its unique identifier.","operationId":"get_document_api_api_v0_documents__document_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Documents"],"summary":"Delete a document","description":"Deletes a document by its unique identifier.","operationId":"delete_document_api_v0_documents__document_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Documents"],"summary":"Update a document","description":"Updates a document's properties by its unique identifier.","operationId":"update_document_api_api_v0_documents__document_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/documents/{document_id}/upload-url":{"get":{"tags":["Documents"],"summary":"Get a signed upload URL for a document","description":"Retrieves a signed upload URL for a document.","operationId":"get_document_upload_url_api_v0_documents__document_id__upload_url_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUploadUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Documents"],"summary":"Update document file content","description":"Trigger processing of a document after client has uploaded to storage.","operationId":"update_document_from_upload_url_api_v0_documents__document_id__upload_url_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentUrlRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPostResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/documents/{document_id}/file":{"put":{"tags":["Documents"],"summary":"Update document file content","description":"Updates an existing document's file content and reprocesses it.","operationId":"update_document_file_api_v0_documents__document_id__file_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_update_document_file_api_v0_documents__document_id__file_put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPostResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/documents/{document_id}/reprocessing-jobs":{"post":{"tags":["Documents"],"summary":"Create a document reprocessing job","description":"Creates a new job to reprocess an existing document without changing its file content.","operationId":"create_reprocessing_job_api_v0_documents__document_id__reprocessing_jobs_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReprocessingRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPostResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/documents/{document_id}/visual-components":{"get":{"tags":["Documents"],"summary":"Get document visual components","description":"Retrieves all visual components associated with a document.","operationId":"get_document_visual_components_api_v0_documents__document_id__visual_components_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"page_number","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The page number of the visual component","title":"Page Number"},"description":"The page number of the visual component"},{"name":"include_metadata","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether to return the metadata of the visual component","default":true,"title":"Include Metadata"},"description":"Whether to return the metadata of the visual component"},{"name":"types","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter to these component types (repeatable, e.g. ?types=pid&types=schematic). Omit to return every type.","title":"Types"},"description":"Filter to these component types (repeatable, e.g. ?types=pid&types=schematic). Omit to return every type."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentVisualComponentGetResponse"},"title":"Response Get Document Visual Components Api V0 Documents  Document Id  Visual Components Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Documents"],"summary":"Create a visual component","description":"Creates a new visual component for a document.","operationId":"create_visual_component_api_v0_documents__document_id__visual_components_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisualComponentCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentVisualComponentGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/documents/{document_id}/visual-components/{component_id}":{"get":{"tags":["Documents"],"summary":"Get a single visual component","description":"Retrieves one visual component of a document by its public ID, including its grounding data.","operationId":"get_document_visual_component_api_v0_documents__document_id__visual_components__component_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"component_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Component Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentVisualComponentGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Documents"],"summary":"Update a visual component","description":"Updates a visual component's properties by its unique identifier.","operationId":"update_visual_component_api_v0_documents__document_id__visual_components__component_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"component_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Component Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisualComponentUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentVisualComponentGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Documents"],"summary":"Delete a visual component","description":"Deletes a visual component from a document.","operationId":"delete_visual_component_api_v0_documents__document_id__visual_components__component_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"component_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Component Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Visual Component Api V0 Documents  Document Id  Visual Components  Component Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/documents/{document_id}/visual-components/{component_id}/responses":{"post":{"tags":["Documents"],"summary":"Create a response for a question about a document visual component","description":"Generate a response to a question about a document visual component using its content and description.","operationId":"create_document_visual_component_response_api_v0_documents__document_id__visual_components__component_id__responses_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"component_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Component Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentVisualComponentResponseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentVisualComponentResponseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/documents/{document_id}/component-reprocessing-jobs":{"post":{"tags":["Documents"],"summary":"Create a component reprocessing job","description":"Reprocesses specific visual components to re-extract content based on updated bboxes.","operationId":"create_component_reprocessing_job_api_v0_documents__document_id__component_reprocessing_jobs_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentReprocessingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentReprocessingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/documents/{document_id}/schematic/coco-export":{"get":{"tags":["Documents"],"summary":"Export a document's schematic pages as a COCO dataset (zip)","description":"Bundles every schematic page of the document — each rendered page image plus a single `_annotations.coco.json` — into one zip ready for drag-and-drop import into Roboflow object-detection. Pages whose image is not yet rendered are rendered on demand before bundling.","operationId":"export_document_coco_api_v0_documents__document_id__schematic_coco_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/documents/{document_id}/schematic/archive":{"get":{"tags":["Documents"],"summary":"Export every schematic component of a document as one zip","description":"Bundles each schematic visual component's v1 graph plus a manifest into a single zip. The contents round-trip exactly: re-importing the zip via PUT reproduces the same graphs. This is the lossless whole- document counterpart to the lossy `coco-export`.","operationId":"export_document_archive_api_v0_documents__document_id__schematic_archive_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Documents"],"summary":"Add a document's schematic components from an uploaded zip","description":"Reads an archive produced by GET and adds a new schematic visual component to this document for every component in the archive — same type, label, page, bbox, and graph as the source. Components are always created, never matched against existing VCs, so the same bundle can be loaded onto any document. Returns the public ids of the newly created VCs.","operationId":"import_document_archive_api_v0_documents__document_id__schematic_archive_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_document_archive_api_v0_documents__document_id__schematic_archive_put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/op_core__api__endpoints__documents__schematic_archive__ImportArchiveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/documents/{document_id}/pages/{page_number}/responses":{"post":{"tags":["Documents"],"summary":"Create a response for a question about a document page","description":"Generate a response to a question about a document page using its description and components.","operationId":"create_page_response_api_v0_documents__document_id__pages__page_number__responses_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"page_number","in":"path","required":true,"schema":{"type":"integer","title":"Page Number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResponseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResponseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/documents/{document_id}/components":{"get":{"tags":["Documents"],"summary":"Get document components","description":"Retrieves all components associated with a document.","operationId":"get_document_components_api_v0_documents__document_id__components_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/op_core__api__endpoints__documents__pages__ComponentGetResponse"},"title":"Response Get Document Components Api V0 Documents  Document Id  Components Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/documents/{document_id}/page-descriptions":{"get":{"tags":["Documents"],"summary":"Get all page descriptions for a document","description":"Retrieves all page descriptions associated with a document.","operationId":"get_document_page_descriptions_api_v0_documents__document_id__page_descriptions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PageDescriptionResponse"},"title":"Response Get Document Page Descriptions Api V0 Documents  Document Id  Page Descriptions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/documents/{document_id}/page-descriptions/{page_number}":{"get":{"tags":["Documents"],"summary":"Get a specific page description","description":"Retrieves the description for a specific page of a document.","operationId":"get_document_page_description_api_v0_documents__document_id__page_descriptions__page_number__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"page_number","in":"path","required":true,"schema":{"type":"integer","title":"Page Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageDescriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Documents"],"summary":"Update a page description","description":"Updates the description text for a specific page of a document.","operationId":"update_document_page_description_api_v0_documents__document_id__page_descriptions__page_number__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"page_number","in":"path","required":true,"schema":{"type":"integer","title":"Page Number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageDescriptionUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageDescriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/documents/{document_id}/pages/{page_number}/image":{"get":{"tags":["Documents"],"summary":"Get a page image","description":"Gets the rendered page image for the Source view. Returns the image URL if available, otherwise triggers async rendering and returns a job status ID to poll.","operationId":"get_document_page_image_api_v0_documents__document_id__pages__page_number__image_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"page_number","in":"path","required":true,"schema":{"type":"integer","title":"Page Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageImageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/documents/{document_id}/retention-policies":{"post":{"tags":["Documents"],"summary":"Add a retention policy to a document","description":"Associates a retention policy with a document. Multiple retention policies can be associated with a single document.","operationId":"add_document_retention_policy_api_v0_documents__document_id__retention_policies_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"retention_policy_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Retention Policy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRetentionPolicyAssociationGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Documents"],"summary":"Get retention policies for a document","description":"Retrieves all retention policies associated with a document.","operationId":"get_document_retention_policies_api_v0_documents__document_id__retention_policies_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentRetentionPolicyAssociationGetResponse"},"title":"Response Get Document Retention Policies Api V0 Documents  Document Id  Retention Policies Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/documents/{document_id}/retention-policies/{retention_policy_id}":{"delete":{"tags":["Documents"],"summary":"Remove a retention policy from a document","description":"Removes the retention policy association from a document.","operationId":"remove_document_retention_policy_api_v0_documents__document_id__retention_policies__retention_policy_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"retention_policy_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Retention Policy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRetentionPolicyAssociationGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/documents/{document_id}/pages/{page_number}/template-match":{"post":{"tags":["Documents"],"summary":"Find regions of a page similar to a template rect","description":"Runs OpenCV TM_CCOEFF_NORMED template matching against the rendered page image. Results are ephemeral and not persisted.","operationId":"template_match_api_v0_documents__document_id__pages__page_number__template_match_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"page_number","in":"path","required":true,"schema":{"type":"integer","title":"Page Number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateMatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateMatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/documents/{document_id}/pages/{page_number}/ocr-regions":{"post":{"tags":["Documents"],"summary":"Recognize text in a list of bbox regions on a page","description":"Detect → sort → recognize → join, per bbox crop of the rendered page image. Detection finds sub-text-bboxes inside each region, sorted top-to-bottom / left-to-right; recognition then runs on the flat list across all regions; recognized strings are joined with spaces per region in reading order. Two GPU round-trips. Results are ephemeral and not persisted.","operationId":"ocr_regions_api_v0_documents__document_id__pages__page_number__ocr_regions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"page_number","in":"path","required":true,"schema":{"type":"integer","title":"Page Number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OcrRegionsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OcrRegionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/documents/{document_id}/pages/{page_number}/detect-text-in-region":{"post":{"tags":["Documents"],"summary":"Detect text bounding boxes inside a polygon on a page","description":"Crops the page to the polygon's bounding rect (with padding for PP-OCRv5 context), runs text detection on the crop, and filters detections by polygon centroid. One GPU round trip. Returns detected bboxes in page-pixel coords. Recognition is NOT performed — callers needing text content route the bboxes through /ocr-regions. Results are ephemeral and not persisted.","operationId":"detect_text_in_region_api_v0_documents__document_id__pages__page_number__detect_text_in_region_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"page_number","in":"path","required":true,"schema":{"type":"integer","title":"Page Number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectTextInRegionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectTextInRegionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/components":{"post":{"tags":["Components"],"summary":"Generate component from image","description":"Analyzes an uploaded image and generates components based on the visual content. Supports 'flowchart' (Mermaid syntax), 'chart' (matplotlib PNG as base64), and 'table' (HTML table extraction). If no image is provided, creates an empty component record for later upload via presigned URL.","operationId":"generate_component_from_image_api_v0_components_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_type","in":"query","required":false,"schema":{"enum":["flowchart","diagram","mindmap","chart","table","schematic"],"type":"string","description":"Type of component to generate. Supports 'flowchart', 'chart', and 'table'.","default":"flowchart","title":"Component Type"},"description":"Type of component to generate. Supports 'flowchart', 'chart', and 'table'."},{"name":"include_description","in":"query","required":false,"schema":{"type":"boolean","description":"For flowcharts, whether to include a natural language description in addition to the Mermaid code.","default":false,"title":"Include Description"},"description":"For flowcharts, whether to include a natural language description in addition to the Mermaid code."},{"name":"baseline_provider","in":"query","required":false,"schema":{"anyOf":[{"enum":["vlm","azure","gcp"],"type":"string"},{"type":"null"}],"description":"When baseline_mode=true, choose provider: vlm (LLM vision), azure (Document Intelligence), gcp (Document AI)","title":"Baseline Provider"},"description":"When baseline_mode=true, choose provider: vlm (LLM vision), azure (Document Intelligence), gcp (Document AI)"},{"name":"fix_text_with_vlm","in":"query","required":false,"schema":{"type":"boolean","description":"Whether to fix text with VLM","default":true,"title":"Fix Text With Vlm"},"description":"Whether to fix text with VLM"},{"name":"detect","in":"query","required":false,"schema":{"type":"boolean","description":"For schematic components: run symbol detection on the uploaded image instead of starting from an empty canvas.","default":false,"title":"Detect"},"description":"For schematic components: run symbol detection on the uploaded image instead of starting from an empty canvas."}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_generate_component_from_image_api_v0_components_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentPostResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/components/{component_id}/upload-url":{"get":{"tags":["Components"],"summary":"Get upload URL for component","description":"Returns a presigned URL for uploading the component image directly to storage. Use this after creating an empty component (POST without image).","operationId":"get_component_upload_url_api_v0_components__component_id__upload_url_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentUploadUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Components"],"summary":"Finalize component upload and trigger processing","description":"Triggers processing of a component after client has uploaded to storage via presigned URL.","operationId":"update_component_from_upload_url_api_v0_components__component_id__upload_url_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateComponentUrlRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentPostResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/components/{component_id}":{"get":{"tags":["Components"],"summary":"Get a component by ID","description":"Retrieves a component by its ID.","operationId":"get_component_api_v0_components__component_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/op_core__api__endpoints__components__crud__ComponentGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Components"],"summary":"Update component from modified grounding","description":"Regenerates a component using modified grounding data. For charts, provide html_table. For flowcharts, provide intermediate_json.","operationId":"update_component_from_grounding_api_v0_components__component_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/op_core__api__endpoints__components__crud__GroundingUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentUpdateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Components"],"summary":"Delete a component","description":"Deletes a component by its ID, including associated S3 files.","operationId":"delete_component_api_v0_components__component_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Component Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/components/{component_id}/responses":{"post":{"tags":["Components"],"summary":"Create a response for a question about a component","description":"Generate a response to a question about a visual component using its content and description.","operationId":"create_component_response_api_v0_components__component_id__responses_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentResponseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentResponseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/components/{component_id}/schematic":{"get":{"tags":["Components"],"summary":"Get schematic data","description":"Returns the schematic graph as the canonical v2 envelope (`{version, network, subgraphs, arrows, legend, legend_draft, image_width, image_height, total_pages, non_flow_classes}`) — the same blob that lives at `grounding_data.graph`.","operationId":"get_schematic_endpoint_api_v0_components__component_id__schematic_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Schematic Endpoint Api V0 Components  Component Id  Schematic Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Components"],"summary":"Bulk-replace schematic + pid grounding","description":"Overwrites grounding_data atomically with a versioned codec dict. Accepts either a v0 envelope (`{version: 'v0', schematic, pid}`), a v1 envelope (`{version: 'v1', network, annotations, ...}`), or a bare legacy `{schematic, pid}` body (treated as unversioned v0 for backward compatibility with pre-codec frontend builds). The version is sniffed off the body — no separate endpoint per format.","operationId":"replace_schematic_api_v0_components__component_id__schematic_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Request"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/components/{component_id}/schematic/export":{"get":{"tags":["Components"],"summary":"Export schematic in a versioned wire format","description":"Returns the schematic in the requested format. `?format=json` (default) returns the canonical v2 JSON envelope — v0/v1 are import-only. `?format=csv` returns a ZIP of one CSV per entity. `?format=xlsx` returns a multi-sheet Excel workbook.","operationId":"export_schematic_api_v0_components__component_id__schematic_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"},{"name":"format","in":"query","required":false,"schema":{"enum":["json","csv","xlsx"],"type":"string","default":"json","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Export Schematic Api V0 Components  Component Id  Schematic Export Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/components/{component_id}/schematic/reviewed":{"patch":{"tags":["Components"],"summary":"Set the reviewed flag on grounding_data","description":"Sets `grounding_data.reviewed`. Immediate; not staged onto the action stack.","operationId":"patch_reviewed_api_v0_components__component_id__schematic_reviewed_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchReviewedRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/components/{component_id}/schematic/legend":{"put":{"tags":["Components"],"summary":"Replace the per-document legend","description":"Overwrites `grounding.graph.legend` wholesale. The rest of the graph (network, annotations, arrows, subgraphs) is preserved by loading the current graph, swapping the legend field, and re-saving. Each entry's `source_crop_url` is validated against the document's storage scope — only data URLs (≤32 KB) and storage URLs anchored at this document's `legend_crops/` prefix are accepted.","operationId":"replace_legend_api_v0_components__component_id__schematic_legend_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceLegendRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/components/{component_id}/schematic/legend/apply-remap":{"post":{"tags":["Components"],"summary":"Run the VLM-driven legend remap","description":"Walks each non-matching detection on the page, asks a VLM which legend entry (if any) it matches, and rewrites the detection's class/subtype/transcription to the matched entry. Returns a job_status_id to poll.","operationId":"apply_legend_remap_api_v0_components__component_id__schematic_legend_apply_remap_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentPostResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/components/{component_id}/schematic/legend/extract-from-image":{"post":{"tags":["Components"],"summary":"Enqueue VLM extraction of a legend table image","description":"Accepts a PNG/JPEG/WebP/GIF of a symbol-legend table and enqueues a Hyrex task that runs the VLM extraction. Returns a job_status_id to poll. On completion the extracted entries are written to `grounding.legend_draft`; the client refetches the schematic, hydrates the draft into the panel for review, then calls DELETE /schematic/legend/draft to clear it server-side.","operationId":"extract_legend_from_image_endpoint_api_v0_components__component_id__schematic_legend_extract_from_image_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_extract_legend_from_image_endpoint_api_v0_components__component_id__schematic_legend_extract_from_image_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentPostResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/components/{component_id}/schematic/legend/draft":{"delete":{"tags":["Components"],"summary":"Clear the pending legend draft","description":"Wipes `graph.legend_draft` if set. Called by the client after it has hydrated the draft into local panel state (so a refresh doesn't re-hydrate it), or when the user explicitly discards a pending draft.","operationId":"clear_legend_draft_api_v0_components__component_id__schematic_legend_draft_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/components/{component_id}/schematic/generate/{op}":{"post":{"tags":["Components"],"summary":"Run a Generate op","description":"Enqueues the named Generate op as a Hyrex task. op ∈ {detect_components, detect_text, detect_lines, generate_ports, reclassify_vertices, assign_flow, propose_tags}. Returns a job_status_id the client can poll.","operationId":"run_generate_op_api_v0_components__component_id__schematic_generate__op__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"op","in":"path","required":true,"schema":{"enum":["detect_components","detect_text","detect_lines","generate_ports","reclassify_vertices","assign_flow","propose_tags"],"type":"string","title":"Op"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentPostResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/components/{component_id}/schematic/nodes":{"post":{"tags":["Components"],"summary":"Create a schematic node","operationId":"create_node_api_v0_components__component_id__schematic_nodes_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNodeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Node"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/components/{component_id}/schematic/nodes/{node_id}":{"delete":{"tags":["Components"],"summary":"Delete a schematic node (cascades to ports, segments, associations)","operationId":"delete_node_api_v0_components__component_id__schematic_nodes__node_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Components"],"summary":"Update node fields (bbox, class, subtype, confidence, transcription)","description":"PATCH is identity-preserving: node.id is unchanged. Vertices, segments,\nand associations are all preserved because they reference the node by id,\nnot geometry.","operationId":"patch_node_api_v0_components__component_id__schematic_nodes__node_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchNodeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Node"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/components/{component_id}/schematic/annotations":{"post":{"tags":["Components"],"summary":"Create a schematic annotation","operationId":"create_annotation_api_v0_components__component_id__schematic_annotations_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAnnotationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Annotation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/components/{component_id}/schematic/annotations/{annotation_id}":{"delete":{"tags":["Components"],"summary":"Delete a schematic annotation (cascades to associations)","operationId":"delete_annotation_api_v0_components__component_id__schematic_annotations__annotation_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"annotation_id","in":"path","required":true,"schema":{"type":"string","title":"Annotation Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Components"],"summary":"Update annotation fields (bbox, class, subtype, content, confidence)","description":"PATCH is identity-preserving: annotation id is unchanged.","operationId":"patch_annotation_api_v0_components__component_id__schematic_annotations__annotation_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"annotation_id","in":"path","required":true,"schema":{"type":"string","title":"Annotation Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchAnnotationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Annotation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/components/{component_id}/schematic/vertices":{"post":{"tags":["Components"],"summary":"Create a schematic vertex (port, junction, or terminal)","operationId":"create_vertex_api_v0_components__component_id__schematic_vertices_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVertexRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Port"},{"$ref":"#/components/schemas/SchematicJunction"},{"$ref":"#/components/schemas/SchematicTerminal"}],"title":"Response Create Vertex Api V0 Components  Component Id  Schematic Vertices Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/components/{component_id}/schematic/vertices/{vertex_id}":{"patch":{"tags":["Components"],"summary":"Update vertex position and/or kind","description":"PATCH is identity-preserving. Segments referencing this vertex are\nunchanged because they reference by id, not coordinate or kind.","operationId":"patch_vertex_api_v0_components__component_id__schematic_vertices__vertex_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"vertex_id","in":"path","required":true,"schema":{"type":"string","title":"Vertex Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchVertexRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Port"},{"$ref":"#/components/schemas/SchematicJunction"},{"$ref":"#/components/schemas/SchematicTerminal"}],"title":"Response Patch Vertex Api V0 Components  Component Id  Schematic Vertices  Vertex Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Components"],"summary":"Delete a vertex (cascades to segments, associations)","description":"Dispatches to cascade_delete with the resolved kind so that segments\nreferencing this vertex (and their associations) are removed.","operationId":"delete_vertex_api_v0_components__component_id__schematic_vertices__vertex_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"vertex_id","in":"path","required":true,"schema":{"type":"string","title":"Vertex Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/components/{component_id}/schematic/line-segments":{"post":{"tags":["Components"],"summary":"Create a schematic line segment","operationId":"create_line_segment_api_v0_components__component_id__schematic_line_segments_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLineSegmentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchematicLineSegment"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/components/{component_id}/schematic/line-segments/{segment_id}":{"patch":{"tags":["Components"],"summary":"Update segment fields (pixel_path, bbox, stroke, start, end)","description":"PATCH is identity-preserving. Flow_directions[segment_id] and\nassociations targeting this segment are unchanged.","operationId":"patch_line_segment_api_v0_components__component_id__schematic_line_segments__segment_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"segment_id","in":"path","required":true,"schema":{"type":"string","title":"Segment Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchSegmentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchematicLineSegment"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Components"],"summary":"Delete a line segment (cascades to associations)","operationId":"delete_line_segment_api_v0_components__component_id__schematic_line_segments__segment_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"segment_id","in":"path","required":true,"schema":{"type":"string","title":"Segment Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/components/{component_id}/schematic/associations":{"post":{"tags":["Components"],"summary":"Create a schematic association (link annotation to entity)","operationId":"create_association_api_v0_components__component_id__schematic_associations_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAssociationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Association"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/components/{component_id}/schematic/associations/{text_id}/{target_id}":{"delete":{"tags":["Components"],"summary":"Delete a schematic association","operationId":"delete_association_api_v0_components__component_id__schematic_associations__text_id___target_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"text_id","in":"path","required":true,"schema":{"type":"string","title":"Text Id"}},{"name":"target_id","in":"path","required":true,"schema":{"type":"string","title":"Target Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/components/{component_id}/schematic/arrows":{"post":{"tags":["Components"],"summary":"Create a P&ID arrow","operationId":"create_arrow_api_v0_components__component_id__schematic_arrows_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateArrowRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Arrow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/components/{component_id}/schematic/arrows/{arrow_id}":{"patch":{"tags":["Components"],"summary":"Update arrow fields (bbox, confidence)","description":"PATCH is identity-preserving.","operationId":"patch_arrow_api_v0_components__component_id__schematic_arrows__arrow_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"arrow_id","in":"path","required":true,"schema":{"type":"string","title":"Arrow Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchArrowRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Arrow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Components"],"summary":"Delete a P&ID arrow","operationId":"delete_arrow_api_v0_components__component_id__schematic_arrows__arrow_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"arrow_id","in":"path","required":true,"schema":{"type":"string","title":"Arrow Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/components/{component_id}/schematic/flow_directions/{segment_id}":{"patch":{"tags":["Components"],"summary":"Manually set flow direction for a single segment","operationId":"patch_flow_direction_api_v0_components__component_id__schematic_flow_directions__segment_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"segment_id","in":"path","required":true,"schema":{"type":"string","title":"Segment Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchFlowDirectionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowDirectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/components/{component_id}/schematic/batch":{"post":{"tags":["Components"],"summary":"Apply an ordered list of schematic actions atomically","operationId":"apply_batch_api_v0_components__component_id__schematic_batch_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/components/{component_id}/schematic/validations":{"get":{"tags":["Components"],"summary":"Run annotation-completeness validations","description":"Returns per-entity status across three checks: bbox connectivity, line tag completion, and text completion. Read-only and synchronous — the FE polls this after every save / Generate completion.","operationId":"get_schematic_validations_api_v0_components__component_id__schematic_validations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationReport"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/components/{component_id}/schematic/template-applications":{"post":{"tags":["Components"],"summary":"Apply a schematic template (destructive legend rebuild)","description":"Enqueues a Hyrex task that VLM-classifies every detected symbol against the template's class hierarchy, dedups by classified leaf, and rewrites the legend from the highest-confidence representative of each group.\n\nThis is destructive: the existing legend is dropped except for entries with ``cfihos_source=\"user_pinned\"``. The ``confirm`` flag in the request body must be ``true`` — the endpoint refuses to enqueue without it as a server-side guard against accidental destructive applies.\n\nReturns a ``job_status_id`` to poll via ``/api/v0/job-statuses/{id}``.","operationId":"apply_template_endpoint_api_v0_components__component_id__schematic_template_applications_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}},{"name":"vc_id","in":"query","required":true,"schema":{"type":"string","description":"Public ID of the target visual component","title":"Vc Id"},"description":"Public ID of the target visual component"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateApplicationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentPostResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/agent/sessions/{session_id}/attachments":{"post":{"tags":["Agent Attachments"],"summary":"Upload attachments","description":"Upload image files to attach to the next agent message. Max 8 files, 20MB each.","operationId":"upload_attachments_api_v0_agent_sessions__session_id__attachments_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_attachments_api_v0_agent_sessions__session_id__attachments_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AttachmentUploadResponse"},"title":"Response Upload Attachments Api V0 Agent Sessions  Session Id  Attachments Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/agent/sessions/{session_id}/attachments/{attachment_id}":{"get":{"tags":["Agent Attachments"],"summary":"Download attachment","description":"Download an attachment image by its ID.","operationId":"download_attachment_api_v0_agent_sessions__session_id__attachments__attachment_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attachment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}},"image/*":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/agent/sessions":{"post":{"tags":["Agent"],"summary":"Create agent session","description":"Create a new agent session, optionally linked to a persona.","operationId":"create_agent_session_api_v0_agent_sessions_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionPostResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Agent"],"summary":"List agent sessions","description":"List all agent sessions for the current user.","operationId":"list_agent_sessions_api_v0_agent_sessions_get","security":[{"HTTPBearer":[]}],"parameters":[{"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":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Return only the session whose name is exactly this, newest activity first if several match. Resolves a name used as a binding in one request; `limit` and `offset` do not apply.","title":"Name"},"description":"Return only the session whose name is exactly this, newest activity first if several match. Resolves a name used as a binding in one request; `limit` and `offset` do not apply."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/agent/sessions/{session_id}":{"get":{"tags":["Agent"],"summary":"Get agent session","description":"Get an agent session.","operationId":"get_agent_session_api_v0_agent_sessions__session_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Agent"],"summary":"Update agent session","description":"Update an agent session's name, persona, or settings.","operationId":"update_agent_session_api_v0_agent_sessions__session_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Agent"],"summary":"Delete agent session","description":"Delete an agent session and all its messages.","operationId":"delete_agent_session_api_v0_agent_sessions__session_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/agent/sessions/{session_id}/messages":{"get":{"tags":["Agent"],"summary":"Get session messages","description":"Get all messages in an agent session.","operationId":"get_session_messages_api_v0_agent_sessions__session_id__messages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"after_sequence","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Only return messages with sequence_number greater than this value.","title":"After Sequence"},"description":"Only return messages with sequence_number greater than this value."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentMessageGetResponse"},"title":"Response Get Session Messages Api V0 Agent Sessions  Session Id  Messages Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/agent/personas":{"post":{"tags":["Agent Personas"],"summary":"Create agent persona","description":"Create a new agent persona for the current user.","operationId":"create_agent_persona_api_v0_agent_personas_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPersonaCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPersonaPostResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Agent Personas"],"summary":"List agent personas","description":"List all agent personas for the current user.","operationId":"list_agent_personas_api_v0_agent_personas_get","security":[{"HTTPBearer":[]}],"parameters":[{"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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPersonaListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/agent/personas/{persona_id}":{"get":{"tags":["Agent Personas"],"summary":"Get agent persona","description":"Get a single persona by UUID. 404s for personas owned by another user.","operationId":"get_agent_persona_api_v0_agent_personas__persona_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"persona_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Persona Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPersonaGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Agent Personas"],"summary":"Update agent persona","description":"Update one or more fields on a persona.","operationId":"update_agent_persona_api_v0_agent_personas__persona_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"persona_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Persona Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPersonaUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPersonaGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Agent Personas"],"summary":"Delete agent persona","description":"Delete a persona. Sessions linked to it have ``persona_id`` set to NULL via ON DELETE SET NULL — they keep working with no persona attached.","operationId":"delete_agent_persona_api_v0_agent_personas__persona_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"persona_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Persona Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPersonaDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/agent/sessions/{session_id}/run":{"post":{"tags":["Agent"],"summary":"Run agent","description":"Run the agent with a user message. Returns job_status_id for polling.","operationId":"run_agent_endpoint_api_v0_agent_sessions__session_id__run_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRunPostResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/agent/sessions/{session_id}/runs":{"get":{"tags":["Agent"],"summary":"List runs","description":"List all runs in a session.","operationId":"list_session_runs_api_v0_agent_sessions__session_id__runs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session 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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRunListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/agent/sessions/{session_id}/runs/{run_id}":{"get":{"tags":["Agent"],"summary":"Get run","description":"Get a specific run by ID.","operationId":"get_session_run_api_v0_agent_sessions__session_id__runs__run_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRunGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/agent/sessions/{session_id}/runs/{run_id}/cancel":{"post":{"tags":["Agent"],"summary":"Cancel run","description":"Cancel a running agent execution.","operationId":"cancel_session_run_api_v0_agent_sessions__session_id__runs__run_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRunGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/agent/sessions/{session_id}/workspace":{"get":{"tags":["Agent"],"summary":"List roaming agent workspace","description":"List files and directories in the workspace of a roaming agent. Returns 404 when the session's persona does not expose any fs_* tool.","operationId":"get_session_workspace_api_v0_agent_sessions__session_id__workspace_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentWorkspaceTreeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/agent/sessions/{session_id}/workspace/file":{"get":{"tags":["Agent"],"summary":"Read a file from a roaming agent workspace","description":"Return the UTF-8 content of one file under the workspace. Path is relative to the workspace root and must not escape it.","operationId":"get_session_workspace_file_api_v0_agent_sessions__session_id__workspace_file_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"path","in":"query","required":true,"schema":{"type":"string","description":"Path relative to the workspace root.","title":"Path"},"description":"Path relative to the workspace root."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentWorkspaceFileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Agent"],"summary":"Delete a file or directory from the workspace","description":"Remove a file or (optionally, with ``recursive=true``) a directory from the session's workspace. Refuses to delete the workspace root. Non-empty directories require ``recursive=true``.","operationId":"delete_session_workspace_entry_api_v0_agent_sessions__session_id__workspace_file_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"path","in":"query","required":true,"schema":{"type":"string","description":"Workspace-relative path to delete.","title":"Path"},"description":"Workspace-relative path to delete."},{"name":"recursive","in":"query","required":false,"schema":{"type":"boolean","description":"Allow removal of non-empty directories.","default":false,"title":"Recursive"},"description":"Allow removal of non-empty directories."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Session Workspace Entry Api V0 Agent Sessions  Session Id  Workspace File Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/agent/sessions/{session_id}/workspace/file/raw":{"get":{"tags":["Agent"],"summary":"Read a workspace file as raw bytes","description":"Return the raw bytes of one workspace file with a Content-Type guessed from the extension. Used by the frontend to render images, PDFs, and other binary files that the JSON file endpoint reports as ``error: binary``.","operationId":"get_session_workspace_file_raw_api_v0_agent_sessions__session_id__workspace_file_raw_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"path","in":"query","required":true,"schema":{"type":"string","description":"Path relative to the workspace root.","title":"Path"},"description":"Path relative to the workspace root."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/agent/sessions/{session_id}/workspace/upload":{"post":{"tags":["Agent"],"summary":"Upload a file into a roaming agent's workspace","description":"Write an uploaded file into ``uploads/<filename>`` of the session's workspace. Intended for CSVs and other datasets the agent will analyze. Distinct from message attachments (which are stored in object storage and linked to a single message).","operationId":"upload_workspace_file_api_v0_agent_sessions__session_id__workspace_upload_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_workspace_file_api_v0_agent_sessions__session_id__workspace_upload_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentWorkspaceUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/agent/sessions/{session_id}/workspace/manifest":{"get":{"tags":["Agent"],"summary":"Get the latest committed workspace manifest","description":"Return the file manifest of the latest committed workspace version as ``[{path, sha256, size}]`` plus the version id. The client diffs this against its local files to pull back what an agent run changed.","operationId":"get_session_workspace_manifest_api_v0_agent_sessions__session_id__workspace_manifest_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentWorkspaceManifestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/agent/sessions/{session_id}/workspace/missing-blobs":{"post":{"tags":["Agent"],"summary":"List which of the given blobs are missing from the store","description":"Given the content hashes the client intends to push, return the subset not already present in the user's content-addressed blob store — the collection of blobs the client still needs to upload. (POST, not GET: the hash list is a request body, not a query string.)","operationId":"find_missing_blobs_api_v0_agent_sessions__session_id__workspace_missing_blobs_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceSyncPlanRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentWorkspaceMissingBlobsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/agent/sessions/{session_id}/workspace/blobs/{sha256}":{"put":{"tags":["Agent"],"summary":"Upload one content-addressed blob","description":"Upload the raw bytes of one file to its content-addressed location, named by its sha256. Idempotent — re-PUTting identical bytes is a no-op. The server verifies sha256(body) == the {sha256} in the URL and rejects a mismatch.","operationId":"put_workspace_blob_api_v0_agent_sessions__session_id__workspace_blobs__sha256__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"sha256","in":"path","required":true,"schema":{"type":"string","title":"Sha256"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_put_workspace_blob_api_v0_agent_sessions__session_id__workspace_blobs__sha256__put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentWorkspaceBlobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/agent/sessions/{session_id}/workspace/commit":{"post":{"tags":["Agent"],"summary":"Commit a workspace version from a manifest","description":"Snapshot the supplied file set as a new workspace version (child of the current latest). Every referenced blob must already be uploaded. The next agent run hydrates this version into the sandbox.","operationId":"commit_workspace_api_v0_agent_sessions__session_id__workspace_commit_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceCommitRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentWorkspaceCommitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/agent/sessions/{session_id}/workspace/dataset-summary":{"get":{"tags":["Agent"],"summary":"Summarize a dataset file in the workspace","description":"Return per-column type + basic stats + sample rows for a CSV file in the workspace. Used by the Data Table view. Non-CSV types return an error field.","operationId":"get_session_workspace_dataset_summary_api_v0_agent_sessions__session_id__workspace_dataset_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"path","in":"query","required":true,"schema":{"type":"string","description":"Workspace-relative path to the dataset.","title":"Path"},"description":"Workspace-relative path to the dataset."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Session Workspace Dataset Summary Api V0 Agent Sessions  Session Id  Workspace Dataset Summary Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/agent/skills":{"post":{"tags":["Agent Skills"],"summary":"Create agent skill","description":"Create a new instruction-document skill for the current user.","operationId":"create_agent_skill_api_v0_agent_skills_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSkillCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSkillPostResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Agent Skills"],"summary":"List agent skills","description":"List all skills owned by the current user.","operationId":"list_agent_skills_api_v0_agent_skills_get","security":[{"HTTPBearer":[]}],"parameters":[{"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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSkillListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/agent/skills/{skill_id}":{"get":{"tags":["Agent Skills"],"summary":"Get agent skill","description":"Get a single skill by UUID. 404s for skills owned by another user.","operationId":"get_agent_skill_api_v0_agent_skills__skill_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Skill Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSkillGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Agent Skills"],"summary":"Update agent skill","description":"Update one or more fields on a skill.","operationId":"update_agent_skill_api_v0_agent_skills__skill_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Skill Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSkillUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSkillGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Agent Skills"],"summary":"Delete agent skill","description":"Delete a skill. ON DELETE CASCADE removes its row in every persona's preload list.","operationId":"delete_agent_skill_api_v0_agent_skills__skill_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Skill Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSkillDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/agent/tools/builtin":{"get":{"tags":["Agent Tools"],"summary":"List built-in tools","description":"Returns metadata for all built-in agent tools.","operationId":"list_builtin_tools_api_v0_agent_tools_builtin_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BuiltinToolResponse"},"type":"array","title":"Response List Builtin Tools Api V0 Agent Tools Builtin Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v0/agent/tools":{"post":{"tags":["Agent Tools"],"summary":"Create agent custom tool","description":"Create a new user-defined agent tool. Pass draft=true to generate a tool definition from a natural-language description without persisting it.","operationId":"create_agent_custom_tool_api_v0_agent_tools_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"draft","in":"query","required":false,"schema":{"type":"boolean","description":"When true, generate a tool definition without saving.","default":false,"title":"Draft"},"description":"When true, generate a tool definition without saving."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCustomToolCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AgentCustomToolPostResponse"},{"$ref":"#/components/schemas/AgentCustomToolGenerateResponse"}],"title":"Response Create Agent Custom Tool Api V0 Agent Tools Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Agent Tools"],"summary":"List agent custom tools","description":"List all custom tools for the current user.","operationId":"list_agent_custom_tools_api_v0_agent_tools_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCustomToolListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/agent/tools/{tool_id}":{"get":{"tags":["Agent Tools"],"summary":"Get agent custom tool","description":"Get an agent custom tool by ID.","operationId":"get_agent_custom_tool_api_v0_agent_tools__tool_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Tool Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCustomToolGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Agent Tools"],"summary":"Update agent custom tool","description":"Update an agent custom tool.","operationId":"update_agent_custom_tool_api_v0_agent_tools__tool_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Tool Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCustomToolUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCustomToolGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Agent Tools"],"summary":"Delete agent custom tool","description":"Delete an agent custom tool.","operationId":"delete_agent_custom_tool_api_v0_agent_tools__tool_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Tool Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCustomToolDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-bases":{"post":{"tags":["Knowledge Bases"],"summary":"Create knowledge base","description":"Create a new knowledge base.","operationId":"create_knowledge_base_api_v0_knowledge_bases_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBasePostResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Knowledge Bases"],"summary":"List knowledge bases","description":"List all knowledge bases for the current user.","operationId":"list_knowledge_bases_api_v0_knowledge_bases_get","security":[{"HTTPBearer":[]}],"parameters":[{"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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-bases/stats":{"get":{"tags":["Knowledge Bases"],"summary":"Get all document stats","description":"Get component statistics across all of the user's documents.","operationId":"get_all_document_stats_api_v0_knowledge_bases_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseStatsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v0/knowledge-bases/stats/token-usage":{"get":{"tags":["Knowledge Bases"],"summary":"Get all document token usage","description":"Get token usage / cost tracking across all of the user's documents.","operationId":"get_all_document_token_usage_api_v0_knowledge_bases_stats_token_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenUsageResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v0/knowledge-bases/{kb_id}/token-usage":{"get":{"tags":["Knowledge Bases"],"summary":"Get knowledge base token usage","description":"Get token usage / cost tracking for a knowledge base.","operationId":"get_knowledge_base_token_usage_api_v0_knowledge_bases__kb_id__token_usage_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenUsageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-bases/{kb_id}/visual-components/search":{"get":{"tags":["Knowledge Bases"],"summary":"Search knowledge base visual components","description":"Search visual component labels, descriptions, and content within a knowledge base using a literal, case-insensitive keyword.","operationId":"search_knowledge_base_visual_components_api_v0_knowledge_bases__kb_id__visual_components_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}},{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":256,"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseVisualComponentSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-bases/{kb_id}":{"get":{"tags":["Knowledge Bases"],"summary":"Get knowledge base","description":"Get a knowledge base by ID.","operationId":"get_knowledge_base_api_v0_knowledge_bases__kb_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Knowledge Bases"],"summary":"Update knowledge base","description":"Update a knowledge base.","operationId":"update_knowledge_base_api_v0_knowledge_bases__kb_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Knowledge Bases"],"summary":"Delete knowledge base","description":"Delete a knowledge base.","operationId":"delete_knowledge_base_api_v0_knowledge_bases__kb_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-bases/{kb_id}/stats":{"get":{"tags":["Knowledge Bases"],"summary":"Get knowledge base stats","description":"Get component statistics for a knowledge base.","operationId":"get_knowledge_base_stats_api_v0_knowledge_bases__kb_id__stats_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-bases/{kb_id}/documents":{"post":{"tags":["Knowledge Bases"],"summary":"Add document to knowledge base","description":"Add a document to a knowledge base.","operationId":"add_document_to_knowledge_base_api_v0_knowledge_bases__kb_id__documents_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseAddDocumentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Document To Knowledge Base Api V0 Knowledge Bases  Kb Id  Documents Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-bases/{kb_id}/documents/{document_id}":{"delete":{"tags":["Knowledge Bases"],"summary":"Remove document from knowledge base","description":"Remove a document from a knowledge base.","operationId":"remove_document_from_knowledge_base_api_v0_knowledge_bases__kb_id__documents__document_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Remove Document From Knowledge Base Api V0 Knowledge Bases  Kb Id  Documents  Document Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-bases/{kb_id}/folders":{"post":{"tags":["Knowledge Bases"],"summary":"Add folder to knowledge base","description":"Add a folder to a knowledge base.","operationId":"add_folder_to_knowledge_base_api_v0_knowledge_bases__kb_id__folders_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseAddFolderRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Folder To Knowledge Base Api V0 Knowledge Bases  Kb Id  Folders Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-bases/{kb_id}/folders/{folder_id}":{"delete":{"tags":["Knowledge Bases"],"summary":"Remove folder from knowledge base","description":"Remove a folder from a knowledge base.","operationId":"remove_folder_from_knowledge_base_api_v0_knowledge_bases__kb_id__folders__folder_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}},{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Remove Folder From Knowledge Base Api V0 Knowledge Bases  Kb Id  Folders  Folder Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-bases/{kb_id}/schemas":{"post":{"tags":["Knowledge Bases"],"summary":"Generate KB schema","description":"Create a schema row and enqueue LLM-powered schema generation.","operationId":"create_kb_schema_api_v0_knowledge_bases__kb_id__schemas_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KBSchemaCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KBSchemaPostResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Knowledge Bases"],"summary":"List KB schemas","description":"List all schemas for a knowledge base.","operationId":"list_kb_schemas_api_v0_knowledge_bases__kb_id__schemas_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KBSchemaListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-bases/{kb_id}/schemas/{schema_id}":{"get":{"tags":["Knowledge Bases"],"summary":"Get KB schema","description":"Get a specific schema for a knowledge base.","operationId":"get_kb_schema_api_v0_knowledge_bases__kb_id__schemas__schema_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}},{"name":"schema_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Schema Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KBSchemaGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Knowledge Bases"],"summary":"Update KB schema","description":"Update a schema's JSON definition or metadata.","operationId":"update_kb_schema_api_v0_knowledge_bases__kb_id__schemas__schema_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}},{"name":"schema_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Schema Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KBSchemaUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KBSchemaGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Knowledge Bases"],"summary":"Delete KB schema","description":"Delete a schema and all its extractions.","operationId":"delete_kb_schema_api_v0_knowledge_bases__kb_id__schemas__schema_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}},{"name":"schema_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Schema Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KBSchemaDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-bases/{kb_id}/extractions":{"post":{"tags":["Knowledge Bases"],"summary":"Run KB extraction","description":"Run structured extraction against all KB documents using the active schema.","operationId":"run_extraction_api_v0_knowledge_bases__kb_id__extractions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}},{"name":"schema_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Schema ID to use. Defaults to the active schema.","title":"Schema Id"},"description":"Schema ID to use. Defaults to the active schema."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KBExtractionPostResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Knowledge Bases"],"summary":"List KB extractions","description":"List extraction results for a knowledge base schema.","operationId":"list_extractions_api_v0_knowledge_bases__kb_id__extractions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}},{"name":"schema_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Schema ID to list extractions for. Defaults to the active schema.","title":"Schema Id"},"description":"Schema ID to list extractions for. Defaults to the active schema."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KBExtractionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-bases/{kb_id}/extractions/{extraction_id}":{"get":{"tags":["Knowledge Bases"],"summary":"Get KB extraction","description":"Get a specific extraction result.","operationId":"get_extraction_api_v0_knowledge_bases__kb_id__extractions__extraction_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}},{"name":"extraction_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Extraction Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KBExtractionGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/packages":{"get":{"tags":["Knowledge Graphs"],"summary":"List KG packages","description":"Returns all code-defined KG packages.","operationId":"list_packages_api_v0_knowledge_graphs_packages_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PackageSummary"},"type":"array","title":"Response List Packages Api V0 Knowledge Graphs Packages Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v0/knowledge-graphs/packages/{slug}/{version}":{"get":{"tags":["Knowledge Graphs"],"summary":"Get KG package contents","description":"Returns the full entity and relationship type metadata for one Package, joining the package's id lists against ENTITY_TYPE_REGISTRY and RELATIONSHIP_TYPE_REGISTRY.","operationId":"get_package_contents_api_v0_knowledge_graphs_packages__slug___version__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageContents"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/subscriptions":{"get":{"tags":["Knowledge Graphs"],"summary":"List package subscriptions for a KG","operationId":"list_subscriptions_api_v0_knowledge_graphs__kg_id__subscriptions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionResponse"},"title":"Response List Subscriptions Api V0 Knowledge Graphs  Kg Id  Subscriptions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Knowledge Graphs"],"summary":"Subscribe KG to a package","operationId":"subscribe_api_v0_knowledge_graphs__kg_id__subscriptions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/subscriptions/{package_slug}":{"delete":{"tags":["Knowledge Graphs"],"summary":"Unsubscribe KG from a package","operationId":"unsubscribe_api_v0_knowledge_graphs__kg_id__subscriptions__package_slug__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"package_slug","in":"path","required":true,"schema":{"type":"string","title":"Package Slug"}},{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Unsubscribe Api V0 Knowledge Graphs  Kg Id  Subscriptions  Package Slug  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/documents/upload":{"post":{"tags":["Knowledge Graphs"],"summary":"Upload a document into a knowledge graph","description":"Uploads a file, creates a Document, associates it with the KG, and kicks off the standard document processing pipeline.","operationId":"upload_kg_document_api_v0_knowledge_graphs__kg_id__documents_upload_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_kg_document_api_v0_knowledge_graphs__kg_id__documents_upload_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPostResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/archive":{"get":{"tags":["Knowledge Graphs"],"summary":"Download a knowledge graph's .zip archive","description":"Bundles the KG's package subscriptions, documents (raw uploads + display assets), visual components, nodes, edges, extraction provenance, complete attribute-claim history, and fact resolutions into a single .zip suitable for rebuilding a new KG via POST /archive.","operationId":"export_knowledge_graph_api_v0_knowledge_graphs__kg_id__archive_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}},"application/zip":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/archive":{"post":{"tags":["Knowledge Graphs"],"summary":"Create a knowledge graph from a .zip archive","description":"Creates a brand-new knowledge graph owned by the caller from a .zip produced by GET /{kg_id}/archive. All ids are reminted, so uploading the same archive repeatedly produces independent graphs. Fails with 400 if the archive references a package not available in this deployment.","operationId":"import_knowledge_graph_api_v0_knowledge_graphs_archive_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_knowledge_graph_api_v0_knowledge_graphs_archive_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/op_core__api__endpoints__knowledge_graphs__archive__ImportArchiveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v0/knowledge-graphs":{"post":{"tags":["Knowledge Graphs"],"summary":"Create knowledge graph","operationId":"create_knowledge_graph_api_v0_knowledge_graphs_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeGraphCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeGraphResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Knowledge Graphs"],"summary":"List knowledge graphs","operationId":"list_knowledge_graphs_api_v0_knowledge_graphs_get","security":[{"HTTPBearer":[]}],"parameters":[{"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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeGraphListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}":{"get":{"tags":["Knowledge Graphs"],"summary":"Get knowledge graph","operationId":"get_knowledge_graph_api_v0_knowledge_graphs__kg_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeGraphResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Knowledge Graphs"],"summary":"Update knowledge graph","operationId":"update_knowledge_graph_api_v0_knowledge_graphs__kg_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeGraphUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeGraphResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Knowledge Graphs"],"summary":"Delete knowledge graph","operationId":"delete_knowledge_graph_api_v0_knowledge_graphs__kg_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeGraphDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/documents":{"post":{"tags":["Knowledge Graphs"],"summary":"Add document to knowledge graph","operationId":"add_document_to_knowledge_graph_api_v0_knowledge_graphs__kg_id__documents_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeGraphAddDocumentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Document To Knowledge Graph Api V0 Knowledge Graphs  Kg Id  Documents Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Knowledge Graphs"],"summary":"List documents in knowledge graph","description":"Paginated list of documents associated with the knowledge graph. Same response shape as GET /documents; KG ownership is the authorization boundary (404 if the KG isn't found or owned).","operationId":"list_knowledge_graph_documents_api_v0_knowledge_graphs__kg_id__documents_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Maximum number of documents to return per page.","default":50,"title":"Limit"},"description":"Maximum number of documents to return per page."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of documents to skip.","default":0,"title":"Offset"},"description":"Number of documents to skip."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/documents/{document_id}":{"delete":{"tags":["Knowledge Graphs"],"summary":"Remove document from knowledge graph","operationId":"remove_document_from_knowledge_graph_api_v0_knowledge_graphs__kg_id__documents__document_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Remove Document From Knowledge Graph Api V0 Knowledge Graphs  Kg Id  Documents  Document Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/graph":{"get":{"tags":["Knowledge Graphs"],"summary":"Dump the entire KG for visualization","description":"Returns all nodes + edges + associated documents in one round-trip. Each edge references its endpoints by node public_id, resolved against ``nodes`` in the same payload. Intended for the map-view; the agent should use the more targeted neighbors and list endpoints.","operationId":"get_knowledge_graph_graph_api_v0_knowledge_graphs__kg_id__graph_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeGraphGraphResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/stats":{"get":{"tags":["Knowledge Graphs"],"summary":"Get knowledge graph stats","description":"Get component statistics across all documents in the KG.","operationId":"get_knowledge_graph_stats_api_v0_knowledge_graphs__kg_id__stats_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeGraphStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/nodes":{"post":{"tags":["Knowledge Graphs"],"summary":"Create KG node","operationId":"create_node_api_v0_knowledge_graphs__kg_id__nodes_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodeCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Knowledge Graphs"],"summary":"List nodes in a KG","description":"All nodes in the KG, optionally narrowed to a tier ('representation' | 'domain') and/or a type_id.","operationId":"list_nodes_api_v0_knowledge_graphs__kg_id__nodes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}},{"name":"tier","in":"query","required":false,"schema":{"anyOf":[{"enum":["representation","domain"],"type":"string"},{"type":"null"}],"description":"Narrow to one ontology tier.","title":"Tier"},"description":"Narrow to one ontology tier."},{"name":"type_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Narrow to one entity type id.","title":"Type Id"},"description":"Narrow to one entity type id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NodeResponse"},"title":"Response List Nodes Api V0 Knowledge Graphs  Kg Id  Nodes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Knowledge Graphs"],"summary":"Delete ALL nodes and edges in a KG","description":"Clears the knowledge graph: every node and every edge — projected, bootstrapped, and manually created alike — is deleted. Documents, their visual components, and package subscriptions are untouched, so a subsequent initialize/project starts from a clean slate. If extraction provenance, current/historical claims, or resolutions exist, the request returns 409 unless discard_evidence=true explicitly permits their permanent deletion. Export an archive before discarding them.","operationId":"delete_all_nodes_api_v0_knowledge_graphs__kg_id__nodes_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}},{"name":"discard_evidence","in":"query","required":false,"schema":{"type":"boolean","description":"Explicitly and permanently delete all extraction runs, extraction sources, current or historical attribute claims, and fact resolutions with the graph.","default":false,"title":"Discard Evidence"},"description":"Explicitly and permanently delete all extraction runs, extraction sources, current or historical attribute claims, and fact resolutions with the graph."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodesDeleteAllResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/nodes/{node_id}":{"patch":{"tags":["Knowledge Graphs"],"summary":"Update KG node","operationId":"update_node_api_v0_knowledge_graphs__kg_id__nodes__node_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Node Id"}},{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodeUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Knowledge Graphs"],"summary":"Delete KG node","operationId":"delete_node_api_v0_knowledge_graphs__kg_id__nodes__node_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Node Id"}},{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Node Api V0 Knowledge Graphs  Kg Id  Nodes  Node Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/nodes/{node_id}/neighbors":{"get":{"tags":["Knowledge Graphs"],"summary":"Get node neighbors","description":"One-hop walk: every edge incident to the node, with the peer node on the other end resolved. ``outgoing`` are edges whose source is this node; ``incoming`` are edges whose target is this node.","operationId":"get_node_neighbors_api_v0_knowledge_graphs__kg_id__nodes__node_id__neighbors_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Node Id"}},{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodeNeighborsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/nodes/initialize":{"post":{"tags":["Knowledge Graphs"],"summary":"Bootstrap nodes from documents (non-destructive)","operationId":"initialize_nodes_api_v0_knowledge_graphs__kg_id__nodes_initialize_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}},{"name":"distance_threshold","in":"query","required":false,"schema":{"type":"number","maximum":10.0,"minimum":0.0,"description":"Average-linkage cut height for the classify stage, in edit-distance units: tags whose average inter-cluster distance stays below this merge into one class_id. Lower → more, tighter classes; 0 puts every tag in its own class. Only used by the tag-bootstrap path.","default":2.0,"title":"Distance Threshold"},"description":"Average-linkage cut height for the classify stage, in edit-distance units: tags whose average inter-cluster distance stays below this merge into one class_id. Lower → more, tighter classes; 0 puts every tag in its own class. Only used by the tag-bootstrap path."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodesInitializeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/nodes/project":{"post":{"tags":["Knowledge Graphs"],"summary":"Rebuild nodes from schematic drawings (destructive)","description":"Drops EVERY node and edge in the knowledge graph — including manually created ones — and re-projects its schematic drawings from scratch. If extraction provenance, current/historical claims, or resolutions exist, the request returns 409 unless discard_evidence=true explicitly permits their permanent deletion. Export an archive before discarding them. 409 when no document carries a projectable schematic graph (nothing would be rebuilt, so nothing is dropped).","operationId":"project_nodes_api_v0_knowledge_graphs__kg_id__nodes_project_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}},{"name":"discard_evidence","in":"query","required":false,"schema":{"type":"boolean","description":"Explicitly and permanently delete all extraction runs, extraction sources, current or historical attribute claims, and fact resolutions before rebuilding.","default":false,"title":"Discard Evidence"},"description":"Explicitly and permanently delete all extraction runs, extraction sources, current or historical attribute claims, and fact resolutions before rebuilding."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/nodes/extract-fields":{"post":{"tags":["Knowledge Graphs"],"summary":"Run the VLM field-extraction pass over evidence occurrences","operationId":"extract_node_fields_endpoint_api_v0_knowledge_graphs__kg_id__nodes_extract_fields_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodeFieldExtractionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KGEntityExtractionPostResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/nodes/{node_id}/facts":{"get":{"tags":["Knowledge Graphs"],"summary":"Get current entity attribute facts","operationId":"get_entity_facts_api_v0_knowledge_graphs__kg_id__nodes__node_id__facts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Node Id"}},{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityFactsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/conflicts":{"get":{"tags":["Knowledge Graphs"],"summary":"List current entity attribute conflicts","operationId":"list_knowledge_graph_conflicts_api_v0_knowledge_graphs__kg_id__conflicts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeGraphConflictsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/nodes/{node_id}/resolutions":{"post":{"tags":["Knowledge Graphs"],"summary":"Create or replace an attribute fact resolution","operationId":"write_fact_resolution_api_v0_knowledge_graphs__kg_id__nodes__node_id__resolutions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Node Id"}},{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FactResolutionWriteRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FactResolutionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Knowledge Graphs"],"summary":"Get attribute fact resolution history","operationId":"get_resolution_history_api_v0_knowledge_graphs__kg_id__nodes__node_id__resolutions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Node Id"}},{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}},{"name":"predicate","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"title":"Predicate"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FactResolutionHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/nodes/{node_id}/resolutions/current":{"get":{"tags":["Knowledge Graphs"],"summary":"Get the current attribute fact resolution","operationId":"get_current_resolution_api_v0_knowledge_graphs__kg_id__nodes__node_id__resolutions_current_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Node Id"}},{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}},{"name":"predicate","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"title":"Predicate"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentFactResolutionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/nodes/{source_id}/merge":{"post":{"tags":["Knowledge Graphs"],"summary":"Merge one domain entity into another","operationId":"merge_entity_api_v0_knowledge_graphs__kg_id__nodes__source_id__merge_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}},{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityMergeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityMergeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/nodes/{occurrence_id}/rebind":{"post":{"tags":["Knowledge Graphs"],"summary":"Rebind an evidence occurrence to another domain entity","operationId":"rebind_evidence_api_v0_knowledge_graphs__kg_id__nodes__occurrence_id__rebind_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"occurrence_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Occurrence Id"}},{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceRebindRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/edges":{"post":{"tags":["Knowledge Graphs"],"summary":"Create KG edge","operationId":"create_edge_api_v0_knowledge_graphs__kg_id__edges_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgeCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Knowledge Graphs"],"summary":"List edges in a KG","operationId":"list_edges_api_v0_knowledge_graphs__kg_id__edges_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EdgeResponse"},"title":"Response List Edges Api V0 Knowledge Graphs  Kg Id  Edges Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/edges/{edge_id}":{"patch":{"tags":["Knowledge Graphs"],"summary":"Update KG edge","operationId":"update_edge_api_v0_knowledge_graphs__kg_id__edges__edge_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"edge_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Edge Id"}},{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgeUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Knowledge Graphs"],"summary":"Delete KG edge","operationId":"delete_edge_api_v0_knowledge_graphs__kg_id__edges__edge_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"edge_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Edge Id"}},{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Edge Api V0 Knowledge Graphs  Kg Id  Edges  Edge Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/entity-types":{"get":{"tags":["Knowledge Graphs"],"summary":"List entity types available to a KG (package + custom)","operationId":"list_entity_types_api_v0_knowledge_graphs__kg_id__entity_types_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EntityTypeCatalogItem"},"title":"Response List Entity Types Api V0 Knowledge Graphs  Kg Id  Entity Types Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Knowledge Graphs"],"summary":"Create a custom entity type","operationId":"create_entity_type_api_v0_knowledge_graphs__kg_id__entity_types_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityTypeUpsertRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityTypeCatalogItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/entity-types/{type_public_id}":{"put":{"tags":["Knowledge Graphs"],"summary":"Update a custom entity type","operationId":"update_entity_type_api_v0_knowledge_graphs__kg_id__entity_types__type_public_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"type_public_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Type Public Id"}},{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityTypeUpsertRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityTypeCatalogItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Knowledge Graphs"],"summary":"Delete a custom entity type","operationId":"delete_entity_type_api_v0_knowledge_graphs__kg_id__entity_types__type_public_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"type_public_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Type Public Id"}},{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Entity Type Api V0 Knowledge Graphs  Kg Id  Entity Types  Type Public Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/relationship-types":{"get":{"tags":["Knowledge Graphs"],"summary":"List relationship types available to a KG (package + custom)","operationId":"list_relationship_types_api_v0_knowledge_graphs__kg_id__relationship_types_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RelationshipTypeCatalogItem"},"title":"Response List Relationship Types Api V0 Knowledge Graphs  Kg Id  Relationship Types Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Knowledge Graphs"],"summary":"Create a custom relationship type","operationId":"create_relationship_type_api_v0_knowledge_graphs__kg_id__relationship_types_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipTypeUpsertRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipTypeCatalogItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/relationship-types/{type_public_id}":{"put":{"tags":["Knowledge Graphs"],"summary":"Update a custom relationship type","operationId":"update_relationship_type_api_v0_knowledge_graphs__kg_id__relationship_types__type_public_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"type_public_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Type Public Id"}},{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipTypeUpsertRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipTypeCatalogItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Knowledge Graphs"],"summary":"Delete a custom relationship type","operationId":"delete_relationship_type_api_v0_knowledge_graphs__kg_id__relationship_types__type_public_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"type_public_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Type Public Id"}},{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Relationship Type Api V0 Knowledge Graphs  Kg Id  Relationship Types  Type Public Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/import":{"post":{"tags":["Knowledge Graphs"],"summary":"Bulk import nodes and edges","description":"Atomically creates a batch of nodes and edges. Each node may carry a ``ref`` string that edges in the same request can resolve as ``source_ref`` / ``target_ref``. The whole batch rolls back if any item fails validation.","operationId":"bulk_import_api_v0_knowledge_graphs__kg_id__import_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkImportRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkImportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/aircraft/continuity-checklist":{"get":{"tags":["Knowledge Graphs"],"summary":"Regenerate the wiring continuity checklist (xlsx / csv)","operationId":"aircraft_continuity_checklist_api_v0_knowledge_graphs__kg_id__aircraft_continuity_checklist_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}},{"name":"vc_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Scope the checklist to a single sheet (visual component).","title":"Vc Id"},"description":"Scope the checklist to a single sheet (visual component)."},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(xlsx|csv)$","description":"Output format: 'xlsx' (default) or 'csv'.","default":"xlsx","title":"Format"},"description":"Output format: 'xlsx' (default) or 'csv'."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{},"text/csv":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/knowledge-graphs/{kg_id}/aircraft/neo4j-export":{"get":{"tags":["Knowledge Graphs"],"summary":"Export the aircraft harness graph as a neo4j Cypher script","operationId":"aircraft_neo4j_export_api_v0_knowledge_graphs__kg_id__aircraft_neo4j_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kg_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kg Id"}},{"name":"vc_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Scope the export to a single sheet (visual component).","title":"Vc Id"},"description":"Scope the export to a single sheet (visual component)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}},"text/plain":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/experiments/projects":{"get":{"tags":["Experiment Tracker"],"summary":"List projects","description":"List all experiment projects for the current user.","operationId":"list_projects_api_v0_experiments_projects_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ProjectResponse"},"type":"array","title":"Response List Projects Api V0 Experiments Projects Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Experiment Tracker"],"summary":"Create project","description":"Create a new experiment project.","operationId":"create_project_api_v0_experiments_projects_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v0/experiments/projects/{project_id}":{"get":{"tags":["Experiment Tracker"],"summary":"Get project","description":"Get an experiment project with its systems and models.","operationId":"get_project_api_v0_experiments_projects__project_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Experiment Tracker"],"summary":"Update project","description":"Update an experiment project.","operationId":"update_project_api_v0_experiments_projects__project_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Experiment Tracker"],"summary":"Delete project","description":"Delete an experiment project and all its systems and models.","operationId":"delete_project_api_v0_experiments_projects__project_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/experiments/projects/{project_id}/systems":{"post":{"tags":["Experiment Tracker"],"summary":"Create system","description":"Create a new system within a project.","operationId":"create_system_api_v0_experiments_projects__project_id__systems_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/experiments/systems/{system_id}":{"put":{"tags":["Experiment Tracker"],"summary":"Update system","description":"Update an experiment system.","operationId":"update_system_api_v0_experiments_systems__system_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"system_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"System Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Experiment Tracker"],"summary":"Delete system","description":"Delete an experiment system and all its models.","operationId":"delete_system_api_v0_experiments_systems__system_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"system_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"System Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/experiments/systems/{system_id}/models":{"post":{"tags":["Experiment Tracker"],"summary":"Create model","description":"Create a new model within a system.","operationId":"create_model_api_v0_experiments_systems__system_id__models_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"system_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"System Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/experiments/models/{model_id}":{"get":{"tags":["Experiment Tracker"],"summary":"Get model","description":"Get an experiment model with its IO ports.","operationId":"get_model_api_v0_experiments_models__model_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Experiment Tracker"],"summary":"Update model","description":"Update an experiment model.","operationId":"update_model_api_v0_experiments_models__model_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Experiment Tracker"],"summary":"Delete model","description":"Delete an experiment model and all its IO ports.","operationId":"delete_model_api_v0_experiments_models__model_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Model Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/experiments/models/{model_id}/io-ports":{"post":{"tags":["Experiment Tracker"],"summary":"Create IO port","description":"Create an input/output port on a blackbox model.","operationId":"create_io_port_api_v0_experiments_models__model_id__io_ports_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IoPortCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IoPortResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/experiments/models/{model_id}/io-ports/{port_id}":{"put":{"tags":["Experiment Tracker"],"summary":"Update IO port","description":"Update an input/output port on a blackbox model.","operationId":"update_io_port_api_v0_experiments_models__model_id__io_ports__port_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Model Id"}},{"name":"port_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Port Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IoPortUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IoPortResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Experiment Tracker"],"summary":"Delete IO port","description":"Delete an input/output port from a blackbox model.","operationId":"delete_io_port_api_v0_experiments_models__model_id__io_ports__port_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Model Id"}},{"name":"port_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Port Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/experiments/campaigns":{"get":{"tags":["Experiment Tracker"],"summary":"List campaigns","description":"List campaigns for the current user, optionally filtered by model.","operationId":"list_campaigns_api_v0_experiments_campaigns_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CampaignResponse"},"title":"Response List Campaigns Api V0 Experiments Campaigns Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Experiment Tracker"],"summary":"Create campaign","description":"Create a new experiment campaign.","operationId":"create_campaign_api_v0_experiments_campaigns_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/experiments/campaigns/{campaign_id}":{"get":{"tags":["Experiment Tracker"],"summary":"Get campaign","description":"Get a campaign with its constraints, variable states, and runs.","operationId":"get_campaign_api_v0_experiments_campaigns__campaign_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Experiment Tracker"],"summary":"Update campaign","description":"Update an experiment campaign.","operationId":"update_campaign_api_v0_experiments_campaigns__campaign_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Experiment Tracker"],"summary":"Delete campaign","description":"Delete an experiment campaign and all its runs.","operationId":"delete_campaign_api_v0_experiments_campaigns__campaign_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/experiments/campaigns/{campaign_id}/static-constraints":{"put":{"tags":["Experiment Tracker"],"summary":"Set static constraints","description":"Replace all static constraints for a campaign.","operationId":"set_static_constraints_api_v0_experiments_campaigns__campaign_id__static_constraints_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetStaticConstraintsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StaticConstraintResponse"},"title":"Response Set Static Constraints Api V0 Experiments Campaigns  Campaign Id  Static Constraints Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/experiments/campaigns/{campaign_id}/variable-states":{"put":{"tags":["Experiment Tracker"],"summary":"Set variable states","description":"Replace all variable states for a campaign.","operationId":"set_variable_states_api_v0_experiments_campaigns__campaign_id__variable_states_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetVariableStatesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VariableStateResponse"},"title":"Response Set Variable States Api V0 Experiments Campaigns  Campaign Id  Variable States Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/experiments/campaigns/{campaign_id}/runs":{"post":{"tags":["Experiment Tracker"],"summary":"Create run","description":"Create a new run within a campaign.","operationId":"create_run_api_v0_experiments_campaigns__campaign_id__runs_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunCreateRequest"}}}},"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/v0/experiments/campaigns/{campaign_id}/runs/{run_id}":{"put":{"tags":["Experiment Tracker"],"summary":"Update run","description":"Update a run within a campaign.","operationId":"update_run_api_v0_experiments_campaigns__campaign_id__runs__run_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunUpdateRequest"}}}},"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/v0/experiments/models/{model_id}/datasets":{"get":{"tags":["Experiment Tracker"],"summary":"List datasets for a model","description":"List all datasets attached to a model.","operationId":"list_datasets_api_v0_experiments_models__model_id__datasets_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DatasetResponse"},"title":"Response List Datasets Api V0 Experiments Models  Model Id  Datasets Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Experiment Tracker"],"summary":"Create dataset","description":"Upload a CSV/Excel file to create a dataset with parsed column headers.","operationId":"create_dataset_api_v0_experiments_models__model_id__datasets_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Model Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_dataset_api_v0_experiments_models__model_id__datasets_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/experiments/models/{model_id}/datasets/{dataset_id}":{"get":{"tags":["Experiment Tracker"],"summary":"Get dataset","description":"Get a dataset by its public ID.","operationId":"get_dataset_api_v0_experiments_models__model_id__datasets__dataset_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Model Id"}},{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dataset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Experiment Tracker"],"summary":"Update dataset","description":"Update a dataset's metadata.","operationId":"update_dataset_api_v0_experiments_models__model_id__datasets__dataset_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Model Id"}},{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dataset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Experiment Tracker"],"summary":"Delete dataset","description":"Delete a dataset.","operationId":"delete_dataset_api_v0_experiments_models__model_id__datasets__dataset_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Model Id"}},{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dataset Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/experiments/models/{model_id}/datasets/{dataset_id}/column-mappings":{"put":{"tags":["Experiment Tracker"],"summary":"Set column mappings","description":"Set column mappings for a dataset (CSV column name -> IO port public_id).","operationId":"set_column_mappings_api_v0_experiments_models__model_id__datasets__dataset_id__column_mappings_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Model Id"}},{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dataset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ColumnMappingsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/experiments/models/{model_id}/training-runs":{"get":{"tags":["Experiment Tracker"],"summary":"List training runs for a model","description":"List all training runs for a model.","operationId":"list_training_runs_api_v0_experiments_models__model_id__training_runs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TrainingRunResponse"},"title":"Response List Training Runs Api V0 Experiments Models  Model Id  Training Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Experiment Tracker"],"summary":"Create training run","description":"Create a new training run for a model.","operationId":"create_training_run_api_v0_experiments_models__model_id__training_runs_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingRunCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/experiments/models/{model_id}/training-runs/{training_run_id}":{"get":{"tags":["Experiment Tracker"],"summary":"Get training run","description":"Get a training run by its public ID.","operationId":"get_training_run_api_v0_experiments_models__model_id__training_runs__training_run_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Model Id"}},{"name":"training_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Training Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Experiment Tracker"],"summary":"Update training run","description":"Update a training run's status, metrics, or parameters.","operationId":"update_training_run_api_v0_experiments_models__model_id__training_runs__training_run_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Model Id"}},{"name":"training_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Training Run Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingRunUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Experiment Tracker"],"summary":"Delete training run","description":"Delete a training run.","operationId":"delete_training_run_api_v0_experiments_models__model_id__training_runs__training_run_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Model Id"}},{"name":"training_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Training Run Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/semantic-catalog/status":{"get":{"tags":["semantic-catalog"],"summary":"Catalog availability snapshot","operationId":"status_endpoint_api_v0_semantic_catalog_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CfihosCatalogStatus"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v0/semantic-catalog/classes/{code}":{"get":{"tags":["semantic-catalog"],"summary":"Get one CFIHOS class by code","operationId":"get_class_endpoint_api_v0_semantic_catalog_classes__code__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CfihosClass"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/semantic-catalog/classes":{"get":{"tags":["semantic-catalog"],"summary":"Search CFIHOS classes by name / synonym","operationId":"search_classes_endpoint_api_v0_semantic_catalog_classes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Free-form search query","title":"Q"},"description":"Free-form search query"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CfihosClassSearchHit"},"title":"Response Search Classes Endpoint Api V0 Semantic Catalog Classes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/semantic-catalog/classes/{code}/children":{"get":{"tags":["semantic-catalog"],"summary":"Immediate child classes of a parent","operationId":"children_endpoint_api_v0_semantic_catalog_classes__code__children_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CfihosClassSearchHit"},"title":"Response Children Endpoint Api V0 Semantic Catalog Classes  Code  Children Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/semantic-catalog/picklists/{name}":{"get":{"tags":["semantic-catalog"],"summary":"Picklist values by picklist name","operationId":"picklist_endpoint_api_v0_semantic_catalog_picklists__name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CfihosPicklistValue"},"title":"Response Picklist Endpoint Api V0 Semantic Catalog Picklists  Name  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v0/semantic-catalog/classify-legend-entry":{"post":{"tags":["semantic-catalog"],"summary":"Deterministic CFIHOS classification of a single legend entry","description":"Returns the entry with ``cfihos_*`` fields populated using the deterministic seed map + ISA-5.1 parser + catalog name search. Stateless; no DB hit. Frontend uses this during legend auto-populate and after a user edits an entry's name.","operationId":"classify_legend_entry_endpoint_api_v0_semantic_catalog_classify_legend_entry_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyLegendRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegendEntry"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v0/schematic-templates":{"get":{"tags":["schematic-templates"],"summary":"List schematic templates","description":"Returns every known template in picker render order. Only templates with ``status=\"available\"`` are clickable in the UI; ``coming_soon`` cards are surfaced so the picker has consistent product surface.","operationId":"list_templates_endpoint_api_v0_schematic_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Template"},"type":"array","title":"Response List Templates Endpoint Api V0 Schematic Templates Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v0/schematic-templates/{template_id}":{"get":{"tags":["schematic-templates"],"summary":"Get one schematic template","operationId":"get_template_endpoint_api_v0_schematic_templates__template_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AddTagRequest":{"properties":{"tag_names":{"items":{"type":"string"},"type":"array","title":"Tag Names","description":"The names of the tags to add"}},"type":"object","required":["tag_names"],"title":"AddTagRequest"},"AgentAttachmentGetResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The ID of the attachment."},"filename":{"type":"string","title":"Filename","description":"Original filename."},"content_type":{"type":"string","title":"Content Type","description":"MIME type of the attachment."},"size_bytes":{"type":"integer","title":"Size Bytes","description":"File size in bytes."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"Signed URL for downloading the attachment."}},"type":"object","required":["id","filename","content_type","size_bytes"],"title":"AgentAttachmentGetResponse","description":"Response for an attachment on an agent message."},"AgentCustomToolCreateRequest":{"properties":{"tool_type":{"type":"string","enum":["python","prompt","api"],"title":"Tool Type","description":"Tool type: python, prompt, api.","default":"python"},"name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name","description":"The tool name (snake_case). Required when draft=false."},"description":{"type":"string","title":"Description","description":"The tool description.","default":""},"parameters":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Parameters","description":"Parameter definitions [{name, type, description, required}]."},"code":{"type":"string","maxLength":51200,"title":"Code","description":"Code/prompt/config body.","default":""}},"type":"object","title":"AgentCustomToolCreateRequest","description":"Request body for creating an agent custom tool.\n\nWhen draft=true, only the 'description' field is required.\nThe LLM will generate the tool definition from the description.\n\nWhen draft=false (default), 'name' is required and the tool is persisted."},"AgentCustomToolDeleteResponse":{"properties":{"message":{"type":"string","title":"Message","description":"The deletion confirmation message."},"tool_id":{"type":"string","format":"uuid","title":"Tool Id","description":"The ID of the deleted tool."}},"type":"object","required":["message","tool_id"],"title":"AgentCustomToolDeleteResponse","description":"Response for deleting an agent custom tool."},"AgentCustomToolGenerateResponse":{"properties":{"tool_type":{"type":"string","title":"Tool Type","description":"The tool type (python, prompt, api)."},"name":{"type":"string","title":"Name","description":"Generated tool name (snake_case)."},"description":{"type":"string","title":"Description","description":"Generated tool description."},"parameters":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Parameters","description":"Generated parameter definitions."},"code":{"type":"string","title":"Code","description":"Generated code/prompt/config body."}},"type":"object","required":["tool_type","name","description","parameters","code"],"title":"AgentCustomToolGenerateResponse","description":"Response for LLM-generated tool definition."},"AgentCustomToolGetResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The ID of the tool."},"tool_type":{"type":"string","title":"Tool Type","description":"The tool type (python, prompt, api)."},"name":{"type":"string","title":"Name","description":"The name of the tool."},"description":{"type":"string","title":"Description","description":"The description of the tool."},"parameters":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Parameters","description":"The parameter definitions."},"code":{"type":"string","title":"Code","description":"The code/prompt/config body."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the tool was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the tool was last updated."}},"type":"object","required":["id","tool_type","name","description","code","created_at","updated_at"],"title":"AgentCustomToolGetResponse","description":"Response for getting an agent custom tool."},"AgentCustomToolListResponse":{"properties":{"tools":{"items":{"$ref":"#/components/schemas/AgentCustomToolGetResponse"},"type":"array","title":"Tools","description":"The list of custom tools."},"pagination":{"$ref":"#/components/schemas/PaginationMetadata","description":"Pagination metadata."}},"type":"object","required":["tools","pagination"],"title":"AgentCustomToolListResponse","description":"Response for listing agent custom tools."},"AgentCustomToolPostResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The ID of the created tool."},"tool_type":{"type":"string","title":"Tool Type","description":"The tool type (python, prompt, api)."},"name":{"type":"string","title":"Name","description":"The name of the tool."},"description":{"type":"string","title":"Description","description":"The description of the tool."},"parameters":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Parameters","description":"The parameter definitions."},"code":{"type":"string","title":"Code","description":"The code/prompt/config body."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the tool was created."}},"type":"object","required":["id","tool_type","name","description","code","created_at"],"title":"AgentCustomToolPostResponse","description":"Response for creating an agent custom tool."},"AgentCustomToolUpdateRequest":{"properties":{"tool_type":{"anyOf":[{"type":"string","enum":["python","prompt","api"]},{"type":"null"}],"title":"Tool Type","description":"New tool type."},"name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name","description":"New tool name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"New description."},"parameters":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Parameters","description":"New parameter definitions."},"code":{"anyOf":[{"type":"string","maxLength":51200},{"type":"null"}],"title":"Code","description":"New code/prompt/config body."}},"type":"object","title":"AgentCustomToolUpdateRequest","description":"Request body for updating an agent custom tool."},"AgentMessageGetResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The ID of the message."},"role":{"type":"string","title":"Role","description":"The role of the message sender. Options: 'user', 'assistant', 'tool'."},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content","description":"The content of the message."},"tool_calls":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tool Calls","description":"Tool calls for assistant messages."},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Call Id","description":"Tool call ID for tool result messages."},"attachments":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgentAttachmentGetResponse"},"type":"array"},{"type":"null"}],"title":"Attachments","description":"Attachments on this message (images/files)."},"sequence_number":{"type":"integer","title":"Sequence Number","description":"Ordering sequence number."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the message was created."}},"type":"object","required":["id","role","sequence_number","created_at"],"title":"AgentMessageGetResponse","description":"Response for getting an agent message."},"AgentPersonaCreateRequest":{"properties":{"name":{"type":"string","title":"Name","description":"The name of the persona."},"description":{"type":"string","title":"Description","description":"The description of the persona.","default":""},"prompt":{"type":"string","title":"Prompt","description":"The system prompt for the persona.","default":""},"builtin_tool_ids":{"items":{"type":"string"},"type":"array","title":"Builtin Tool Ids","description":"Built-in tool IDs to assign to this persona.","default":[]},"builtin_tool_configs":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Builtin Tool Configs","description":"Per-builtin config, keyed by builtin tool id. Each entry is validated against the Pydantic schema registered for that tool in op_core.builtin_tool_configs. Only configurable builtins (e.g. invoke_persona) accept a config; others must be omitted."},"custom_tool_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Custom Tool Ids","description":"Custom tool UUIDs to assign to this persona.","default":[]},"knowledge_base_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Knowledge Base Ids","description":"Knowledge base UUIDs to assign to this persona.","default":[]},"skill_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Skill Ids","description":"Skill UUIDs to preload — instruction documents the agent can read on demand via the read_skill tool.","default":[]}},"type":"object","required":["name"],"title":"AgentPersonaCreateRequest","description":"Request body for creating an agent persona."},"AgentPersonaDeleteResponse":{"properties":{"message":{"type":"string","title":"Message","description":"The deletion confirmation message."},"persona_id":{"type":"string","format":"uuid","title":"Persona Id","description":"The ID of the deleted persona."}},"type":"object","required":["message","persona_id"],"title":"AgentPersonaDeleteResponse","description":"Response for deleting an agent persona."},"AgentPersonaGetResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The ID of the persona."},"name":{"type":"string","title":"Name","description":"The name of the persona."},"description":{"type":"string","title":"Description","description":"The description of the persona."},"prompt":{"type":"string","title":"Prompt","description":"The system prompt for the persona."},"builtin_tool_ids":{"items":{"type":"string"},"type":"array","title":"Builtin Tool Ids","description":"Built-in tool IDs assigned to this persona.","default":[]},"builtin_tool_configs":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Builtin Tool Configs","description":"Per-builtin config keyed by tool id. Only configurable builtins (currently invoke_persona) carry config; the dict is sparse."},"custom_tool_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Custom Tool Ids","description":"Custom tool UUIDs assigned to this persona.","default":[]},"knowledge_base_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Knowledge Base Ids","description":"Knowledge base UUIDs assigned to this persona.","default":[]},"skill_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Skill Ids","description":"Skill UUIDs preloaded by this persona — instruction documents the agent can read on demand via the read_skill tool.","default":[]},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the persona was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the persona was last updated."}},"type":"object","required":["id","name","description","prompt","created_at","updated_at"],"title":"AgentPersonaGetResponse","description":"Response for getting an agent persona."},"AgentPersonaListResponse":{"properties":{"personas":{"items":{"$ref":"#/components/schemas/AgentPersonaGetResponse"},"type":"array","title":"Personas","description":"The list of agent personas."},"pagination":{"$ref":"#/components/schemas/PaginationMetadata","description":"Pagination metadata."}},"type":"object","required":["personas","pagination"],"title":"AgentPersonaListResponse","description":"Response for listing agent personas."},"AgentPersonaPostResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The ID of the created persona."},"name":{"type":"string","title":"Name","description":"The name of the persona."},"description":{"type":"string","title":"Description","description":"The description of the persona."},"prompt":{"type":"string","title":"Prompt","description":"The system prompt for the persona."},"builtin_tool_ids":{"items":{"type":"string"},"type":"array","title":"Builtin Tool Ids","description":"Built-in tool IDs assigned to this persona.","default":[]},"builtin_tool_configs":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Builtin Tool Configs","description":"Per-builtin config keyed by tool id (sparse)."},"custom_tool_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Custom Tool Ids","description":"Custom tool UUIDs assigned to this persona.","default":[]},"knowledge_base_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Knowledge Base Ids","description":"Knowledge base UUIDs assigned to this persona.","default":[]},"skill_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Skill Ids","description":"Skill UUIDs preloaded by this persona.","default":[]},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the persona was created."}},"type":"object","required":["id","name","description","prompt","created_at"],"title":"AgentPersonaPostResponse","description":"Response for creating an agent persona."},"AgentPersonaUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"New name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"New description."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt","description":"New system prompt."},"builtin_tool_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Builtin Tool Ids"},"builtin_tool_configs":{"anyOf":[{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object"},{"type":"null"}],"title":"Builtin Tool Configs","description":"Replace the per-builtin config dict wholesale. None means leave it alone; an empty dict clears all per-builtin config."},"custom_tool_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Custom Tool Ids"},"knowledge_base_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Knowledge Base Ids"},"skill_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Skill Ids","description":"New full skill list (replaces existing). None means leave the existing associations alone; an empty list means clear them."}},"type":"object","title":"AgentPersonaUpdateRequest","description":"Request body for updating an agent persona."},"AgentRunGetResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The ID of the run."},"status":{"type":"string","title":"Status","description":"The status of the run. Options: 'running', 'completed', 'error', 'cancelled'."},"input_message":{"type":"string","title":"Input Message","description":"The user's input message."},"final_response":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Final Response","description":"The agent's final response."},"total_iterations":{"type":"integer","title":"Total Iterations","description":"Total agent loop iterations."},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message","description":"Error message if the run failed."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the run was created."},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At","description":"When the run completed."}},"type":"object","required":["id","status","input_message","final_response","total_iterations","error_message","created_at","completed_at"],"title":"AgentRunGetResponse","description":"Response for getting an agent run."},"AgentRunListResponse":{"properties":{"runs":{"items":{"$ref":"#/components/schemas/AgentRunGetResponse"},"type":"array","title":"Runs","description":"The list of agent runs."}},"type":"object","required":["runs"],"title":"AgentRunListResponse","description":"Response for listing agent runs."},"AgentRunPostResponse":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id","description":"The ID of the created run."},"job_status_id":{"type":"string","format":"uuid","title":"Job Status Id","description":"The job status ID for polling completion."},"session_id":{"type":"string","format":"uuid","title":"Session Id","description":"The ID of the session."},"status":{"type":"string","title":"Status","description":"The initial status of the run."}},"type":"object","required":["run_id","job_status_id","session_id","status"],"title":"AgentRunPostResponse","description":"Response for creating an agent run."},"AgentRunRequest":{"properties":{"message":{"type":"string","title":"Message","description":"The user's input message."},"attachment_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Attachment Ids","description":"Public IDs of uploaded attachments to include with the message. Max 8."}},"type":"object","required":["message"],"title":"AgentRunRequest","description":"Request body for running the agent."},"AgentSessionCreateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Optional name for the session."},"persona_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Persona Id","description":"Optional persona ID. The persona defines the agent's prompt, tools, and knowledge bases. When null, uses the default persona."},"settings":{"anyOf":[{"$ref":"#/components/schemas/AgentSessionSettings"},{"type":"null"}],"description":"Optional session settings (e.g. max_iterations)."}},"type":"object","title":"AgentSessionCreateRequest","description":"Request body for creating an agent session."},"AgentSessionDeleteResponse":{"properties":{"message":{"type":"string","title":"Message","description":"The deletion confirmation message."},"session_id":{"type":"string","format":"uuid","title":"Session Id","description":"The ID of the deleted session."}},"type":"object","required":["message","session_id"],"title":"AgentSessionDeleteResponse","description":"Response for deleting an agent session."},"AgentSessionGetResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The ID of the session."},"persona_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Persona Id","description":"The ID of the persona used by this session. Null means default persona."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The name of the session."},"status":{"type":"string","title":"Status","description":"The status of the session. Options: 'active', 'completed', 'error'."},"settings":{"anyOf":[{"$ref":"#/components/schemas/AgentSessionSettings"},{"type":"null"}],"description":"Session settings."},"message_count":{"type":"integer","title":"Message Count","description":"The number of messages in the session."},"is_roaming":{"type":"boolean","title":"Is Roaming","description":"True iff this session's persona exposes any fs_* / fs_bash tool and therefore has a workspace directory the agent reads/writes.","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the session was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the session was last updated."}},"type":"object","required":["id","name","status","settings","message_count","created_at","updated_at"],"title":"AgentSessionGetResponse","description":"Response for getting an agent session."},"AgentSessionListResponse":{"properties":{"sessions":{"items":{"$ref":"#/components/schemas/AgentSessionGetResponse"},"type":"array","title":"Sessions","description":"The list of agent sessions."},"pagination":{"$ref":"#/components/schemas/PaginationMetadata","description":"Pagination metadata."}},"type":"object","required":["sessions","pagination"],"title":"AgentSessionListResponse","description":"Response for listing agent sessions."},"AgentSessionPostResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The ID of the created session."},"persona_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Persona Id","description":"The ID of the persona used by this session. Null means default persona."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The name of the session."},"status":{"type":"string","title":"Status","description":"The status of the session."},"settings":{"anyOf":[{"$ref":"#/components/schemas/AgentSessionSettings"},{"type":"null"}],"description":"Session settings."},"is_roaming":{"type":"boolean","title":"Is Roaming","description":"True iff this session's persona exposes any fs_* / fs_bash tool and therefore has a workspace directory the agent reads/writes.","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the session was created."}},"type":"object","required":["id","name","status","settings","created_at"],"title":"AgentSessionPostResponse","description":"Response for creating an agent session."},"AgentSessionSettings":{"properties":{"max_iterations":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Iterations","description":"Maximum number of agent loop iterations. When null, uses server default (30)."}},"type":"object","title":"AgentSessionSettings","description":"Settings for an agent session."},"AgentSessionUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"New name for the session."},"persona_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Persona Id","description":"New persona ID for the session."},"settings":{"anyOf":[{"$ref":"#/components/schemas/AgentSessionSettings"},{"type":"null"}],"description":"New settings for the session."}},"type":"object","title":"AgentSessionUpdateRequest","description":"Request body for updating an agent session."},"AgentSkillCreateRequest":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name","description":"The name of the skill."},"description":{"type":"string","maxLength":1024,"title":"Description","description":"One-line description shown to the agent in the persona's available-skills list.","default":""},"body":{"type":"string","maxLength":65536,"title":"Body","description":"Markdown body — the SKILL.md-style content the agent reads via the read_skill tool when invoking this skill.","default":""}},"type":"object","required":["name"],"title":"AgentSkillCreateRequest","description":"Request body for creating an agent skill."},"AgentSkillDeleteResponse":{"properties":{"message":{"type":"string","title":"Message","description":"The deletion confirmation message."},"skill_id":{"type":"string","format":"uuid","title":"Skill Id","description":"The ID of the deleted skill."}},"type":"object","required":["message","skill_id"],"title":"AgentSkillDeleteResponse","description":"Response for deleting an agent skill."},"AgentSkillGetResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The ID of the skill."},"name":{"type":"string","title":"Name","description":"The name of the skill."},"description":{"type":"string","title":"Description","description":"The description of the skill."},"body":{"type":"string","title":"Body","description":"Markdown body of the skill — what the agent reads via the read_skill builtin tool when a persona has preloaded it.","default":""},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the skill was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the skill was last updated."}},"type":"object","required":["id","name","description","created_at","updated_at"],"title":"AgentSkillGetResponse","description":"Response for getting an agent skill (instruction document)."},"AgentSkillListResponse":{"properties":{"skills":{"items":{"$ref":"#/components/schemas/AgentSkillGetResponse"},"type":"array","title":"Skills","description":"The list of agent skills."},"pagination":{"$ref":"#/components/schemas/PaginationMetadata","description":"Pagination metadata."}},"type":"object","required":["skills","pagination"],"title":"AgentSkillListResponse","description":"Response for listing agent skills."},"AgentSkillPostResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The ID of the created skill."},"name":{"type":"string","title":"Name","description":"The name of the skill."},"description":{"type":"string","title":"Description","description":"The description of the skill."},"body":{"type":"string","title":"Body","description":"Markdown body of the skill.","default":""},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the skill was created."}},"type":"object","required":["id","name","description","created_at"],"title":"AgentSkillPostResponse","description":"Response for creating an agent skill."},"AgentSkillUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name","description":"New name."},"description":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"Description","description":"New description."},"body":{"anyOf":[{"type":"string","maxLength":65536},{"type":"null"}],"title":"Body","description":"New markdown body."}},"type":"object","title":"AgentSkillUpdateRequest","description":"Request body for updating an agent skill."},"AgentWorkspaceBlobResponse":{"properties":{"sha256":{"type":"string","title":"Sha256"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["sha256","size"],"title":"AgentWorkspaceBlobResponse","description":"Result of uploading one content-addressed blob."},"AgentWorkspaceCommitResponse":{"properties":{"version_id":{"type":"string","title":"Version Id"},"file_count":{"type":"integer","title":"File Count"},"total_bytes":{"type":"integer","title":"Total Bytes"}},"type":"object","required":["version_id","file_count","total_bytes"],"title":"AgentWorkspaceCommitResponse","description":"The newly created workspace version."},"AgentWorkspaceEntry":{"properties":{"path":{"type":"string","title":"Path","description":"Path relative to the workspace root."},"is_dir":{"type":"boolean","title":"Is Dir","description":"True for directories, False for files."},"size":{"type":"integer","title":"Size","description":"File size in bytes (0 for directories)."},"mtime":{"type":"number","title":"Mtime","description":"Last-modified time as a Unix timestamp."}},"type":"object","required":["path","is_dir","size","mtime"],"title":"AgentWorkspaceEntry","description":"A single entry in a roaming agent's workspace tree."},"AgentWorkspaceFileResponse":{"properties":{"path":{"type":"string","title":"Path","description":"Path relative to the workspace root."},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content","description":"UTF-8 file content. Null if the file is binary or unreadable."},"size":{"type":"integer","title":"Size","description":"Total file size in bytes."},"truncated":{"type":"boolean","title":"Truncated","description":"True when content was clipped at the per-request byte cap.","default":false},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Set to 'binary', 'not_found', or 'not_a_file' when the content could not be returned as text."}},"type":"object","required":["path","size"],"title":"AgentWorkspaceFileResponse","description":"Response for reading a single file from a roaming agent's workspace."},"AgentWorkspaceManifestEntry":{"properties":{"path":{"type":"string","title":"Path"},"sha256":{"type":"string","title":"Sha256"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["path","sha256","size"],"title":"AgentWorkspaceManifestEntry","description":"One file in a committed-version manifest, as returned to the client."},"AgentWorkspaceManifestResponse":{"properties":{"version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version Id"},"files":{"items":{"$ref":"#/components/schemas/AgentWorkspaceManifestEntry"},"type":"array","title":"Files"}},"type":"object","title":"AgentWorkspaceManifestResponse","description":"Latest committed workspace version: its id and file manifest."},"AgentWorkspaceMissingBlobsResponse":{"properties":{"missing":{"items":{"type":"string"},"type":"array","title":"Missing"}},"type":"object","title":"AgentWorkspaceMissingBlobsResponse","description":"The subset of requested hashes not already in the blob store."},"AgentWorkspaceTreeResponse":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/AgentWorkspaceEntry"},"type":"array","title":"Entries","description":"Flat list of files and directories under the workspace root."},"truncated":{"type":"boolean","title":"Truncated","description":"True when the tree was clipped at the per-request entry cap.","default":false},"tree_hash":{"type":"string","title":"Tree Hash","description":"Stable hash of the (path, mtime, size) tuples in the response. Clients can compare this between polls to skip rendering when nothing changed."}},"type":"object","required":["entries","tree_hash"],"title":"AgentWorkspaceTreeResponse","description":"Response for listing a roaming agent's workspace contents."},"AgentWorkspaceUploadResponse":{"properties":{"path":{"type":"string","title":"Path","description":"Workspace-relative path the file was written to."},"size":{"type":"integer","title":"Size","description":"Bytes written."},"preview":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Preview","description":"Lightweight preview for recognized types (CSV: columns, row count, and a few sample rows). Null for unrecognized types."}},"type":"object","required":["path","size"],"title":"AgentWorkspaceUploadResponse","description":"Response for uploading a file into a roaming agent's workspace."},"Annotation":{"properties":{"id":{"type":"string","title":"Id"},"bbox":{"$ref":"#/components/schemas/BoundingBox"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Class"},"subtype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtype"},"confidence":{"type":"number","title":"Confidence","default":1.0}},"type":"object","required":["id","bbox"],"title":"Annotation","description":"A text region providing grounding but NOT topologically relevant.\n\nBound to nodes, segments, ports, junctions, or terminals via\n`Association` records."},"Arrow":{"properties":{"id":{"type":"string","title":"Id"},"bbox":{"$ref":"#/components/schemas/BoundingBox"},"confidence":{"type":"number","title":"Confidence"}},"type":"object","required":["id","bbox","confidence"],"title":"Arrow","description":"A first-class arrow entity in a schematic.\n\nBbox-only entity that lives in `pid.arrows`. Arrows are flow-direction\nhints for the inference algorithm — they participate in flow.py's\ngeometry-driven assignment, not in `schematic.nodes` topology."},"Association":{"properties":{"text_id":{"type":"string","title":"Text Id"},"target_id":{"type":"string","title":"Target Id"},"target_type":{"type":"string","enum":["node","segment","port","junction","terminal"],"title":"Target Type"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"}},"type":"object","required":["text_id","target_id","target_type"],"title":"Association","description":"A binding from an annotation to a schematic entity."},"AttachmentUploadResponse":{"properties":{"attachment_id":{"type":"string","format":"uuid","title":"Attachment Id","description":"Public ID of the attachment."},"filename":{"type":"string","title":"Filename","description":"Original filename."},"content_type":{"type":"string","title":"Content Type","description":"MIME type of the stored image, which may differ from the uploaded one: formats the vision models reject (BMP, GIF) are stored as PNG."},"size_bytes":{"type":"integer","title":"Size Bytes","description":"Size of the stored file in bytes."}},"type":"object","required":["attachment_id","filename","content_type","size_bytes"],"title":"AttachmentUploadResponse","description":"Response for a single uploaded attachment."},"AttributeFactResponse":{"properties":{"predicate":{"type":"string","title":"Predicate"},"state":{"type":"string","enum":["none","single","corroborated","conflict"],"title":"State"},"values":{"items":{"$ref":"#/components/schemas/DistinctFactValueResponse"},"type":"array","title":"Values"}},"type":"object","required":["predicate","state","values"],"title":"AttributeFactResponse"},"AttributeFieldSpec":{"properties":{"name":{"type":"string","title":"Name"},"kind":{"type":"string","title":"Kind"},"required":{"type":"boolean","title":"Required","default":false},"description":{"type":"string","title":"Description","default":""},"enum_values":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Enum Values"}},"additionalProperties":false,"type":"object","required":["name","kind"],"title":"AttributeFieldSpec","description":"One declared attribute on a custom type.\n\nStored (as a list of dicts) in ``kg_entity_types.attribute_fields`` /\n``kg_relationship_types.attribute_fields``; compiled into a Pydantic field\nby :func:`build_attribute_schema`."},"BatchAction":{"properties":{"kind":{"type":"string","enum":["create","patch","delete"],"title":"Kind"},"entity":{"type":"string","enum":["node","annotation","vertex","segment","association","arrow","flow_direction","logical_line","visual_reference"],"title":"Entity"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"body":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Body"}},"type":"object","required":["kind","entity"],"title":"BatchAction","description":"A single action in the batch.\n\n``body`` and ``id`` are validated per (kind, entity) inside the\ndispatch — a flat shape keeps the wire format simple and matches the\nFE CRUDOp."},"BatchError":{"properties":{"action_index":{"type":"integer","title":"Action Index"},"description":{"type":"string","title":"Description"},"message":{"type":"string","title":"Message"}},"type":"object","required":["action_index","description","message"],"title":"BatchError"},"BatchRequest":{"properties":{"actions":{"items":{"$ref":"#/components/schemas/BatchAction"},"type":"array","title":"Actions"}},"type":"object","required":["actions"],"title":"BatchRequest"},"BatchResponse":{"properties":{"status":{"type":"string","enum":["ok","error"],"title":"Status"},"completed":{"type":"integer","title":"Completed"},"error":{"anyOf":[{"$ref":"#/components/schemas/BatchError"},{"type":"null"}]},"skipped":{"items":{"$ref":"#/components/schemas/BatchError"},"type":"array","title":"Skipped","default":[]}},"type":"object","required":["status","completed"],"title":"BatchResponse","description":"Atomic result.\n\n``status=\"ok\"`` → all actions applied + saved. The FE clears its action\nstack.\n``status=\"error\"`` → an action failed; nothing was saved. The FE keeps\nits action stack so the user can retry / investigate."},"BboxConnectivityEntity":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"status":{"type":"string","enum":["ok","unwired","port_mismatch"],"title":"Status"},"port_count":{"type":"integer","title":"Port Count"},"incident_segment_count":{"type":"integer","title":"Incident Segment Count"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["entity_id","status","port_count","incident_segment_count"],"title":"BboxConnectivityEntity"},"BboxConnectivityReport":{"properties":{"summary":{"$ref":"#/components/schemas/BboxConnectivitySummary"},"entities":{"items":{"$ref":"#/components/schemas/BboxConnectivityEntity"},"type":"array","title":"Entities"}},"type":"object","title":"BboxConnectivityReport"},"BboxConnectivitySummary":{"properties":{"ok":{"type":"integer","title":"Ok","default":0},"unwired":{"type":"integer","title":"Unwired","default":0},"port_mismatch":{"type":"integer","title":"Port Mismatch","default":0},"total":{"type":"integer","title":"Total","default":0}},"type":"object","title":"BboxConnectivitySummary"},"Body_create_dataset_api_v0_experiments_models__model_id__datasets_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["file","name"],"title":"Body_create_dataset_api_v0_experiments_models__model_id__datasets_post"},"Body_extract_legend_from_image_endpoint_api_v0_components__component_id__schematic_legend_extract_from_image_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"Image of a symbol-legend table."}},"type":"object","required":["file"],"title":"Body_extract_legend_from_image_endpoint_api_v0_components__component_id__schematic_legend_extract_from_image_post"},"Body_generate_component_from_image_api_v0_components_post":{"properties":{"image":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Image","description":"Image file to analyze (PNG, JPEG, GIF, etc.). PDFs are also supported when component_type=schematic. If not provided, creates an empty component for later upload."},"config":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Config","description":"Optional JSON config for schematic components (e.g. {\"pdf_dpi\": 300}). Ignored for other component types."}},"type":"object","title":"Body_generate_component_from_image_api_v0_components_post"},"Body_import_document_archive_api_v0_documents__document_id__schematic_archive_put":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"A schematic archive zip from GET."}},"type":"object","required":["file"],"title":"Body_import_document_archive_api_v0_documents__document_id__schematic_archive_put"},"Body_import_knowledge_graph_api_v0_knowledge_graphs_archive_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"A .zip archive from KG export."}},"type":"object","required":["file"],"title":"Body_import_knowledge_graph_api_v0_knowledge_graphs_archive_post"},"Body_process_document_post_api_v0_documents_post":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The name of the document"},"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File","description":"The file to upload"},"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id","description":"The ID of the folder to create the document in"},"generate_content":{"type":"boolean","title":"Generate Content","description":"Whether to generate structured content (e.g., HTML tables)","default":true},"generate_description":{"type":"boolean","title":"Generate Description","description":"Whether to generate human-readable descriptions for visual components","default":true},"generate_summary":{"type":"boolean","title":"Generate Summary","description":"Whether to generate a document summary","default":true},"skip_visual_transcription":{"type":"boolean","title":"Skip Visual Transcription","description":"When True, skip VLM-based transcription for visual components","default":false},"skip_page_processing":{"type":"boolean","title":"Skip Page Processing","description":"When True, skip per-page visual processing entirely (no layout detection, OCR, or component extraction). The document is stored, converted to PDF, and its page count recorded.","default":false},"update_if_exists":{"type":"boolean","title":"Update If Exists","description":"When True and a document with the same name already exists in the target folder, replace that document's file and reprocess it instead of creating a duplicate. Returns 409 if more than one existing document matches. Only applies to file uploads.","default":false}},"type":"object","title":"Body_process_document_post_api_v0_documents_post"},"Body_put_workspace_blob_api_v0_agent_sessions__session_id__workspace_blobs__sha256__put":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_put_workspace_blob_api_v0_agent_sessions__session_id__workspace_blobs__sha256__put"},"Body_update_document_file_api_v0_documents__document_id__file_put":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"generate_content":{"type":"boolean","title":"Generate Content","description":"Whether to generate structured content (e.g., HTML tables)","default":true},"generate_description":{"type":"boolean","title":"Generate Description","description":"Whether to generate human-readable descriptions for visual components","default":true},"generate_summary":{"type":"boolean","title":"Generate Summary","description":"Whether to generate a document summary","default":true},"skip_visual_transcription":{"type":"boolean","title":"Skip Visual Transcription","description":"When True, skip VLM-based transcription for visual components","default":false},"skip_page_processing":{"type":"boolean","title":"Skip Page Processing","description":"When True, skip per-page visual processing entirely (no layout detection, OCR, or component extraction). The document is stored, converted to PDF, and its page count recorded.","default":false}},"type":"object","required":["file"],"title":"Body_update_document_file_api_v0_documents__document_id__file_put"},"Body_upload_attachments_api_v0_agent_sessions__session_id__attachments_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_upload_attachments_api_v0_agent_sessions__session_id__attachments_post"},"Body_upload_kg_document_api_v0_knowledge_graphs__kg_id__documents_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"The file to upload."}},"type":"object","required":["file"],"title":"Body_upload_kg_document_api_v0_knowledge_graphs__kg_id__documents_upload_post"},"Body_upload_workspace_file_api_v0_agent_sessions__session_id__workspace_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_workspace_file_api_v0_agent_sessions__session_id__workspace_upload_post"},"BoundingBox":{"properties":{"x0":{"type":"integer","title":"X0"},"y0":{"type":"integer","title":"Y0"},"x1":{"type":"integer","title":"X1"},"y1":{"type":"integer","title":"Y1"},"dpi":{"type":"integer","title":"Dpi","default":72},"class_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Class Name"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"}},"type":"object","required":["x0","y0","x1","y1"],"title":"BoundingBox"},"BuiltinToolExampleResponse":{"properties":{"input":{"type":"string","title":"Input","description":"Example input."},"output":{"type":"string","title":"Output","description":"Example output."}},"type":"object","required":["input","output"],"title":"BuiltinToolExampleResponse","description":"Example input/output for a built-in tool."},"BuiltinToolParameterResponse":{"properties":{"name":{"type":"string","title":"Name","description":"Parameter name."},"type":{"type":"string","title":"Type","description":"Parameter type (string, number, etc.)."},"description":{"type":"string","title":"Description","description":"Parameter description."},"required":{"type":"boolean","title":"Required","description":"Whether the parameter is required."}},"type":"object","required":["name","type","description","required"],"title":"BuiltinToolParameterResponse","description":"A single parameter of a built-in tool."},"BuiltinToolResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Tool identifier (snake_case)."},"name":{"type":"string","title":"Name","description":"Human-readable tool name."},"description":{"type":"string","title":"Description","description":"Short description of the tool."},"category":{"type":"string","title":"Category","description":"Tool category (execution, search, analysis, schematics, data, filesystem)."},"icon":{"type":"string","title":"Icon","description":"Lucide icon name."},"long_description":{"type":"string","title":"Long Description","description":"Detailed description of the tool."},"parameters":{"items":{"$ref":"#/components/schemas/BuiltinToolParameterResponse"},"type":"array","title":"Parameters","description":"Tool parameters."},"output_format":{"type":"string","title":"Output Format","description":"Description of the output format."},"example":{"$ref":"#/components/schemas/BuiltinToolExampleResponse","description":"Example usage."},"capabilities":{"items":{"type":"string"},"type":"array","title":"Capabilities","description":"What the tool can do."},"limitations":{"items":{"type":"string"},"type":"array","title":"Limitations","description":"What the tool cannot do."}},"type":"object","required":["id","name","description","category","icon","long_description","parameters","output_format","example","capabilities","limitations"],"title":"BuiltinToolResponse","description":"Response for a single built-in tool definition."},"BulkImportEdge":{"properties":{"edge_type_id":{"type":"string","minLength":1,"title":"Edge Type Id"},"source_public_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Public Id"},"source_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Ref"},"target_public_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Public Id"},"target_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Ref"},"attributes":{"additionalProperties":true,"type":"object","title":"Attributes"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"evidence":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Evidence"}},"type":"object","required":["edge_type_id"],"title":"BulkImportEdge"},"BulkImportNode":{"properties":{"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref","description":"Optional client-supplied tag used to cross-reference this node from edges in the same request, before the server assigns a UUID. Must be unique within the request."},"type_id":{"type":"string","minLength":1,"title":"Type Id"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"attributes":{"additionalProperties":true,"type":"object","title":"Attributes"},"selector":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Selector"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"}},"type":"object","required":["type_id","name"],"title":"BulkImportNode"},"BulkImportRequest":{"properties":{"nodes":{"items":{"$ref":"#/components/schemas/BulkImportNode"},"type":"array","title":"Nodes"},"edges":{"items":{"$ref":"#/components/schemas/BulkImportEdge"},"type":"array","title":"Edges"}},"type":"object","title":"BulkImportRequest"},"BulkImportResponse":{"properties":{"nodes":{"items":{"$ref":"#/components/schemas/NodeResponse"},"type":"array","title":"Nodes"},"edges":{"items":{"$ref":"#/components/schemas/EdgeResponse"},"type":"array","title":"Edges"},"summary":{"$ref":"#/components/schemas/BulkImportSummary"}},"type":"object","required":["nodes","edges","summary"],"title":"BulkImportResponse"},"BulkImportSummary":{"properties":{"nodes_created":{"type":"integer","title":"Nodes Created"},"edges_created":{"type":"integer","title":"Edges Created"}},"type":"object","required":["nodes_created","edges_created"],"title":"BulkImportSummary"},"CampaignCreateRequest":{"properties":{"model_id":{"type":"string","format":"uuid","title":"Model Id"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Description"},"strategy_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy Type"},"strategy_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Strategy Config"}},"type":"object","required":["model_id","name"],"title":"CampaignCreateRequest","description":"Request body for creating a campaign."},"CampaignDetailResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"model_id":{"type":"string","format":"uuid","title":"Model Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"type":"string","title":"Status"},"strategy_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy Type"},"strategy_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Strategy Config"},"strategy_results":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Strategy Results"},"total_runs":{"type":"integer","title":"Total Runs","default":0},"completed_runs":{"type":"integer","title":"Completed Runs","default":0},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"static_constraints":{"items":{"$ref":"#/components/schemas/StaticConstraintResponse"},"type":"array","title":"Static Constraints","default":[]},"variable_states":{"items":{"$ref":"#/components/schemas/VariableStateResponse"},"type":"array","title":"Variable States","default":[]},"runs":{"items":{"$ref":"#/components/schemas/RunResponse"},"type":"array","title":"Runs","default":[]}},"type":"object","required":["id","model_id","name","status","created_at","updated_at"],"title":"CampaignDetailResponse","description":"Campaign with constraints, variable states, and runs."},"CampaignResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"model_id":{"type":"string","format":"uuid","title":"Model Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"type":"string","title":"Status"},"strategy_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy Type"},"strategy_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Strategy Config"},"strategy_results":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Strategy Results"},"total_runs":{"type":"integer","title":"Total Runs","default":0},"completed_runs":{"type":"integer","title":"Completed Runs","default":0},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","model_id","name","status","created_at","updated_at"],"title":"CampaignResponse","description":"Summary of a campaign (no nested children)."},"CampaignUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"type":"string","pattern":"^(active|paused|completed)$"},{"type":"null"}],"title":"Status"}},"type":"object","title":"CampaignUpdateRequest","description":"Request body for updating a campaign."},"CfihosCatalogStatus":{"properties":{"available":{"type":"boolean","title":"Available"},"cfihos_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cfihos Version"},"classes_count":{"type":"integer","title":"Classes Count","default":0},"picklists_count":{"type":"integer","title":"Picklists Count","default":0},"build_timestamp_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Build Timestamp Utc"}},"type":"object","required":["available"],"title":"CfihosCatalogStatus","description":"Lightweight health/version snapshot of the loaded catalog."},"CfihosClass":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"definition":{"type":"string","title":"Definition","default":""},"synonyms":{"items":{"type":"string"},"type":"array","title":"Synonyms","default":[]},"class_kind":{"type":"string","enum":["tag","equipment","both"],"title":"Class Kind","default":"tag"},"abstract":{"type":"boolean","title":"Abstract","default":false},"parent_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Code"},"parent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Name"},"ancestor_codes":{"items":{"type":"string"},"type":"array","title":"Ancestor Codes","default":[]},"ancestor_names":{"items":{"type":"string"},"type":"array","title":"Ancestor Names","default":[]},"equipment_class_codes":{"items":{"type":"string"},"type":"array","title":"Equipment Class Codes","default":[]},"properties":{"items":{"$ref":"#/components/schemas/CfihosProperty"},"type":"array","title":"Properties","default":[]},"source_standards":{"items":{"$ref":"#/components/schemas/CfihosSourceStandardRef"},"type":"array","title":"Source Standards","default":[]},"equivalents":{"items":{"$ref":"#/components/schemas/CfihosEquivalent"},"type":"array","title":"Equivalents","default":[]},"required_documents":{"items":{"$ref":"#/components/schemas/CfihosRequiredDocument"},"type":"array","title":"Required Documents","default":[]}},"type":"object","required":["code","name"],"title":"CfihosClass","description":"A CFIHOS tag and/or equipment class — full denormalized row."},"CfihosClassSearchHit":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"class_kind":{"type":"string","enum":["tag","equipment","both"],"title":"Class Kind","default":"tag"},"abstract":{"type":"boolean","title":"Abstract","default":false},"parent_chain":{"items":{"type":"string"},"type":"array","title":"Parent Chain","default":[]},"synonyms":{"items":{"type":"string"},"type":"array","title":"Synonyms","default":[]},"score":{"type":"number","title":"Score","default":1.0}},"type":"object","required":["code","name"],"title":"CfihosClassSearchHit","description":"One entry in a search result; trimmed for autocomplete payloads."},"CfihosEquivalent":{"properties":{"source":{"type":"string","title":"Source"},"code":{"type":"string","title":"Code"}},"type":"object","required":["source","code"],"title":"CfihosEquivalent","description":"External-vocabulary equivalent (POSC CAESAR, ISO 15926, ...)."},"CfihosPicklistValue":{"properties":{"value_code":{"type":"string","title":"Value Code"},"description":{"type":"string","title":"Description","default":""}},"type":"object","required":["value_code"],"title":"CfihosPicklistValue"},"CfihosProperty":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"definition":{"type":"string","title":"Definition","default":""},"data_type":{"type":"string","title":"Data Type","default":"Text"},"picklist_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Picklist Name"},"uom_dimension":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uom Dimension"},"si_unit_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Si Unit Code"},"si_unit_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Si Unit Name"},"si_unit_symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Si Unit Symbol"},"imperial_unit_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Imperial Unit Code"},"imperial_unit_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Imperial Unit Name"},"imperial_unit_symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Imperial Unit Symbol"},"source_standards":{"items":{"$ref":"#/components/schemas/CfihosPropertySourceStandard"},"type":"array","title":"Source Standards","default":[]}},"type":"object","required":["code","name"],"title":"CfihosProperty","description":"One typed attribute that the class is allowed to carry.\n\nProperties are *schema*: catalog-side. A class's properties tell the\nUI which attributes a tag of this class could be authored with.\nValues are stored per-node, not on the catalog row."},"CfihosPropertySourceStandard":{"properties":{"code":{"type":"string","title":"Code"},"section":{"type":"string","title":"Section","default":""}},"type":"object","required":["code"],"title":"CfihosPropertySourceStandard"},"CfihosRequiredDocument":{"properties":{"document_type_code":{"type":"string","title":"Document Type Code"},"document_type_name":{"type":"string","title":"Document Type Name"},"short_code":{"type":"string","title":"Short Code","default":""}},"type":"object","required":["document_type_code","document_type_name"],"title":"CfihosRequiredDocument"},"CfihosSourceStandardRef":{"properties":{"code":{"type":"string","title":"Code"},"title":{"type":"string","title":"Title","default":""}},"type":"object","required":["code"],"title":"CfihosSourceStandardRef","description":"A reference into one of CFIHOS's 305 source-standard documents."},"ClaimFactSupportResponse":{"properties":{"claim_id":{"type":"string","format":"uuid","title":"Claim Id"},"source_occurrence_id":{"type":"string","format":"uuid","title":"Source Occurrence Id"},"selector_snapshot":{"additionalProperties":true,"type":"object","title":"Selector Snapshot"},"origin":{"type":"string","enum":["pipeline","user","import"],"title":"Origin"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"extraction_run":{"anyOf":[{"$ref":"#/components/schemas/ExtractionRunFactResponse"},{"type":"null"}]},"extraction_source":{"anyOf":[{"$ref":"#/components/schemas/ExtractionSourceFactResponse"},{"type":"null"}]}},"type":"object","required":["claim_id","source_occurrence_id","selector_snapshot","origin","confidence","extraction_run","extraction_source"],"title":"ClaimFactSupportResponse"},"ClassifyLegendRequest":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"class":{"type":"string","title":"Class"},"subtype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtype"},"source_bbox":{"anyOf":[{"$ref":"#/components/schemas/BoundingBox"},{"type":"null"}]},"source_node_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Node Id"},"source_crop_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Crop Url"},"confidence":{"type":"number","title":"Confidence","default":1.0},"cfihos_tag_class_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cfihos Tag Class Code"},"cfihos_equipment_class_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cfihos Equipment Class Code"},"cfihos_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cfihos Version"},"cfihos_source":{"anyOf":[{"type":"string","enum":["deterministic_map","name_match","isa_letter_code","llm","template_applied","user_pinned"]},{"type":"null"}],"title":"Cfihos Source"},"cfihos_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cfihos Confidence"},"transcription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcription"}},"type":"object","required":["id","name","class"],"title":"ClassifyLegendRequest","description":"Same shape as LegendEntry; we also accept a ``transcription`` hint\nfor ISA-letter classification of instrument-tag entries."},"ColumnMappingsRequest":{"properties":{"mappings":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object","title":"Mappings"}},"type":"object","required":["mappings"],"title":"ColumnMappingsRequest","description":"Request body for setting column mappings."},"ComponentCreateSpec":{"properties":{"type":{"type":"string","title":"Type","description":"Component type (text, table, image, etc.)"},"page_number":{"type":"integer","title":"Page Number","description":"Page number (0-indexed)"},"bbox":{"$ref":"#/components/schemas/BoundingBox","description":"Bounding box coordinates"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Optional label"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id","description":"Public id of an existing component to set as parent on creation. Must be on the same page and fully contain this component's bbox; validated server-side."}},"type":"object","required":["type","page_number","bbox"],"title":"ComponentCreateSpec","description":"Specification for creating a new component."},"ComponentDeleteResponse":{"properties":{"message":{"type":"string","title":"Message","description":"The message returned from the deletion operation"},"component_id":{"type":"string","format":"uuid","title":"Component Id","description":"The ID of the component that was deleted"}},"type":"object","required":["message","component_id"],"title":"ComponentDeleteResponse"},"ComponentMergeSpec":{"properties":{"component_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Component Ids","description":"Component public IDs to merge (minimum 2)"}},"type":"object","required":["component_ids"],"title":"ComponentMergeSpec","description":"Specification for merging components as a list."},"ComponentPostResponse":{"properties":{"job_status_id":{"type":"string","format":"uuid","title":"Job Status Id","description":"The ID of the job status"},"status":{"type":"string","title":"Status","description":"The status of the job"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message","description":"The error message if the job failed"},"component_id":{"type":"string","format":"uuid","title":"Component Id","description":"The ID of the component"}},"type":"object","required":["job_status_id","status","error_message","component_id"],"title":"ComponentPostResponse"},"ComponentReprocessingRequest":{"properties":{"component_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Component Ids","description":"Specific component IDs to reprocess. If not provided, uses reprocess_all_pending."},"reprocess_all_pending":{"type":"boolean","title":"Reprocess All Pending","description":"Reprocess all components with needs_reprocessing=true for this document.","default":false},"creates":{"anyOf":[{"items":{"$ref":"#/components/schemas/ComponentCreateSpec"},"type":"array"},{"type":"null"}],"title":"Creates","description":"Components to create before reprocessing."},"updates":{"anyOf":[{"items":{"$ref":"#/components/schemas/ComponentUpdateSpec"},"type":"array"},{"type":"null"}],"title":"Updates","description":"Component updates (type, bbox) to apply before reprocessing."},"deletes":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Deletes","description":"Component IDs to delete before reprocessing."},"merges":{"anyOf":[{"items":{"$ref":"#/components/schemas/ComponentMergeSpec"},"type":"array"},{"type":"null"}],"title":"Merges","description":"Groups of component IDs to merge as lists before reprocessing."}},"type":"object","title":"ComponentReprocessingRequest","description":"Request model for component reprocessing with batch mutations."},"ComponentReprocessingResponse":{"properties":{"job_status_id":{"type":"string","format":"uuid","title":"Job Status Id","description":"The ID of the job status for tracking."},"status":{"type":"string","title":"Status","description":"The initial status of the job."},"component_count":{"type":"integer","title":"Component Count","description":"The number of components queued for reprocessing."}},"type":"object","required":["job_status_id","status","component_count"],"title":"ComponentReprocessingResponse","description":"Response model for component reprocessing job."},"ComponentResponseRequest":{"properties":{"question":{"type":"string","title":"Question","description":"The question to ask about the component"}},"type":"object","required":["question"],"title":"ComponentResponseRequest"},"ComponentResponseResponse":{"properties":{"answer":{"type":"string","title":"Answer","description":"The answer to the question"}},"type":"object","required":["answer"],"title":"ComponentResponseResponse"},"ComponentUpdateResponse":{"properties":{"job_status_id":{"type":"string","format":"uuid","title":"Job Status Id","description":"The ID of the job status"},"status":{"type":"string","title":"Status","description":"The status of the job"}},"type":"object","required":["job_status_id","status"],"title":"ComponentUpdateResponse"},"ComponentUpdateSpec":{"properties":{"component_id":{"type":"string","format":"uuid","title":"Component Id","description":"Component public ID to update"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type","description":"New component type"},"bbox":{"anyOf":[{"$ref":"#/components/schemas/BoundingBox"},{"type":"null"}],"description":"New bounding box"}},"type":"object","required":["component_id"],"title":"ComponentUpdateSpec","description":"Specification for updating an existing component."},"ComponentUploadUrlResponse":{"properties":{"url":{"type":"string","title":"Url","description":"The presigned upload URL"}},"type":"object","required":["url"],"title":"ComponentUploadUrlResponse","description":"Response containing a presigned upload URL for direct S3 upload."},"CreateAnnotationRequest":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"bbox":{"$ref":"#/components/schemas/BoundingBox"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Class"},"subtype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtype"},"confidence":{"type":"number","title":"Confidence","default":1.0}},"type":"object","required":["id","bbox"],"title":"CreateAnnotationRequest"},"CreateArrowRequest":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"bbox":{"$ref":"#/components/schemas/BoundingBox"},"confidence":{"type":"number","title":"Confidence","default":1.0}},"type":"object","required":["id","bbox"],"title":"CreateArrowRequest"},"CreateAssociationRequest":{"properties":{"text_id":{"type":"string","title":"Text Id"},"target_id":{"type":"string","title":"Target Id"},"target_type":{"type":"string","enum":["node","segment","port","junction","terminal"],"title":"Target Type"}},"type":"object","required":["text_id","target_id","target_type"],"title":"CreateAssociationRequest"},"CreateLineSegmentRequest":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"start":{"type":"string","title":"Start"},"end":{"type":"string","title":"End"},"pixel_path":{"anyOf":[{"items":{"items":{"type":"integer"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Pixel Path"},"bbox":{"anyOf":[{"$ref":"#/components/schemas/BoundingBox"},{"type":"null"}]},"stroke":{"anyOf":[{"$ref":"#/components/schemas/StrokeAppearance"},{"type":"null"}]}},"type":"object","required":["id","start","end"],"title":"CreateLineSegmentRequest"},"CreateNodeRequest":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"class":{"type":"string","title":"Class"},"subtype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtype"},"bbox":{"$ref":"#/components/schemas/BoundingBox"},"transcription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcription"},"confidence":{"type":"number","title":"Confidence","default":1.0}},"type":"object","required":["id","class","bbox"],"title":"CreateNodeRequest"},"CreateVertexRequest":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"kind":{"type":"string","enum":["port","junction","terminal"],"title":"Kind"},"x":{"type":"number","title":"X"},"y":{"type":"number","title":"Y"},"node_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Node Id"}},"type":"object","required":["id","kind","x","y"],"title":"CreateVertexRequest"},"CurrentFactResolutionResponse":{"properties":{"resolution":{"anyOf":[{"$ref":"#/components/schemas/FactResolutionResponse"},{"type":"null"}]}},"type":"object","required":["resolution"],"title":"CurrentFactResolutionResponse"},"DatasetResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"model_id":{"type":"string","format":"uuid","title":"Model Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"source_filename":{"type":"string","title":"Source Filename"},"row_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Row Count"},"column_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Column Count"},"column_headers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Column Headers"},"column_mappings":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Column Mappings"},"status":{"type":"string","title":"Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","model_id","name","source_filename","status","created_at","updated_at"],"title":"DatasetResponse","description":"Summary of a dataset."},"DatasetUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"type":"string","pattern":"^(processing|ready|error)$"},{"type":"null"}],"title":"Status"},"row_count":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Row Count"},"column_count":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Column Count"},"column_headers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Column Headers"},"error":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Error"}},"type":"object","title":"DatasetUpdateRequest","description":"Request body for updating a dataset."},"DegradedComponent":{"properties":{"page_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Number","description":"Page the component is on."},"component_type":{"type":"string","title":"Component Type","description":"Component type (chart, table, …)."},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Component label."},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings","description":"Human-readable warnings (the swallowed give-up reasons)."}},"type":"object","required":["component_type","warnings"],"title":"DegradedComponent","description":"A component that completed with a non-fatal processing warning."},"DeleteResponse":{"properties":{"deleted_ids":{"items":{"type":"string"},"type":"array","title":"Deleted Ids"}},"type":"object","required":["deleted_ids"],"title":"DeleteResponse"},"DerivedPropertyDef-Input":{"properties":{"id":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id"},"description":{"type":"string","title":"Description","default":""},"rule":{"oneOf":[{"$ref":"#/components/schemas/PatternMapRule"},{"$ref":"#/components/schemas/EdgeDegreeRule"}],"title":"Rule","discriminator":{"propertyName":"kind","mapping":{"edge_degree":"#/components/schemas/EdgeDegreeRule","pattern_map":"#/components/schemas/PatternMapRule"}}}},"additionalProperties":false,"type":"object","required":["id","rule"],"title":"DerivedPropertyDef","description":"A read-time property on an entity type: an id (same slug shape as a\nstored attribute name), a description, and the rule that computes it."},"DerivedPropertyDef-Output":{"properties":{"id":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id"},"description":{"type":"string","title":"Description","default":""},"rule":{"oneOf":[{"$ref":"#/components/schemas/PatternMapRule"},{"$ref":"#/components/schemas/EdgeDegreeRule"}],"title":"Rule","discriminator":{"propertyName":"kind","mapping":{"edge_degree":"#/components/schemas/EdgeDegreeRule","pattern_map":"#/components/schemas/PatternMapRule"}}}},"additionalProperties":false,"type":"object","required":["id","rule"],"title":"DerivedPropertyDef","description":"A read-time property on an entity type: an id (same slug shape as a\nstored attribute name), a description, and the rule that computes it."},"DetectTextInRegionRequest":{"properties":{"polygon":{"items":{"$ref":"#/components/schemas/PolygonPoint"},"type":"array","maxItems":200,"title":"Polygon","description":"Closed polygon in page-pixel coordinates. Minimum 3 vertices."}},"type":"object","required":["polygon"],"title":"DetectTextInRegionRequest"},"DetectTextInRegionResponse":{"properties":{"result":{"items":{"$ref":"#/components/schemas/DetectedBox"},"type":"array","title":"Result"},"timings":{"$ref":"#/components/schemas/DetectTextTimings"},"image_width":{"type":"integer","title":"Image Width"},"image_height":{"type":"integer","title":"Image Height"}},"type":"object","required":["result","timings","image_width","image_height"],"title":"DetectTextInRegionResponse"},"DetectTextTimings":{"properties":{"fetch_ms":{"type":"integer","title":"Fetch Ms"},"decode_ms":{"type":"integer","title":"Decode Ms"},"detect_ms":{"type":"integer","title":"Detect Ms"},"total_ms":{"type":"integer","title":"Total Ms"}},"type":"object","required":["fetch_ms","decode_ms","detect_ms","total_ms"],"title":"DetectTextTimings"},"DetectedBox":{"properties":{"bbox":{"$ref":"#/components/schemas/DetectedRect"}},"type":"object","required":["bbox"],"title":"DetectedBox"},"DetectedRect":{"properties":{"x0":{"type":"integer","title":"X0"},"y0":{"type":"integer","title":"Y0"},"x1":{"type":"integer","title":"X1"},"y1":{"type":"integer","title":"Y1"}},"type":"object","required":["x0","y0","x1","y1"],"title":"DetectedRect"},"DistinctFactValueResponse":{"properties":{"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"}],"title":"Value"},"value_kind":{"type":"string","enum":["string","integer","number","boolean"],"title":"Value Kind"},"supporting_claim_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Supporting Claim Ids"},"source_occurrence_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Source Occurrence Ids"},"supports":{"items":{"$ref":"#/components/schemas/ClaimFactSupportResponse"},"type":"array","title":"Supports"}},"type":"object","required":["value","value_kind","supporting_claim_ids","source_occurrence_ids","supports"],"title":"DistinctFactValueResponse"},"DocumentDeleteResponse":{"properties":{"message":{"type":"string","title":"Message","description":"The message returned from the deletion operation."},"document_id":{"type":"string","format":"uuid","title":"Document Id","description":"The ID of the document that was deleted."}},"type":"object","required":["message","document_id"],"title":"DocumentDeleteResponse"},"DocumentFormatInfo":{"properties":{"extension":{"type":"string","title":"Extension","description":"The file extension, without a leading dot (e.g. `pdf`)."},"mime_types":{"items":{"type":"string"},"type":"array","title":"Mime Types","description":"The MIME type(s) accepted for this format."}},"type":"object","required":["extension","mime_types"],"title":"DocumentFormatInfo"},"DocumentGetResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The ID of the document."},"name":{"type":"string","title":"Name","description":"The name of the document."},"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id","description":"The ID of the folder that contains the document."},"file_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Path","description":"The path to the document file."},"file_type":{"type":"string","title":"File Type","description":"The type of the document file. Options: `pdf`, `docx`, `txt`, `html`, `md`."},"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url","description":"The URL of the document file."},"renditions":{"items":{"$ref":"#/components/schemas/DocumentRenditionResponse"},"type":"array","title":"Renditions","description":"Derived views of the file, one entry per kind — `pdf` for the paginated rendition, `mesh` for a 3D solid's tessellation. A viewer selects on which kinds are present, never on the file's extension."},"summary":{"type":"string","title":"Summary","description":"A summary of the document content."},"visibility":{"type":"string","title":"Visibility","description":"The visibility of the document. Options: `private`, `org`."},"num_pages":{"type":"integer","title":"Num Pages","description":"The number of pages in the document."},"version":{"type":"integer","title":"Version","description":"The version of the document."},"job_status_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Job Status Id","description":"The public UUID of the job status for the document's current processing job."},"job_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Status","description":"The current job status: queued, processing, done, error, cancelled."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"The date and time the document was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"The date and time the document was last updated."},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","description":"The tags associated with the document."}},"type":"object","required":["id","name","folder_id","file_path","file_type","file_url","summary","visibility","num_pages","version","created_at","updated_at","tags"],"title":"DocumentGetResponse"},"DocumentListResponse":{"properties":{"documents":{"items":{"$ref":"#/components/schemas/DocumentGetResponse"},"type":"array","title":"Documents","description":"The list of documents."},"pagination":{"$ref":"#/components/schemas/PaginationMetadata","description":"Pagination metadata for the document list."}},"type":"object","required":["documents","pagination"],"title":"DocumentListResponse"},"DocumentPostResponse":{"properties":{"job_status_id":{"type":"string","format":"uuid","title":"Job Status Id","description":"The ID of the job status."},"status":{"type":"string","title":"Status","description":"The status of the job. Options: `pending`, `done`, `error`."},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message","description":"The error message if the job failed."},"document_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Document Id","description":"The ID of the document that was uploaded."}},"type":"object","required":["job_status_id","status","error_message","document_id"],"title":"DocumentPostResponse"},"DocumentRenditionResponse":{"properties":{"kind":{"type":"string","title":"Kind","description":"What the rendition is: `pdf` (paginated) or `mesh` (3D solid)."},"file_path":{"type":"string","title":"File Path","description":"The storage path of the rendition."},"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url","description":"A signed URL for the rendition."}},"type":"object","required":["kind","file_path"],"title":"DocumentRenditionResponse"},"DocumentRetentionPolicyAssociationGetResponse":{"properties":{"document_id":{"type":"string","format":"uuid","title":"Document Id","description":"The ID of the document."},"retention_policy_id":{"type":"string","format":"uuid","title":"Retention Policy Id","description":"The ID of the retention policy."}},"type":"object","required":["document_id","retention_policy_id"],"title":"DocumentRetentionPolicyAssociationGetResponse"},"DocumentSearchGetResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The ID of the search."},"user_id":{"type":"string","format":"uuid","title":"User Id","description":"The ID of the user who created the search."},"query":{"type":"string","title":"Query","description":"The search query."},"status":{"type":"string","title":"Status","description":"The status of the search."},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message","description":"The error message if the search failed."},"documents":{"items":{"$ref":"#/components/schemas/DocumentGetResponse"},"type":"array","title":"Documents","description":"The documents that match the search query."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"The timestamp when the search was created."}},"type":"object","required":["id","user_id","query","status","error_message","documents","created_at"],"title":"DocumentSearchGetResponse"},"DocumentSearchPostResponse":{"properties":{"job_status_id":{"type":"string","format":"uuid","title":"Job Status Id","description":"The ID of the job status."},"search_id":{"type":"string","format":"uuid","title":"Search Id","description":"The ID of the search."},"status":{"type":"string","title":"Status","description":"The status of the job. Options: `pending`, `done`, `error`."},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message","description":"The error message if the job failed."}},"type":"object","required":["job_status_id","search_id","status","error_message"],"title":"DocumentSearchPostResponse"},"DocumentSearchRequest":{"properties":{"query":{"type":"string","title":"Query","description":"The query to search for"},"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id","description":"The ID of the folder to search in"},"tag_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag Name","description":"The name of the tag to search for"},"owner_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner Id","description":"The ID of the owner to search for"}},"type":"object","required":["query"],"title":"DocumentSearchRequest"},"DocumentStatsItem":{"properties":{"document_id":{"type":"string","format":"uuid","title":"Document Id","description":"The public ID of the document."},"name":{"type":"string","title":"Name","description":"The name of the document."},"file_type":{"type":"string","title":"File Type","description":"The file type of the document."},"num_pages":{"type":"integer","title":"Num Pages","description":"The number of pages in the document."},"component_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Component Counts","description":"Component counts by type for this document."},"total_components":{"type":"integer","title":"Total Components","description":"The total number of components in this document."}},"type":"object","required":["document_id","name","file_type","num_pages","component_counts","total_components"],"title":"DocumentStatsItem","description":"Per-document component statistics."},"DocumentStatsRequest":{"properties":{"document_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Document Ids","description":"Public IDs of the documents to aggregate component stats for."}},"type":"object","required":["document_ids"],"title":"DocumentStatsRequest"},"DocumentTokenUsageItem":{"properties":{"document_id":{"type":"string","format":"uuid","title":"Document Id","description":"The document public UUID."},"name":{"type":"string","title":"Name","description":"The document name."},"input_tokens":{"type":"integer","title":"Input Tokens","description":"Total input tokens."},"output_tokens":{"type":"integer","title":"Output Tokens","description":"Total output tokens."},"estimated_cost_usd":{"type":"number","title":"Estimated Cost Usd","description":"Estimated cost in USD (calculated live from current pricing)."},"num_calls":{"type":"integer","title":"Num Calls","description":"Number of LLM calls."},"duration_ms":{"type":"integer","title":"Duration Ms","description":"Total LLM call duration in milliseconds."}},"type":"object","required":["document_id","name","input_tokens","output_tokens","estimated_cost_usd","num_calls","duration_ms"],"title":"DocumentTokenUsageItem","description":"Per-document token usage aggregate."},"DocumentTokenUsageRequest":{"properties":{"document_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Document Ids","description":"Public IDs of the documents to aggregate token usage for."}},"type":"object","required":["document_ids"],"title":"DocumentTokenUsageRequest"},"DocumentUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The name of the document"},"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id","description":"The ID of the folder containing the document"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary","description":"The summary of the document"}},"type":"object","title":"DocumentUpdateRequest"},"DocumentUploadUrlResponse":{"properties":{"url":{"type":"string","title":"Url","description":"The signed upload URL for the document."}},"type":"object","required":["url"],"title":"DocumentUploadUrlResponse"},"DocumentVisualComponentGetResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The ID of the visual component"},"type":{"type":"string","title":"Type","description":"The type of the visual component"},"document_id":{"type":"string","format":"uuid","title":"Document Id","description":"The ID of the document"},"page_number":{"type":"integer","title":"Page Number","description":"The page number of the visual component"},"sequence_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sequence Number","description":"The sequence number for ordering within a page"},"label":{"type":"string","title":"Label","description":"The label of the visual component"},"bbox":{"$ref":"#/components/schemas/BoundingBox","description":"The bounding box of the visual component"},"description":{"type":"string","title":"Description","description":"The description of the visual component"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content","description":"The structured content of the component (e.g., HTML table)"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"The date and time the visual component was created"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"The date and time the visual component was last updated"},"mask_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mask Url","description":"The URL of the mask image"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"The metadata of the visual component"},"render_svg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Render Svg","description":"SVG rendering of the component (for charts/graphs)"},"grounding":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Grounding","description":"Grounding metadata (bounding boxes, detections)"},"job_status_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Job Status Id","description":"Job status ID when async processing is queued (e.g., chart regeneration)"},"job_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Status","description":"Job status when async processing is queued"},"needs_reprocessing":{"type":"boolean","title":"Needs Reprocessing","description":"Whether this component needs reprocessing after bbox edit","default":false},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id","description":"Public id of the parent visual component, when this component is nested"}},"type":"object","required":["id","type","document_id","page_number","label","bbox","description","created_at","updated_at","mask_url","metadata"],"title":"DocumentVisualComponentGetResponse"},"DocumentVisualComponentResponseRequest":{"properties":{"question":{"type":"string","title":"Question","description":"The question to ask about the document visual component"}},"type":"object","required":["question"],"title":"DocumentVisualComponentResponseRequest"},"DocumentVisualComponentResponseResponse":{"properties":{"answer":{"type":"string","title":"Answer","description":"The answer to the question"}},"type":"object","required":["answer"],"title":"DocumentVisualComponentResponseResponse"},"EdgeCreateRequest":{"properties":{"edge_type_id":{"type":"string","minLength":1,"title":"Edge Type Id"},"source_public_id":{"type":"string","format":"uuid","title":"Source Public Id"},"target_public_id":{"type":"string","format":"uuid","title":"Target Public Id"},"attributes":{"additionalProperties":true,"type":"object","title":"Attributes"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"evidence":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Evidence"}},"type":"object","required":["edge_type_id","source_public_id","target_public_id"],"title":"EdgeCreateRequest"},"EdgeDegreeRule":{"properties":{"kind":{"type":"string","const":"edge_degree","title":"Kind","default":"edge_degree"},"relationship_type_id":{"type":"string","minLength":1,"title":"Relationship Type Id"},"node_role":{"type":"string","enum":["source","target","either"],"title":"Node Role","default":"either"}},"additionalProperties":false,"type":"object","required":["relationship_type_id"],"title":"EdgeDegreeRule","description":"Derive the count of the entity's own incident edges of one\nrelationship type. ``node_role`` picks which end the entity sits on\n(``source`` = outgoing, ``target`` = incoming, ``either`` = both)."},"EdgeResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"knowledge_graph_id":{"type":"string","format":"uuid","title":"Knowledge Graph Id"},"edge_type_id":{"type":"string","title":"Edge Type Id"},"source_public_id":{"type":"string","format":"uuid","title":"Source Public Id"},"target_public_id":{"type":"string","format":"uuid","title":"Target Public Id"},"attributes":{"additionalProperties":true,"type":"object","title":"Attributes"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"source":{"type":"string","title":"Source"},"evidence":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Evidence"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","knowledge_graph_id","edge_type_id","source_public_id","target_public_id","attributes","source","created_at","updated_at"],"title":"EdgeResponse","description":"A :class:`KGEdge` — a typed relation between two nodes (by public id).\n\nEndpoints are real node→node references (``source_public_id`` /\n``target_public_id``), so the frontend can look each up in the node list\nfrom the same ``/graph`` dump. Domain→domain edges are machine-derived\nclaims and carry ``evidence`` ({occurrence_ids, cross_reference_ids})\ntracing *why* the claim holds down to Tier-2 occurrences."},"EdgeUpdateRequest":{"properties":{"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"evidence":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Evidence"}},"type":"object","title":"EdgeUpdateRequest","description":"Partial update for an edge's editable parts.\n\nEndpoints (source/target node) and the edge type are immutable through this\nuser PATCH. Focused transactional services may re-point edges internally.\nWhat you CAN edit here: ``attributes``\n(re-validated + replaced wholesale when provided), ``confidence``, and\n``evidence``. Unset fields are left untouched (``model_fields_set``\ndistinguishes \"absent\" from an explicit null)."},"EntityFactsResponse":{"properties":{"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"entity_type_id":{"type":"string","title":"Entity Type Id"},"entity_name":{"type":"string","title":"Entity Name"},"facts":{"items":{"$ref":"#/components/schemas/AttributeFactResponse"},"type":"array","title":"Facts"},"diagnostics":{"items":{"$ref":"#/components/schemas/FactDiagnosticResponse"},"type":"array","title":"Diagnostics"}},"type":"object","required":["entity_id","entity_type_id","entity_name","facts","diagnostics"],"title":"EntityFactsResponse"},"EntityMergeRequest":{"properties":{"target_node_id":{"type":"string","format":"uuid","title":"Target Node Id"}},"type":"object","required":["target_node_id"],"title":"EntityMergeRequest"},"EntityMergeResponse":{"properties":{"target_node_id":{"type":"string","format":"uuid","title":"Target Node Id"},"edges_repointed":{"type":"integer","title":"Edges Repointed"},"edges_removed":{"type":"integer","title":"Edges Removed"}},"type":"object","required":["target_node_id","edges_repointed","edges_removed"],"title":"EntityMergeResponse"},"EntityTypeCatalogItem":{"properties":{"type_id":{"type":"string","title":"Type Id"},"display_name":{"type":"string","title":"Display Name"},"description":{"type":"string","title":"Description"},"tier":{"type":"string","enum":["representation","domain"],"title":"Tier"},"attribute_fields":{"items":{"$ref":"#/components/schemas/AttributeFieldSpec"},"type":"array","title":"Attribute Fields"},"derived_properties":{"items":{"$ref":"#/components/schemas/DerivedPropertyDef-Output"},"type":"array","title":"Derived Properties"},"origin":{"type":"string","title":"Origin"},"editable":{"type":"boolean","title":"Editable"},"public_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Public Id"},"node_count":{"type":"integer","title":"Node Count"}},"type":"object","required":["type_id","display_name","description","tier","attribute_fields","origin","editable","public_id","node_count"],"title":"EntityTypeCatalogItem"},"EntityTypeSummary":{"properties":{"id":{"type":"string","title":"Id"},"display_name":{"type":"string","title":"Display Name"},"description":{"type":"string","title":"Description"},"tier":{"type":"string","title":"Tier"}},"type":"object","required":["id","display_name","description","tier"],"title":"EntityTypeSummary"},"EntityTypeUpsertRequest":{"properties":{"type_id":{"type":"string","minLength":1,"title":"Type Id"},"display_name":{"type":"string","minLength":1,"title":"Display Name"},"description":{"type":"string","title":"Description","default":""},"tier":{"type":"string","enum":["representation","domain"],"title":"Tier"},"attribute_fields":{"items":{"$ref":"#/components/schemas/AttributeFieldSpec"},"type":"array","title":"Attribute Fields"},"derived_properties":{"items":{"$ref":"#/components/schemas/DerivedPropertyDef-Input"},"type":"array","title":"Derived Properties"}},"type":"object","required":["type_id","display_name","tier"],"title":"EntityTypeUpsertRequest"},"EvidenceRebindRequest":{"properties":{"target_node_id":{"type":"string","format":"uuid","title":"Target Node Id"}},"type":"object","required":["target_node_id"],"title":"EvidenceRebindRequest"},"ExtractionRunFactResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"operation":{"type":"string","title":"Operation"},"extractor_version":{"type":"string","title":"Extractor Version"},"model_name":{"type":"string","title":"Model Name"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["id","operation","extractor_version","model_name","status","created_at","completed_at"],"title":"ExtractionRunFactResponse"},"ExtractionSourceFactResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"document_public_id_snapshot":{"type":"string","format":"uuid","title":"Document Public Id Snapshot"},"document_version_snapshot":{"type":"integer","title":"Document Version Snapshot"},"document_updated_at_snapshot":{"type":"string","format":"date-time","title":"Document Updated At Snapshot"},"file_path_snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Path Snapshot"},"document_bytes_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Bytes Sha256"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","document_public_id_snapshot","document_version_snapshot","document_updated_at_snapshot","file_path_snapshot","document_bytes_sha256","status"],"title":"ExtractionSourceFactResponse"},"FactDiagnosticResponse":{"properties":{"kind":{"type":"string","const":"ambiguous_represents_source","title":"Kind"},"source_occurrence_id":{"type":"string","format":"uuid","title":"Source Occurrence Id"},"target_entity_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Target Entity Ids"}},"type":"object","required":["kind","source_occurrence_id","target_entity_ids"],"title":"FactDiagnosticResponse"},"FactResolutionHistoryResponse":{"properties":{"resolutions":{"items":{"$ref":"#/components/schemas/FactResolutionResponse"},"type":"array","title":"Resolutions"}},"type":"object","required":["resolutions"],"title":"FactResolutionHistoryResponse"},"FactResolutionResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"knowledge_graph_id":{"type":"string","format":"uuid","title":"Knowledge Graph Id"},"subject_node_id":{"type":"string","format":"uuid","title":"Subject Node Id"},"predicate":{"type":"string","title":"Predicate"},"selected_claim_id":{"type":"string","format":"uuid","title":"Selected Claim Id"},"selected_value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"}],"title":"Selected Value"},"selected_value_kind":{"type":"string","enum":["string","integer","number","boolean"],"title":"Selected Value Kind"},"resolver_user_id":{"type":"string","format":"uuid","title":"Resolver User Id"},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale"},"supersedes_resolution_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Supersedes Resolution Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"superseded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Superseded At"},"is_current":{"type":"boolean","title":"Is Current"},"is_stale":{"type":"boolean","title":"Is Stale"},"stale_reasons":{"items":{"type":"string","enum":["claim_superseded","occurrence_not_representing_subject"]},"type":"array","title":"Stale Reasons"}},"type":"object","required":["id","knowledge_graph_id","subject_node_id","predicate","selected_claim_id","selected_value","selected_value_kind","resolver_user_id","rationale","supersedes_resolution_id","created_at","superseded_at","is_current","is_stale","stale_reasons"],"title":"FactResolutionResponse"},"FactResolutionWriteRequest":{"properties":{"predicate":{"type":"string","maxLength":255,"minLength":1,"title":"Predicate"},"selected_claim_id":{"type":"string","format":"uuid","title":"Selected Claim Id"},"expected_current_resolution_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Expected Current Resolution Id"},"rationale":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Rationale"}},"type":"object","required":["predicate","selected_claim_id","expected_current_resolution_id"],"title":"FactResolutionWriteRequest"},"FlowDirectionResponse":{"properties":{"segment_id":{"type":"string","title":"Segment Id"},"direction":{"type":"string","enum":["forward","reverse","unknown"],"title":"Direction"}},"type":"object","required":["segment_id","direction"],"title":"FlowDirectionResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IoPortCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"unit":{"type":"string","maxLength":100,"minLength":1,"title":"Unit"},"direction":{"type":"string","pattern":"^(input|output)$","title":"Direction"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"range_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Range Min"},"range_max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Range Max"},"sort_order":{"type":"integer","title":"Sort Order","default":0}},"type":"object","required":["name","unit","direction"],"title":"IoPortCreateRequest","description":"Request body for creating an IO port."},"IoPortResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"unit":{"type":"string","title":"Unit"},"direction":{"type":"string","title":"Direction"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"range_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Range Min"},"range_max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Range Max"},"sort_order":{"type":"integer","title":"Sort Order"}},"type":"object","required":["id","name","unit","direction","sort_order"],"title":"IoPortResponse","description":"An input/output port on a blackbox model."},"IoPortUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"unit":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Unit"},"direction":{"anyOf":[{"type":"string","pattern":"^(input|output)$"},{"type":"null"}],"title":"Direction"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"range_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Range Min"},"range_max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Range Max"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"}},"type":"object","title":"IoPortUpdateRequest","description":"Request body for updating an IO port."},"JobPageRun":{"properties":{"page_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Number","description":"Zero-based page index this task processed."},"status":{"type":"string","title":"Status","description":"Hyrex run status of the page's most recent attempt: SUCCESS, FAILED, LOST (worker died), CANCELED, RUNNING, QUEUED, etc."},"attempt_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attempt Number","description":"Attempt index (>0 means the page was retried)."},"started":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started","description":"When the page task started executing."},"finished":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished","description":"When the page task reached a terminal state."},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds","description":"How long the page took (finished - started), in seconds."},"task_name":{"type":"string","title":"Task Name","description":"Hyrex task name (e.g. process_page)."},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","description":"Why the page failed: persisted process_page exceptions for this page, or a synthesized note for LOST (worker died) pages."}},"type":"object","required":["status","task_name"],"title":"JobPageRun","description":"The latest per-page worker-task outcome for a job, from Hyrex."},"JobPageRunsResponse":{"properties":{"job_status_id":{"type":"string","format":"uuid","title":"Job Status Id","description":"The job these page runs belong to."},"page_runs":{"items":{"$ref":"#/components/schemas/JobPageRun"},"type":"array","title":"Page Runs","description":"Latest task run per page, page order (empty for non-page jobs)."},"degraded_components":{"items":{"$ref":"#/components/schemas/DegradedComponent"},"type":"array","title":"Degraded Components","description":"Components that finished but recorded a non-fatal warning (e.g. chart graph-gen timed out) — failures the job status alone doesn't reveal."},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"Earliest task enqueue/start across the job."},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At","description":"Latest task finish across the job."},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds","description":"End-to-end job wall-clock (Hyrex span), in seconds."}},"type":"object","required":["job_status_id","page_runs"],"title":"JobPageRunsResponse","description":"Per-page task outcomes for a single job.\n\nSourced live from Hyrex's task-run table; bounded by Hyrex's own row\nretention, so older jobs may return no rows. Hyrex does not store the\nper-task exception, so this reports each page's outcome/mode, not a\nper-page traceback — the job's ``error_message`` carries the reason."},"JobStatusGetResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The ID of the job status."},"status":{"type":"string","title":"Status","description":"The status of the job. Options: `queued`, `processing`, `done`, `error`, `cancelled`."},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message","description":"The error message returned from the job, if any."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"The date and time the job status was created."},"worker_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Worker Active","description":"Whether a worker is currently executing a per-page task for this job. None when the job has no per-page dispatch (e.g. single-task jobs) or has reached a terminal state. Allows clients to distinguish 'queued behind another job' from 'actively being processed' when status='processing' — the orchestrator flips status to 'processing' before fan-out, so the field alone is ambiguous on a single-worker stack."},"tasks_completed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tasks Completed","description":"Number of per-page tasks that have reported completion for this job. None when the job has no per-page dispatch (e.g. single-task jobs) or has reached a terminal state. Pair with tasks_total to render fraction progress (e.g. '3 / 11 pages')."},"tasks_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tasks Total","description":"Total number of per-page tasks this job dispatched. None when the job has no per-page dispatch or has reached a terminal state."}},"type":"object","required":["id","status","error_message","created_at"],"title":"JobStatusGetResponse"},"JobStatusListItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The ID of the job status."},"status":{"type":"string","title":"Status","description":"The status of the job. Options: `queued`, `processing`, `done`, `error`, `cancelled`."},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message","description":"The error message returned from the job, if any."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"The date and time the job status was created."},"document_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Document Id","description":"The public ID of the document this job is processing, if any."},"document_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Name","description":"The name of the document this job is processing, if any."},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds","description":"End-to-end processing wall-clock for the job (derived from the Hyrex task span), in seconds. None while still running or once the job's tasks have aged out of the queue's retention."}},"type":"object","required":["id","status","created_at"],"title":"JobStatusListItem"},"JobStatusListResponse":{"properties":{"job_statuses":{"items":{"$ref":"#/components/schemas/JobStatusListItem"},"type":"array","title":"Job Statuses","description":"The job statuses, newest first."},"pagination":{"$ref":"#/components/schemas/PaginationMetadata","description":"Pagination metadata."}},"type":"object","required":["job_statuses","pagination"],"title":"JobStatusListResponse"},"JobStatusSummaryResponse":{"properties":{"total":{"type":"integer","title":"Total","description":"Total number of job statuses."},"awaiting_upload":{"type":"integer","title":"Awaiting Upload","description":"Documents whose file has not been uploaded yet.","default":0},"queued":{"type":"integer","title":"Queued","description":"Jobs waiting to start.","default":0},"processing":{"type":"integer","title":"Processing","description":"Jobs currently running.","default":0},"done":{"type":"integer","title":"Done","description":"Jobs that completed successfully.","default":0},"error":{"type":"integer","title":"Error","description":"Jobs that failed.","default":0},"cancelled":{"type":"integer","title":"Cancelled","description":"Jobs that were cancelled.","default":0}},"type":"object","required":["total"],"title":"JobStatusSummaryResponse","description":"Global per-status counts across all of a user's job statuses."},"KBExtractionGetResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The ID of the extraction."},"schema_id":{"type":"string","format":"uuid","title":"Schema Id","description":"The ID of the schema used."},"document_id":{"type":"string","format":"uuid","title":"Document Id","description":"The ID of the document."},"document_name":{"type":"string","title":"Document Name","description":"The name of the document."},"extracted_data":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Extracted Data","description":"The extracted data as an array of entries. Each document may produce one or more entries."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the extraction was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the extraction was last updated."}},"type":"object","required":["id","schema_id","document_id","document_name","created_at","updated_at"],"title":"KBExtractionGetResponse","description":"Response for getting a KB extraction."},"KBExtractionListResponse":{"properties":{"extractions":{"items":{"$ref":"#/components/schemas/KBExtractionGetResponse"},"type":"array","title":"Extractions","description":"The list of extractions."},"json_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Json Schema","description":"The schema used for these extractions."}},"type":"object","required":["extractions"],"title":"KBExtractionListResponse","description":"Response for listing KB extractions."},"KBExtractionPostResponse":{"properties":{"job_status_id":{"type":"string","format":"uuid","title":"Job Status Id","description":"The job status ID for polling extraction progress."}},"type":"object","required":["job_status_id"],"title":"KBExtractionPostResponse","description":"Response for triggering KB extraction."},"KBSchemaCreateRequest":{"properties":{"user_hint":{"type":"string","maxLength":2000,"title":"User Hint","description":"Optional hint to guide schema generation.","default":""},"sample_count":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Sample Count","description":"Number of documents to sample for schema generation.","default":5}},"type":"object","title":"KBSchemaCreateRequest","description":"Request body for creating (generating) a KB schema."},"KBSchemaDeleteResponse":{"properties":{"message":{"type":"string","title":"Message","description":"The deletion confirmation message."},"schema_id":{"type":"string","format":"uuid","title":"Schema Id","description":"The ID of the deleted schema."}},"type":"object","required":["message","schema_id"],"title":"KBSchemaDeleteResponse","description":"Response for deleting a KB schema."},"KBSchemaGetResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The ID of the schema."},"knowledge_base_id":{"type":"string","format":"uuid","title":"Knowledge Base Id","description":"The ID of the knowledge base."},"name":{"type":"string","title":"Name","description":"The name of the schema."},"json_schema":{"additionalProperties":true,"type":"object","title":"Json Schema","description":"The JSON schema definition."},"user_hint":{"type":"string","title":"User Hint","description":"The user hint used for generation."},"version":{"type":"integer","title":"Version","description":"The schema version."},"is_active":{"type":"boolean","title":"Is Active","description":"Whether this is the active schema."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the schema was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the schema was last updated."}},"type":"object","required":["id","knowledge_base_id","name","json_schema","user_hint","version","is_active","created_at","updated_at"],"title":"KBSchemaGetResponse","description":"Response for getting a KB schema."},"KBSchemaListResponse":{"properties":{"schemas":{"items":{"$ref":"#/components/schemas/KBSchemaGetResponse"},"type":"array","title":"Schemas","description":"The list of schemas."}},"type":"object","required":["schemas"],"title":"KBSchemaListResponse","description":"Response for listing KB schemas."},"KBSchemaPostResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The ID of the created schema."},"job_status_id":{"type":"string","format":"uuid","title":"Job Status Id","description":"The job status ID for polling schema generation progress."}},"type":"object","required":["id","job_status_id"],"title":"KBSchemaPostResponse","description":"Response for creating a KB schema (with async generation)."},"KBSchemaUpdateRequest":{"properties":{"json_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Json Schema","description":"Updated JSON schema definition."},"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name","description":"Updated schema name."},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","description":"Whether to set this as the active schema."}},"type":"object","title":"KBSchemaUpdateRequest","description":"Request body for updating a KB schema."},"KGEntityExtractionPostResponse":{"properties":{"job_status_id":{"type":"string","format":"uuid","title":"Job Status Id","description":"The job status ID for polling field-extraction progress."}},"type":"object","required":["job_status_id"],"title":"KGEntityExtractionPostResponse","description":"Response for triggering the KG base-entity field-extraction job."},"KnowledgeBaseAddDocumentRequest":{"properties":{"document_id":{"type":"string","format":"uuid","title":"Document Id","description":"The ID of the document to add."}},"type":"object","required":["document_id"],"title":"KnowledgeBaseAddDocumentRequest","description":"Request body for adding a document to a knowledge base."},"KnowledgeBaseAddFolderRequest":{"properties":{"folder_id":{"type":"string","format":"uuid","title":"Folder Id","description":"The ID of the folder to add."}},"type":"object","required":["folder_id"],"title":"KnowledgeBaseAddFolderRequest","description":"Request body for adding a folder to a knowledge base."},"KnowledgeBaseCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"The name of the knowledge base."},"description":{"type":"string","maxLength":5000,"title":"Description","description":"The description of the knowledge base.","default":""}},"type":"object","required":["name"],"title":"KnowledgeBaseCreateRequest","description":"Request body for creating a knowledge base."},"KnowledgeBaseDeleteResponse":{"properties":{"message":{"type":"string","title":"Message","description":"The deletion confirmation message."},"knowledge_base_id":{"type":"string","format":"uuid","title":"Knowledge Base Id","description":"The ID of the deleted knowledge base."}},"type":"object","required":["message","knowledge_base_id"],"title":"KnowledgeBaseDeleteResponse","description":"Response for deleting a knowledge base."},"KnowledgeBaseGetResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The ID of the knowledge base."},"name":{"type":"string","title":"Name","description":"The name of the knowledge base."},"description":{"type":"string","title":"Description","description":"The description of the knowledge base."},"document_count":{"type":"integer","title":"Document Count","description":"The number of documents in the knowledge base."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the knowledge base was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the knowledge base was last updated."}},"type":"object","required":["id","name","description","document_count","created_at","updated_at"],"title":"KnowledgeBaseGetResponse","description":"Response for getting a knowledge base."},"KnowledgeBaseListResponse":{"properties":{"knowledge_bases":{"items":{"$ref":"#/components/schemas/KnowledgeBaseGetResponse"},"type":"array","title":"Knowledge Bases","description":"The list of knowledge bases."},"pagination":{"$ref":"#/components/schemas/PaginationMetadata","description":"Pagination metadata."}},"type":"object","required":["knowledge_bases","pagination"],"title":"KnowledgeBaseListResponse","description":"Response for listing knowledge bases."},"KnowledgeBasePostResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The ID of the created knowledge base."},"name":{"type":"string","title":"Name","description":"The name of the knowledge base."},"description":{"type":"string","title":"Description","description":"The description of the knowledge base."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the knowledge base was created."}},"type":"object","required":["id","name","description","created_at"],"title":"KnowledgeBasePostResponse","description":"Response for creating a knowledge base."},"KnowledgeBaseStatsResponse":{"properties":{"document_count":{"type":"integer","title":"Document Count","description":"The number of documents in the knowledge base."},"total_pages":{"type":"integer","title":"Total Pages","description":"The total number of pages across all documents."},"component_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Component Counts","description":"Component counts by type (e.g., table, flowchart, text)."},"total_components":{"type":"integer","title":"Total Components","description":"The total number of components across all documents."},"document_stats":{"items":{"$ref":"#/components/schemas/DocumentStatsItem"},"type":"array","title":"Document Stats","description":"Per-document component statistics."},"page_type_stats":{"items":{"$ref":"#/components/schemas/PageTypeStatsItem"},"type":"array","title":"Page Type Stats","description":"Per-page-type component statistics."}},"type":"object","required":["document_count","total_pages","component_counts","total_components","document_stats"],"title":"KnowledgeBaseStatsResponse","description":"Response for knowledge base component statistics."},"KnowledgeBaseUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name","description":"New name for the knowledge base."},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Description","description":"New description for the knowledge base."}},"type":"object","title":"KnowledgeBaseUpdateRequest","description":"Request body for updating a knowledge base."},"KnowledgeBaseVisualComponentSearchItem":{"properties":{"component_id":{"type":"string","format":"uuid","title":"Component Id","description":"The public ID of the visual component."},"document_id":{"type":"string","format":"uuid","title":"Document Id","description":"The public ID of the containing document."},"document_name":{"type":"string","title":"Document Name","description":"The name of the containing document."},"type":{"type":"string","title":"Type","description":"The visual component type."},"label":{"type":"string","title":"Label","description":"The visual component label."},"page_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Number","description":"The zero-based component page."},"sequence_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sequence Number","description":"The component order within its page."},"matched_fields":{"items":{"type":"string"},"type":"array","title":"Matched Fields","description":"The searchable fields containing the literal query."},"snippet":{"type":"string","title":"Snippet","description":"Text surrounding the first keyword match."}},"type":"object","required":["component_id","document_id","document_name","type","label","page_number","sequence_number","matched_fields","snippet"],"title":"KnowledgeBaseVisualComponentSearchItem","description":"A matching visual component and the document location that contains it."},"KnowledgeBaseVisualComponentSearchResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/KnowledgeBaseVisualComponentSearchItem"},"type":"array","title":"Results","description":"The matching visual components."},"pagination":{"$ref":"#/components/schemas/PaginationMetadata","description":"Pagination metadata."}},"type":"object","required":["results","pagination"],"title":"KnowledgeBaseVisualComponentSearchResponse","description":"Paginated visual-component keyword matches."},"KnowledgeGraphAddDocumentRequest":{"properties":{"document_id":{"type":"string","format":"uuid","title":"Document Id"}},"type":"object","required":["document_id"],"title":"KnowledgeGraphAddDocumentRequest"},"KnowledgeGraphConflictResponse":{"properties":{"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"entity_type_id":{"type":"string","title":"Entity Type Id"},"entity_name":{"type":"string","title":"Entity Name"},"predicate":{"type":"string","title":"Predicate"},"state":{"type":"string","const":"conflict","title":"State"},"values":{"items":{"$ref":"#/components/schemas/DistinctFactValueResponse"},"type":"array","title":"Values"}},"type":"object","required":["entity_id","entity_type_id","entity_name","predicate","state","values"],"title":"KnowledgeGraphConflictResponse"},"KnowledgeGraphConflictsResponse":{"properties":{"conflicts":{"items":{"$ref":"#/components/schemas/KnowledgeGraphConflictResponse"},"type":"array","title":"Conflicts"},"diagnostics":{"items":{"$ref":"#/components/schemas/FactDiagnosticResponse"},"type":"array","title":"Diagnostics"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["conflicts","diagnostics","total","limit","offset"],"title":"KnowledgeGraphConflictsResponse"},"KnowledgeGraphCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"type":"string","maxLength":5000,"title":"Description","default":""},"package_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Package Slug"},"package_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Package Version"}},"type":"object","required":["name"],"title":"KnowledgeGraphCreateRequest"},"KnowledgeGraphDeleteResponse":{"properties":{"message":{"type":"string","title":"Message"},"knowledge_graph_id":{"type":"string","format":"uuid","title":"Knowledge Graph Id"}},"type":"object","required":["message","knowledge_graph_id"],"title":"KnowledgeGraphDeleteResponse"},"KnowledgeGraphDocumentSummary":{"properties":{"public_id":{"type":"string","format":"uuid","title":"Public Id"},"name":{"type":"string","title":"Name"},"num_pages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Pages"}},"type":"object","required":["public_id","name","num_pages"],"title":"KnowledgeGraphDocumentSummary","description":"Document summary embedded in the graph-dump response.\n\nSmaller surface than ``DocumentSummary`` — the map view only needs\nenough to render a per-doc swimlane / filter chip."},"KnowledgeGraphGraphResponse":{"properties":{"nodes":{"items":{"$ref":"#/components/schemas/NodeResponse"},"type":"array","title":"Nodes"},"edges":{"items":{"$ref":"#/components/schemas/EdgeResponse"},"type":"array","title":"Edges"},"documents":{"items":{"$ref":"#/components/schemas/KnowledgeGraphDocumentSummary"},"type":"array","title":"Documents"}},"type":"object","required":["nodes","edges","documents"],"title":"KnowledgeGraphGraphResponse","description":"Single-round-trip dump of the KG suitable for d3 / cytoscape /\nreactflow. Each edge references its endpoints by node public_id, so the FE\nresolves them against ``nodes`` in the same payload — no follow-up calls.\n\nThe frontend defaults to the Tier-3 domain view (filter ``nodes`` to\n``tier == 'domain'`` and the edges between them); representation nodes and\ntheir ``represents`` / ``cross_references`` edges are the drill-down\nevidence layer (see kg-redesign-DESIGN.md §UI mapping)."},"KnowledgeGraphListResponse":{"properties":{"knowledge_graphs":{"items":{"$ref":"#/components/schemas/KnowledgeGraphResponse"},"type":"array","title":"Knowledge Graphs"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["knowledge_graphs","total","limit","offset"],"title":"KnowledgeGraphListResponse"},"KnowledgeGraphResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"document_count":{"type":"integer","title":"Document Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","description","document_count","created_at","updated_at"],"title":"KnowledgeGraphResponse"},"KnowledgeGraphStatsResponse":{"properties":{"document_count":{"type":"integer","title":"Document Count","description":"Documents in the knowledge graph."},"total_pages":{"type":"integer","title":"Total Pages","description":"Total pages across all documents."},"component_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Component Counts","description":"Component counts grouped by type (table, flowchart, …)."},"total_components":{"type":"integer","title":"Total Components","description":"Total components across all docs."},"document_stats":{"items":{"$ref":"#/components/schemas/DocumentStatsItem"},"type":"array","title":"Document Stats","description":"Per-document component breakdown."},"page_type_stats":{"items":{"$ref":"#/components/schemas/PageTypeStatsItem"},"type":"array","title":"Page Type Stats","description":"Per-page-type breakdown of pages, components, and usage."}},"type":"object","required":["document_count","total_pages","component_counts","total_components","document_stats"],"title":"KnowledgeGraphStatsResponse","description":"Aggregate component / page statistics across a KG's documents.\n\nShape mirrors ``KnowledgeBaseStatsResponse`` so the frontend stats view\ncan be shared between KB and KG without conditional rendering."},"KnowledgeGraphUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Description"}},"type":"object","title":"KnowledgeGraphUpdateRequest"},"LegendEntry":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"class":{"type":"string","title":"Class"},"subtype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtype"},"source_bbox":{"anyOf":[{"$ref":"#/components/schemas/BoundingBox"},{"type":"null"}]},"source_node_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Node Id"},"source_crop_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Crop Url"},"confidence":{"type":"number","title":"Confidence","default":1.0},"cfihos_tag_class_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cfihos Tag Class Code"},"cfihos_equipment_class_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cfihos Equipment Class Code"},"cfihos_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cfihos Version"},"cfihos_source":{"anyOf":[{"type":"string","enum":["deterministic_map","name_match","isa_letter_code","llm","template_applied","user_pinned"]},{"type":"null"}],"title":"Cfihos Source"},"cfihos_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cfihos Confidence"}},"type":"object","required":["id","name","class"],"title":"LegendEntry","description":"One row in a document's Legend.\n\n``entry_class`` / ``subtype`` are the canonical pair the entry maps\nto — same vocabulary the registry uses for nodes and annotations, so\na display-layer lookup can match by equality without a second\ntranslation step.\n\n``source_bbox`` and ``source_node_id`` are optional provenance: when\nset, they record the symbol the user picked when creating the entry\n(so the UI can render a thumbnail and re-focus on the seeding\ndetection). Entries built from an uploaded legend image or from a\ntemplate library leave ``source_node_id`` empty.\n\nThe ``cfihos_*`` fields link the entry to CFIHOS reference data.\nAll are optional — a legend works without them — but when set they\ndrive the Semantic Object modal, the enriched Excel export columns,\nand downstream interop exports (ISO 15926, POSC CAESAR equivalents\nvia the catalog mapping).\n\n``source_crop_url`` is the renderable URL for the entry's\nrepresentative crop, for entries that have no page-image\ncoordinate frame to crop in — i.e. those built from an uploaded\nlegend image. The remap pipeline's ``build_templates`` prefers\nthis when set, since ``source_bbox`` indexes into the page image\n(the wrong coordinate system for an uploaded crop).\nPick-from-drawing entries leave it unset and rely on\n``source_bbox`` instead.\n\nThe field holds either a ``data:image/png;base64,...`` URL\n(produced by the pure extractor for use in tests / scripts) or\nan ``http(s)://...`` storage URL (produced by the Hyrex task\nafter it uploads the crop to ``users/{user}/{doc}/legend_crops/\n{entry_id}.png``). Both render in ``<img src>`` and both decode\ncleanly in ``build_templates``; the task swaps from data URL to\nstorage URL before persisting so grounding_data stays lean."},"MatchRect":{"properties":{"x0":{"type":"integer","title":"X0"},"y0":{"type":"integer","title":"Y0"},"x1":{"type":"integer","title":"X1"},"y1":{"type":"integer","title":"Y1"}},"type":"object","required":["x0","y0","x1","y1"],"title":"MatchRect"},"MatchResultModel":{"properties":{"bbox":{"$ref":"#/components/schemas/MatchRect"},"score":{"type":"number","title":"Score"},"rotation":{"type":"integer","title":"Rotation"}},"type":"object","required":["bbox","score","rotation"],"title":"MatchResultModel"},"ModelCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Description"},"model_type":{"type":"string","pattern":"^(whitebox|blackbox)$","title":"Model Type"},"status":{"type":"string","pattern":"^(production|in_review|draft|archived)$","title":"Status","default":"draft"}},"type":"object","required":["name","model_type"],"title":"ModelCreateRequest","description":"Request body for creating a model."},"ModelDetailResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"model_type":{"type":"string","title":"Model Type"},"status":{"type":"string","title":"Status"},"total_nodes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Nodes"},"total_equations":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Equations"},"locked_boundary_conditions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Locked Boundary Conditions"},"degrees_of_freedom":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Degrees Of Freedom"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"io_ports":{"items":{"$ref":"#/components/schemas/IoPortResponse"},"type":"array","title":"Io Ports","default":[]}},"type":"object","required":["id","name","model_type","status","created_at","updated_at"],"title":"ModelDetailResponse","description":"Model with its IO ports."},"ModelResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"model_type":{"type":"string","title":"Model Type"},"status":{"type":"string","title":"Status"},"total_nodes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Nodes"},"total_equations":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Equations"},"locked_boundary_conditions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Locked Boundary Conditions"},"degrees_of_freedom":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Degrees Of Freedom"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","model_type","status","created_at","updated_at"],"title":"ModelResponse","description":"Summary of a model (no nested children)."},"ModelSummaryResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"model_type":{"type":"string","title":"Model Type"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","model_type","status","created_at","updated_at"],"title":"ModelSummaryResponse","description":"Summary of a model within a system (used in nested project/system views)."},"ModelTokenUsageItem":{"properties":{"model":{"type":"string","title":"Model","description":"The model name."},"provider":{"type":"string","title":"Provider","description":"The provider (e.g., openai, gemini)."},"input_tokens":{"type":"integer","title":"Input Tokens","description":"Total input tokens for this model."},"output_tokens":{"type":"integer","title":"Output Tokens","description":"Total output tokens for this model."},"estimated_cost_usd":{"type":"number","title":"Estimated Cost Usd","description":"Estimated cost in USD (calculated live from current pricing)."},"num_calls":{"type":"integer","title":"Num Calls","description":"Number of LLM calls."},"duration_ms":{"type":"integer","title":"Duration Ms","description":"Total LLM call duration in milliseconds."}},"type":"object","required":["model","provider","input_tokens","output_tokens","estimated_cost_usd","num_calls","duration_ms"],"title":"ModelTokenUsageItem","description":"Per-model token usage aggregate."},"ModelUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"type":"string","pattern":"^(production|in_review|draft|archived)$"},{"type":"null"}],"title":"Status"},"total_nodes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Nodes"},"total_equations":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Equations"},"locked_boundary_conditions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Locked Boundary Conditions"},"degrees_of_freedom":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Degrees Of Freedom"},"updated_by":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"ModelUpdateRequest","description":"Request body for updating a model."},"Node":{"properties":{"id":{"type":"string","title":"Id"},"class":{"type":"string","title":"Class"},"subtype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtype"},"bbox":{"$ref":"#/components/schemas/BoundingBox"},"transcription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcription"},"confidence":{"type":"number","title":"Confidence","default":1.0}},"type":"object","required":["id","class","bbox"],"title":"Node","description":"A topologically relevant entity (valve, pump, relay, etc.).\n\nWire/response shape only — runtime topology lives in\n`op_core.schematic.graph.SymbolModel`."},"NodeCreateRequest":{"properties":{"type_id":{"type":"string","minLength":1,"title":"Type Id"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"attributes":{"additionalProperties":true,"type":"object","title":"Attributes"},"selector":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Selector"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"}},"type":"object","required":["type_id","name"],"title":"NodeCreateRequest"},"NodeFieldExtractionRequest":{"properties":{"node_ids":{"items":{"type":"string","format":"uuid"},"type":"array","minItems":1,"title":"Node Ids","description":"Public IDs of the evidence-occurrence nodes to run the field-extraction pass over."}},"type":"object","required":["node_ids"],"title":"NodeFieldExtractionRequest"},"NodeNeighborItem":{"properties":{"edge":{"$ref":"#/components/schemas/EdgeResponse"},"peer":{"$ref":"#/components/schemas/NodeResponse"}},"type":"object","required":["edge","peer"],"title":"NodeNeighborItem"},"NodeNeighborsResponse":{"properties":{"node":{"$ref":"#/components/schemas/NodeResponse"},"incoming":{"items":{"$ref":"#/components/schemas/NodeNeighborItem"},"type":"array","title":"Incoming"},"outgoing":{"items":{"$ref":"#/components/schemas/NodeNeighborItem"},"type":"array","title":"Outgoing"}},"type":"object","required":["node","incoming","outgoing"],"title":"NodeNeighborsResponse"},"NodeResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"knowledge_graph_id":{"type":"string","format":"uuid","title":"Knowledge Graph Id"},"tier":{"type":"string","enum":["representation","domain"],"title":"Tier"},"type_id":{"type":"string","title":"Type Id"},"name":{"type":"string","title":"Name"},"attributes":{"additionalProperties":true,"type":"object","title":"Attributes"},"derived":{"additionalProperties":true,"type":"object","title":"Derived"},"selector":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Selector"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"source":{"type":"string","title":"Source"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","knowledge_graph_id","tier","type_id","name","attributes","source","created_at","updated_at"],"title":"NodeResponse","description":"A :class:`KGNode` — a representation occurrence or a domain entity.\n\n``tier`` distinguishes the two: a ``representation`` node carries a\n``selector`` (its editable page-region geometry) and no domain semantics; a\n``domain`` node carries no selector. ``confidence`` / ``source`` record how\nthe node came to exist (detector confidence, ``pipeline`` / ``user`` /\n``import``)."},"NodeUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"selector":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Selector"}},"type":"object","title":"NodeUpdateRequest","description":"Partial update: only the provided fields change. ``type_id`` is\nintentionally immutable here — changing a type would re-key attribute\nvalidation and switch tiers, which is out of scope for the rename/edit flow.\n\n``selector`` uses ``model_fields_set`` to distinguish \"absent\" (leave the\nstored geometry) from an explicit change; it may only be set on a\nrepresentation node."},"NodesDeleteAllResponse":{"properties":{"nodes_deleted":{"type":"integer","title":"Nodes Deleted"},"edges_deleted":{"type":"integer","title":"Edges Deleted"}},"type":"object","required":["nodes_deleted","edges_deleted"],"title":"NodesDeleteAllResponse"},"NodesInitializeResponse":{"properties":{"nodes_created":{"type":"integer","title":"Nodes Created"},"nodes_updated":{"type":"integer","title":"Nodes Updated"},"edges_created":{"type":"integer","title":"Edges Created"},"edges_removed":{"type":"integer","title":"Edges Removed"},"classes_assigned":{"type":"integer","title":"Classes Assigned","description":"Number of distinct classes the recognized tags were grouped into."},"distance_threshold":{"type":"number","title":"Distance Threshold","description":"The average-linkage cut height (edit-distance units) the clustering ran with."},"tags":{"items":{"$ref":"#/components/schemas/TagInitResult"},"type":"array","title":"Tags"}},"type":"object","required":["nodes_created","nodes_updated","edges_created","edges_removed","classes_assigned","distance_threshold","tags"],"title":"NodesInitializeResponse"},"OcrRect":{"properties":{"x0":{"type":"number","title":"X0"},"y0":{"type":"number","title":"Y0"},"x1":{"type":"number","title":"X1"},"y1":{"type":"number","title":"Y1"}},"type":"object","required":["x0","y0","x1","y1"],"title":"OcrRect"},"OcrRegion":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"bbox":{"$ref":"#/components/schemas/OcrRect"}},"type":"object","required":["entity_id","bbox"],"title":"OcrRegion"},"OcrRegionsRequest":{"properties":{"regions":{"items":{"$ref":"#/components/schemas/OcrRegion"},"type":"array","maxItems":100,"title":"Regions"},"try_rotations":{"type":"boolean","title":"Try Rotations","default":false}},"type":"object","title":"OcrRegionsRequest"},"OcrRegionsResponse":{"properties":{"result":{"items":{"$ref":"#/components/schemas/OcrResultModel"},"type":"array","title":"Result"},"timings":{"$ref":"#/components/schemas/OcrTimings"},"image_width":{"type":"integer","title":"Image Width"},"image_height":{"type":"integer","title":"Image Height"}},"type":"object","required":["result","timings","image_width","image_height"],"title":"OcrRegionsResponse"},"OcrResultModel":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"text":{"type":"string","title":"Text"}},"type":"object","required":["entity_id","text"],"title":"OcrResultModel"},"OcrTimings":{"properties":{"fetch_ms":{"type":"integer","title":"Fetch Ms"},"decode_ms":{"type":"integer","title":"Decode Ms"},"detect_ms":{"type":"integer","title":"Detect Ms"},"recognize_ms":{"type":"integer","title":"Recognize Ms"},"total_ms":{"type":"integer","title":"Total Ms"}},"type":"object","required":["fetch_ms","decode_ms","detect_ms","recognize_ms","total_ms"],"title":"OcrTimings"},"PackageContents":{"properties":{"slug":{"type":"string","title":"Slug"},"version":{"type":"string","title":"Version"},"display_name":{"type":"string","title":"Display Name"},"description":{"type":"string","title":"Description"},"entity_types":{"items":{"$ref":"#/components/schemas/EntityTypeSummary"},"type":"array","title":"Entity Types"},"relationship_types":{"items":{"$ref":"#/components/schemas/RelationshipTypeSummary"},"type":"array","title":"Relationship Types"}},"type":"object","required":["slug","version","display_name","description","entity_types","relationship_types"],"title":"PackageContents","description":"Full type metadata for a single Package."},"PackageSummary":{"properties":{"slug":{"type":"string","title":"Slug"},"version":{"type":"string","title":"Version"},"display_name":{"type":"string","title":"Display Name"},"description":{"type":"string","title":"Description"},"entity_type_ids":{"items":{"type":"string"},"type":"array","title":"Entity Type Ids"},"relationship_type_ids":{"items":{"type":"string"},"type":"array","title":"Relationship Type Ids"}},"type":"object","required":["slug","version","display_name","description","entity_type_ids","relationship_type_ids"],"title":"PackageSummary","description":"One Package from PACKAGE_REGISTRY, surfaced for the modal dropdown."},"PageDescriptionResponse":{"properties":{"id":{"type":"integer","title":"Id","description":"The ID of the page description"},"public_id":{"type":"string","format":"uuid","title":"Public Id","description":"The public id of the page description"},"document_id":{"type":"integer","title":"Document Id","description":"The document ID"},"page_number":{"type":"integer","title":"Page Number","description":"The page number (0-indexed)"},"description":{"type":"string","title":"Description","description":"The generated description for this page"},"page_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Type","description":"Page classification (e.g. general_document, mechanical_drawing)"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the description was created"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the description was last updated"}},"type":"object","required":["id","public_id","document_id","page_number","description","created_at","updated_at"],"title":"PageDescriptionResponse","description":"Response model for page descriptions."},"PageDescriptionUpdateRequest":{"properties":{"description":{"type":"string","title":"Description","description":"The updated description text"}},"type":"object","required":["description"],"title":"PageDescriptionUpdateRequest"},"PageImageResponse":{"properties":{"status":{"type":"string","enum":["ready","generating"],"title":"Status","description":"Status of the page image: 'ready' if available, 'generating' if being rendered"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"URL to the page image (when status is 'ready')"},"width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width","description":"Image width in pixels (when status is 'ready')"},"height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height","description":"Image height in pixels (when status is 'ready')"},"dpi":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dpi","description":"DPI of the stored image (when status is 'ready')"},"job_status_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Job Status Id","description":"Job status ID to poll for completion (when status is 'generating')"}},"type":"object","required":["status"],"title":"PageImageResponse","description":"Response for page image requests.\n\nWhen status is \"ready\", url and dpi fields are populated.\nWhen status is \"generating\", job_status_id is populated for polling."},"PageReprocess":{"properties":{"page_number":{"type":"integer","title":"Page Number","description":"0-indexed page number to reprocess."},"page_type":{"anyOf":[{"$ref":"#/components/schemas/PageType"},{"type":"null"}],"description":"User-selected page classification. When set, the page classifier is skipped and this value drives detector routing. When omitted, the classifier runs as usual."}},"type":"object","required":["page_number"],"title":"PageReprocess","description":"One page to reprocess, optionally with a pinned page_type.\n\nUsed at the API boundary (ReprocessingRequest.pages) and as the\nper-page entry inside PageDispatchPayload.dispatched_pages."},"PageResponseRequest":{"properties":{"question":{"type":"string","title":"Question","description":"The question to ask about the page"}},"type":"object","required":["question"],"title":"PageResponseRequest"},"PageResponseResponse":{"properties":{"answer":{"type":"string","title":"Answer","description":"The answer to the question"}},"type":"object","required":["answer"],"title":"PageResponseResponse"},"PageType":{"type":"string","enum":["mechanical_drawing","electrical_drawing","schematic_drawing","engineering_drawing","general_document"],"title":"PageType","description":"Page type classification for document processing.\n\nUsed to determine which detector/parser to use for each page."},"PageTypeStatsItem":{"properties":{"page_type":{"type":"string","title":"Page Type","description":"The page type (e.g., general_document, engineering_drawing), or 'unclassified' for pages the classifier never assigned a type."},"page_count":{"type":"integer","title":"Page Count","description":"The number of pages of this type."},"component_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Component Counts","description":"Component counts by type across pages of this page type."},"total_components":{"type":"integer","title":"Total Components","description":"The total number of components on pages of this type."},"input_tokens":{"type":"integer","title":"Input Tokens","description":"Page-scoped input tokens for pages of this type.","default":0},"output_tokens":{"type":"integer","title":"Output Tokens","description":"Page-scoped output tokens for pages of this type.","default":0},"estimated_cost_usd":{"type":"number","title":"Estimated Cost Usd","description":"Estimated USD cost of page-scoped work for pages of this type. Document-level work (summarization, finalization) belongs to no page and is excluded, so these totals sit below the document total.","default":0.0},"num_calls":{"type":"integer","title":"Num Calls","description":"Page-scoped LLM calls.","default":0},"duration_ms":{"type":"integer","title":"Duration Ms","description":"Page-scoped LLM call duration in milliseconds.","default":0}},"type":"object","required":["page_type","page_count","component_counts","total_components"],"title":"PageTypeStatsItem","description":"Per-page-type component statistics.\n\nA page's ``page_type`` selects its layout detector, so this breakdown shows\nhow many pages — and which components — landed on each route."},"PaginationMetadata":{"properties":{"total":{"type":"integer","title":"Total","description":"The total number of items matching the query."},"limit":{"type":"integer","title":"Limit","description":"The maximum number of items per page."},"offset":{"type":"integer","title":"Offset","description":"The number of items skipped."},"has_more":{"type":"boolean","title":"Has More","description":"Whether there are more items available."}},"type":"object","required":["total","limit","offset","has_more"],"title":"PaginationMetadata"},"PatchAnnotationRequest":{"properties":{"bbox":{"anyOf":[{"$ref":"#/components/schemas/BoundingBox"},{"type":"null"}]},"class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Class"},"subtype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtype"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"}},"type":"object","title":"PatchAnnotationRequest","description":"All fields optional. Identity-preserving — annotation id is unchanged."},"PatchArrowRequest":{"properties":{"bbox":{"anyOf":[{"$ref":"#/components/schemas/BoundingBox"},{"type":"null"}]},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"}},"type":"object","title":"PatchArrowRequest","description":"All fields optional. Identity-preserving — arrow id is unchanged."},"PatchFlowDirectionRequest":{"properties":{"direction":{"type":"string","enum":["forward","reverse","unknown"],"title":"Direction"}},"type":"object","required":["direction"],"title":"PatchFlowDirectionRequest"},"PatchNodeRequest":{"properties":{"bbox":{"anyOf":[{"$ref":"#/components/schemas/BoundingBox"},{"type":"null"}]},"class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Class"},"subtype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtype"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"transcription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcription"}},"type":"object","title":"PatchNodeRequest","description":"All fields optional. Identity-preserving — node id is unchanged."},"PatchReviewedRequest":{"properties":{"reviewed":{"type":"boolean","title":"Reviewed"}},"type":"object","required":["reviewed"],"title":"PatchReviewedRequest"},"PatchSegmentRequest":{"properties":{"pixel_path":{"anyOf":[{"items":{"items":{"type":"integer"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Pixel Path"},"bbox":{"anyOf":[{"$ref":"#/components/schemas/BoundingBox"},{"type":"null"}]},"stroke":{"anyOf":[{"$ref":"#/components/schemas/StrokeAppearance"},{"type":"null"}]},"start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start"},"end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End"}},"type":"object","title":"PatchSegmentRequest","description":"All fields optional. Identity-preserving — segment id is unchanged.\n\nEndpoints (start/end) are validated against existing vertices when patched."},"PatchVertexRequest":{"properties":{"x":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"X"},"y":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Y"},"kind":{"anyOf":[{"type":"string","enum":["port","junction","terminal"]},{"type":"null"}],"title":"Kind"},"node_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Node Id"}},"type":"object","title":"PatchVertexRequest","description":"All fields optional. Identity-preserving — vertex id is unchanged.\n\n`kind` reclassifies the vertex across the three internal lists\n(ports / junctions / terminals) while keeping the id stable, so\nsegments referencing this vertex stay valid. `node_id` is required\nwhen the resulting kind is `port` and ignored otherwise."},"PatternCase":{"properties":{"pattern":{"type":"string","maxLength":256,"minLength":1,"title":"Pattern"},"value":{"type":"string","maxLength":256,"title":"Value"}},"additionalProperties":false,"type":"object","required":["pattern","value"],"title":"PatternCase","description":"One ``pattern → value`` row of a :class:`PatternMapRule`; first\nmatching case wins. The FE writes ``^``-anchored escaped literals (a\n\"starts with\" prefix); any regex is accepted so richer match modes are a\nUI-only change."},"PatternMapRule":{"properties":{"kind":{"type":"string","const":"pattern_map","title":"Kind","default":"pattern_map"},"source_field":{"type":"string","title":"Source Field","default":"name"},"cases":{"items":{"$ref":"#/components/schemas/PatternCase"},"type":"array","minItems":1,"title":"Cases"},"default":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default"}},"additionalProperties":false,"type":"object","required":["cases"],"title":"PatternMapRule","description":"Derive a value from ONE stored field on the same entity: the field's\ntext is matched (case-insensitive ``re.search``) against ``cases`` in\norder; misses fall back to ``default``. ``source_field`` is ``\"name\"`` or\na stored-attribute id — never another derived property."},"PolygonPoint":{"properties":{"x":{"type":"number","title":"X"},"y":{"type":"number","title":"Y"}},"type":"object","required":["x","y"],"title":"PolygonPoint"},"Port":{"properties":{"id":{"type":"string","title":"Id"},"node_id":{"type":"string","title":"Node Id"},"x":{"type":"number","title":"X"},"y":{"type":"number","title":"Y"}},"type":"object","required":["id","node_id","x","y"],"title":"Port","description":"A connection point on a node's bounding box perimeter.\n\nWire/response shape only — runtime ports live as\n`PortPosition` entries inside `NodePayload.ports`."},"ProjectCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Description"}},"type":"object","required":["name"],"title":"ProjectCreateRequest","description":"Request body for creating a project."},"ProjectDetailResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"systems":{"items":{"$ref":"#/components/schemas/SystemDetailResponse"},"type":"array","title":"Systems","default":[]}},"type":"object","required":["id","name","created_at","updated_at"],"title":"ProjectDetailResponse","description":"Project with nested systems and their models."},"ProjectResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","created_at","updated_at"],"title":"ProjectResponse","description":"Summary of a project (no nested children)."},"ProjectUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Description"}},"type":"object","title":"ProjectUpdateRequest","description":"Request body for updating a project."},"ProjectionResponse":{"properties":{"discipline":{"type":"string","title":"Discipline","description":"Which discipline projection ran (e.g. 'piping', 'electrical', 'instrument_loop', 'aircraft')."},"drawings":{"type":"integer","title":"Drawings","description":"Number of schematic drawings the projection built from."},"nodes_created":{"type":"integer","title":"Nodes Created"},"edges_created":{"type":"integer","title":"Edges Created","description":"Total edges created, across all types."},"nodes_by_type":{"additionalProperties":{"type":"integer"},"type":"object","title":"Nodes By Type","description":"Projected node counts keyed by type_id."},"edges_by_type":{"additionalProperties":{"type":"integer"},"type":"object","title":"Edges By Type","description":"Projected edge counts keyed by edge_type_id (includes the represents grounding edges)."}},"type":"object","required":["discipline","drawings","nodes_created","edges_created","nodes_by_type","edges_by_type"],"title":"ProjectionResponse"},"QueueStatusEntry":{"properties":{"queue":{"type":"string","title":"Queue","description":"Hyrex queue name."},"queued":{"type":"integer","title":"Queued","description":"Tasks waiting to be picked up.","default":0},"running":{"type":"integer","title":"Running","description":"Tasks currently executing.","default":0},"waiting":{"type":"integer","title":"Waiting","description":"Tasks blocked on dependencies or a start time.","default":0},"succeeded_recent":{"type":"integer","title":"Succeeded Recent","description":"Tasks that succeeded in the last 24h.","default":0},"failed_recent":{"type":"integer","title":"Failed Recent","description":"Tasks that failed in the last 24h.","default":0},"lost_recent":{"type":"integer","title":"Lost Recent","description":"Tasks lost to dead workers in the last 24h.","default":0}},"type":"object","required":["queue"],"title":"QueueStatusEntry","description":"Task counts for a single Hyrex queue."},"QueueStatusResponse":{"properties":{"queues":{"items":{"$ref":"#/components/schemas/QueueStatusEntry"},"type":"array","title":"Queues","description":"Per-queue task counts (live depth + recent terminal)."},"workers":{"items":{"$ref":"#/components/schemas/WorkerStatus"},"type":"array","title":"Workers","description":"Recently-active workers, newest heartbeat first."},"live_workers":{"type":"integer","title":"Live Workers","description":"Workers whose heartbeat is within the live threshold."},"workers_total":{"type":"integer","title":"Workers Total","description":"Total recently-active workers (for pagination).","default":0},"tasks":{"items":{"$ref":"#/components/schemas/QueueTaskRun"},"type":"array","title":"Tasks","description":"The current user's in-flight + recent individual task runs."},"tasks_total":{"type":"integer","title":"Tasks Total","description":"Total of the user's task runs (for pagination).","default":0}},"type":"object","required":["queues","workers","live_workers"],"title":"QueueStatusResponse","description":"Live Hyrex queue depth and worker health for the activity dashboard."},"QueueTaskRun":{"properties":{"task_name":{"type":"string","title":"Task Name","description":"Hyrex task name (e.g. process_page)."},"queue":{"type":"string","title":"Queue","description":"Queue the task ran on."},"status":{"type":"string","title":"Status","description":"Hyrex run status."},"attempt_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attempt Number","description":"Attempt index."},"page_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Number","description":"Page index, for per-page tasks."},"job_id":{"type":"string","format":"uuid","title":"Job Id","description":"Public ID of the owning job status."},"document_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Document Id","description":"Public ID of the associated document, if any."},"document_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Name","description":"Name of the associated document, if any."},"queued":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Queued","description":"When enqueued."},"started":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started","description":"When started."},"finished":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished","description":"When finished."},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds","description":"finished - started, in seconds."}},"type":"object","required":["task_name","queue","status","job_id"],"title":"QueueTaskRun","description":"A single Hyrex task run belonging to the current user's jobs."},"RelationshipTypeCatalogItem":{"properties":{"type_id":{"type":"string","title":"Type Id"},"display_name":{"type":"string","title":"Display Name"},"description":{"type":"string","title":"Description"},"attribute_fields":{"items":{"$ref":"#/components/schemas/AttributeFieldSpec"},"type":"array","title":"Attribute Fields"},"origin":{"type":"string","title":"Origin"},"editable":{"type":"boolean","title":"Editable"},"public_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Public Id"},"source_tier":{"type":"string","enum":["representation","domain"],"title":"Source Tier"},"target_tier":{"type":"string","enum":["representation","domain"],"title":"Target Tier"},"edge_count":{"type":"integer","title":"Edge Count"}},"type":"object","required":["type_id","display_name","description","attribute_fields","origin","editable","public_id","source_tier","target_tier","edge_count"],"title":"RelationshipTypeCatalogItem"},"RelationshipTypeSummary":{"properties":{"id":{"type":"string","title":"Id"},"display_name":{"type":"string","title":"Display Name"},"description":{"type":"string","title":"Description"},"source_tier":{"type":"string","title":"Source Tier"},"target_tier":{"type":"string","title":"Target Tier"}},"type":"object","required":["id","display_name","description","source_tier","target_tier"],"title":"RelationshipTypeSummary"},"RelationshipTypeUpsertRequest":{"properties":{"type_id":{"type":"string","minLength":1,"title":"Type Id"},"display_name":{"type":"string","minLength":1,"title":"Display Name"},"description":{"type":"string","title":"Description","default":""},"source_tier":{"type":"string","enum":["representation","domain"],"title":"Source Tier"},"target_tier":{"type":"string","enum":["representation","domain"],"title":"Target Tier"},"attribute_fields":{"items":{"$ref":"#/components/schemas/AttributeFieldSpec"},"type":"array","title":"Attribute Fields"}},"type":"object","required":["type_id","display_name","source_tier","target_tier"],"title":"RelationshipTypeUpsertRequest"},"RemoveTagRequest":{"properties":{"tag_names":{"items":{"type":"string"},"type":"array","title":"Tag Names","description":"The names of the tags to remove"}},"type":"object","required":["tag_names"],"title":"RemoveTagRequest"},"ReplaceLegendRequest":{"properties":{"legend":{"items":{"$ref":"#/components/schemas/LegendEntry"},"type":"array","title":"Legend"}},"type":"object","required":["legend"],"title":"ReplaceLegendRequest"},"ReprocessingRequest":{"properties":{"pages":{"anyOf":[{"items":{"$ref":"#/components/schemas/PageReprocess"},"type":"array"},{"type":"null"}],"title":"Pages","description":"Pages to reprocess. Omit (or pass an empty list) to reprocess the whole document."},"skip_visual_transcription":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Skip Visual Transcription","description":"When True, skip VLM-based transcription for visual components. Tables use raw OCR, flowcharts/charts are empty."}},"type":"object","title":"ReprocessingRequest","description":"Request body for document/page reprocessing.\n\nEmpty/missing `pages` reprocesses the whole document. A non-empty list\nreprocesses exactly the listed pages, dispatched in parallel with a\nsingle finalize_document fan-in after they all complete."},"RunCreateRequest":{"properties":{"run_number":{"type":"integer","minimum":1.0,"title":"Run Number"},"status":{"type":"string","pattern":"^(queued|running|completed|failed)$","title":"Status","default":"queued"},"parameters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","required":["run_number"],"title":"RunCreateRequest","description":"Request body for creating a run."},"RunResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"run_number":{"type":"integer","title":"Run Number"},"status":{"type":"string","title":"Status"},"parameters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Parameters"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"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_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","run_number","status","created_at"],"title":"RunResponse","description":"A single run within a campaign."},"RunUpdateRequest":{"properties":{"status":{"anyOf":[{"type":"string","pattern":"^(queued|running|completed|failed)$"},{"type":"null"}],"title":"Status"},"parameters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Parameters"},"error":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Error"}},"type":"object","title":"RunUpdateRequest","description":"Request body for updating a run."},"SchematicJunction":{"properties":{"id":{"type":"string","title":"Id"},"x":{"type":"number","title":"X"},"y":{"type":"number","title":"Y"},"arrow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arrow Id"}},"type":"object","required":["id","x","y"],"title":"SchematicJunction","description":"A point where three or more line segments meet, not on any node.\n\nWire/response shape only — runtime junctions live as `JunctionModel`."},"SchematicLineSegment":{"properties":{"id":{"type":"string","title":"Id"},"start":{"type":"string","title":"Start"},"end":{"type":"string","title":"End"},"pixel_path":{"anyOf":[{"items":{"items":{"type":"integer"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Pixel Path"},"bbox":{"anyOf":[{"$ref":"#/components/schemas/BoundingBox"},{"type":"null"}]},"stroke":{"anyOf":[{"$ref":"#/components/schemas/StrokeAppearance"},{"type":"null"}]},"arrow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arrow Id"}},"type":"object","required":["id","start","end"],"title":"SchematicLineSegment","description":"An edge between ports, junctions, and/or terminals.\n\nWire/response shape only — the runtime equivalent is a `Coupling`\ncarrying a `SegmentPayload`. Flow direction lives on the payload, not\nthe wire-level segment."},"SchematicTerminal":{"properties":{"id":{"type":"string","title":"Id"},"x":{"type":"number","title":"X"},"y":{"type":"number","title":"Y"}},"type":"object","required":["id","x","y"],"title":"SchematicTerminal","description":"An endpoint where a line segment reaches the drawing boundary.\n\nWire/response shape only — runtime terminals live as `TerminalModel`."},"SetStaticConstraintsRequest":{"properties":{"constraints":{"items":{"$ref":"#/components/schemas/StaticConstraintInput"},"type":"array","title":"Constraints"}},"type":"object","required":["constraints"],"title":"SetStaticConstraintsRequest","description":"Request body for replacing all static constraints."},"SetVariableStatesRequest":{"properties":{"variables":{"items":{"$ref":"#/components/schemas/VariableStateInput"},"type":"array","title":"Variables"}},"type":"object","required":["variables"],"title":"SetVariableStatesRequest","description":"Request body for replacing all variable states."},"StaticConstraintInput":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"value":{"type":"string","maxLength":1000,"minLength":1,"title":"Value"}},"type":"object","required":["name","value"],"title":"StaticConstraintInput","description":"A single static constraint entry."},"StaticConstraintResponse":{"properties":{"name":{"type":"string","title":"Name"},"value":{"type":"string","title":"Value"}},"type":"object","required":["name","value"],"title":"StaticConstraintResponse","description":"A static constraint on a campaign."},"StepTokenUsageItem":{"properties":{"task_type":{"type":"string","title":"Task Type","description":"The task type (e.g., vlm, search, reasoning)."},"step":{"type":"string","title":"Step","description":"The step within the task type (e.g., vlm_generation, text_refinement). Task types can span more than one model role; the step separates them."},"input_tokens":{"type":"integer","title":"Input Tokens","description":"Total input tokens for this task type and step."},"output_tokens":{"type":"integer","title":"Output Tokens","description":"Total output tokens for this task type and step."},"estimated_cost_usd":{"type":"number","title":"Estimated Cost Usd","description":"Estimated cost in USD (calculated live from current pricing)."},"num_calls":{"type":"integer","title":"Num Calls","description":"Number of LLM calls."},"duration_ms":{"type":"integer","title":"Duration Ms","description":"Total LLM call duration in milliseconds."}},"type":"object","required":["task_type","step","input_tokens","output_tokens","estimated_cost_usd","num_calls","duration_ms"],"title":"StepTokenUsageItem","description":"Per-(task_type, step) token usage aggregate."},"StrokeAppearance":{"properties":{"color":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}],"title":"Color"},"pattern":{"anyOf":[{"type":"string","enum":["solid","dashed","dotted","dash_dot","dash_dot_dot"]},{"type":"null"}],"title":"Pattern"},"width_px":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width Px"},"dash_array":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Dash Array"}},"type":"object","title":"StrokeAppearance","description":"How a drawn line LOOKS, measured off the page image.\n\nEvery field is a measurement of ink, so every field is optional: a\nstroke traced through a colour-blind fallback has no `color`, and one\ntoo short to hold a full dash period has no `pattern`. `width_px` and\n`dash_array` are in the pixels of the page image the trace ran on\n(`PAGE_IMAGE_DPI`), the same frame as a segment's `pixel_path`.\n\nThis says nothing about what the line IS. A drawing's key maps an\nappearance to a kind of line, and that mapping is neither stored here\nnor needed to record what was measured."},"SubscribeRequest":{"properties":{"package_slug":{"type":"string","minLength":1,"title":"Package Slug"},"package_version":{"type":"string","minLength":1,"title":"Package Version"}},"type":"object","required":["package_slug","package_version"],"title":"SubscribeRequest"},"SubscriptionResponse":{"properties":{"package_slug":{"type":"string","title":"Package Slug"},"package_version":{"type":"string","title":"Package Version"},"enabled_at":{"type":"string","format":"date-time","title":"Enabled At"},"in_scope":{"type":"boolean","title":"In Scope","description":"False when the subscription's (slug, version) no longer resolves to a Package in code — e.g., the Package was removed. Surfaces the deprecation-as-not-in-scope behaviour to clients."}},"type":"object","required":["package_slug","package_version","enabled_at","in_scope"],"title":"SubscriptionResponse"},"SupportedFormatsResponse":{"properties":{"formats":{"items":{"$ref":"#/components/schemas/DocumentFormatInfo"},"type":"array","title":"Formats","description":"The document formats this server accepts for upload."}},"type":"object","required":["formats"],"title":"SupportedFormatsResponse"},"SystemCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Description"}},"type":"object","required":["name"],"title":"SystemCreateRequest","description":"Request body for creating a system."},"SystemDetailResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"models":{"items":{"$ref":"#/components/schemas/ModelSummaryResponse"},"type":"array","title":"Models","default":[]}},"type":"object","required":["id","name","created_at","updated_at"],"title":"SystemDetailResponse","description":"System with its child models."},"SystemResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","created_at","updated_at"],"title":"SystemResponse","description":"Summary of a system (no nested children)."},"SystemUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Description"}},"type":"object","title":"SystemUpdateRequest","description":"Request body for updating a system."},"TagInitResult":{"properties":{"node":{"$ref":"#/components/schemas/NodeResponse"},"total_mentions":{"type":"integer","title":"Total Mentions","description":"Total tag matches across all visual components."},"visual_component_count":{"type":"integer","title":"Visual Component Count","description":"Number of distinct visual components the tag appeared in."},"created":{"type":"boolean","title":"Created","description":"True if a new occurrence node was created; False if an existing one was reused."}},"type":"object","required":["node","total_mentions","visual_component_count","created"],"title":"TagInitResult"},"TagResponse":{"properties":{"id":{"type":"integer","title":"Id","description":"The ID of the tag."},"public_id":{"type":"string","format":"uuid","title":"Public Id","description":"The public id of the tag."},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","public_id","name","created_at","updated_at"],"title":"TagResponse"},"Template":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","enum":["available","coming_soon"],"title":"Status"},"description":{"type":"string","title":"Description"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"}},"type":"object","required":["id","name","status","description"],"title":"Template","description":"One row in the template picker."},"TemplateApplicationRequest":{"properties":{"template_id":{"type":"string","title":"Template Id"},"confirm":{"type":"boolean","title":"Confirm","default":false}},"type":"object","required":["template_id"],"title":"TemplateApplicationRequest","description":"Body for ``POST .../template-applications``.\n\n``confirm`` must be ``true`` — the endpoint enforces it as a\nserver-side guard against accidental destructive applies. The UI\nsets it after the in-modal confirmation dialog."},"TemplateMatchOptions":{"properties":{"threshold":{"type":"number","title":"Threshold","default":0.55},"four_rotations":{"type":"boolean","title":"Four Rotations","default":true},"max_pre_nms_candidates":{"type":"integer","title":"Max Pre Nms Candidates","default":10000}},"type":"object","title":"TemplateMatchOptions"},"TemplateMatchRequest":{"properties":{"template":{"$ref":"#/components/schemas/TemplateRect"},"exclude_bboxes":{"items":{"$ref":"#/components/schemas/TemplateRect"},"type":"array","title":"Exclude Bboxes"},"options":{"$ref":"#/components/schemas/TemplateMatchOptions","default":{"threshold":0.55,"four_rotations":true,"max_pre_nms_candidates":10000}}},"type":"object","required":["template"],"title":"TemplateMatchRequest"},"TemplateMatchResponse":{"properties":{"result":{"items":{"$ref":"#/components/schemas/MatchResultModel"},"type":"array","title":"Result"},"timings":{"$ref":"#/components/schemas/TemplateMatchTimings"},"image_width":{"type":"integer","title":"Image Width"},"image_height":{"type":"integer","title":"Image Height"},"template_width":{"type":"integer","title":"Template Width"},"template_height":{"type":"integer","title":"Template Height"},"candidates_before_nms":{"type":"integer","title":"Candidates Before Nms"},"candidates_before_cap":{"type":"integer","title":"Candidates Before Cap","default":0}},"type":"object","required":["result","timings","image_width","image_height","template_width","template_height","candidates_before_nms"],"title":"TemplateMatchResponse"},"TemplateMatchTimings":{"properties":{"fetch_ms":{"type":"integer","title":"Fetch Ms"},"decode_ms":{"type":"integer","title":"Decode Ms"},"match_ms":{"type":"integer","title":"Match Ms"},"scan_ms":{"type":"integer","title":"Scan Ms"},"nms_ms":{"type":"integer","title":"Nms Ms"},"total_ms":{"type":"integer","title":"Total Ms"}},"type":"object","required":["fetch_ms","decode_ms","match_ms","scan_ms","nms_ms","total_ms"],"title":"TemplateMatchTimings"},"TemplateRect":{"properties":{"x0":{"type":"number","title":"X0"},"y0":{"type":"number","title":"Y0"},"x1":{"type":"number","title":"X1"},"y1":{"type":"number","title":"Y1"}},"type":"object","required":["x0","y0","x1","y1"],"title":"TemplateRect"},"TextCompletionEntity":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"entity_type":{"type":"string","enum":["node","annotation"],"title":"Entity Type"},"subtype":{"type":"string","title":"Subtype"},"status":{"type":"string","enum":["ok","missing"],"title":"Status"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["entity_id","entity_type","subtype","status"],"title":"TextCompletionEntity"},"TextCompletionReport":{"properties":{"required_subtypes":{"items":{"type":"string"},"type":"array","title":"Required Subtypes"},"summary":{"$ref":"#/components/schemas/TextCompletionSummary"},"entities":{"items":{"$ref":"#/components/schemas/TextCompletionEntity"},"type":"array","title":"Entities"}},"type":"object","title":"TextCompletionReport"},"TextCompletionSummary":{"properties":{"ok":{"type":"integer","title":"Ok","default":0},"missing":{"type":"integer","title":"Missing","default":0},"total":{"type":"integer","title":"Total","default":0}},"type":"object","title":"TextCompletionSummary"},"TokenUsageResponse":{"properties":{"total_input_tokens":{"type":"integer","title":"Total Input Tokens","description":"Total input tokens across all documents."},"total_output_tokens":{"type":"integer","title":"Total Output Tokens","description":"Total output tokens across all documents."},"total_estimated_cost_usd":{"type":"number","title":"Total Estimated Cost Usd","description":"Total estimated cost in USD (calculated live from current pricing)."},"total_duration_ms":{"type":"integer","title":"Total Duration Ms","description":"Total LLM call duration in milliseconds across all documents."},"total_llm_calls":{"type":"integer","title":"Total Llm Calls","description":"Total number of LLM calls."},"model_usage":{"items":{"$ref":"#/components/schemas/ModelTokenUsageItem"},"type":"array","title":"Model Usage","description":"Token usage breakdown by model."},"step_usage":{"items":{"$ref":"#/components/schemas/StepTokenUsageItem"},"type":"array","title":"Step Usage","description":"Token usage breakdown by task type and step."},"document_usage":{"items":{"$ref":"#/components/schemas/DocumentTokenUsageItem"},"type":"array","title":"Document Usage","description":"Token usage breakdown by document."}},"type":"object","required":["total_input_tokens","total_output_tokens","total_estimated_cost_usd","total_duration_ms","total_llm_calls","model_usage","step_usage","document_usage"],"title":"TokenUsageResponse","description":"Response for token usage / cost tracking over a set of documents (a\nknowledge base, the whole account, or an explicit document list)."},"TrainingRunCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"dataset_id":{"type":"string","format":"uuid","title":"Dataset Id"},"algorithm":{"type":"string","maxLength":100,"minLength":1,"pattern":"^(kriging|pce|rbf|random_forest|xgboost|linear_regression|gradient_boosting|symbolic_regression|agentic_symbolic_regression|residual_gp_linear|residual_gp_xgboost)$","title":"Algorithm"},"validation_dataset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Validation Dataset Id"},"validation_split_ratio":{"anyOf":[{"type":"number","exclusiveMaximum":1.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Validation Split Ratio"},"hyperparameters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Hyperparameters"}},"type":"object","required":["name","dataset_id","algorithm"],"title":"TrainingRunCreateRequest","description":"Request body for creating a training run."},"TrainingRunResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"model_id":{"type":"string","format":"uuid","title":"Model Id"},"name":{"type":"string","title":"Name"},"dataset_id":{"type":"string","format":"uuid","title":"Dataset Id"},"validation_dataset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Validation Dataset Id"},"validation_split_ratio":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Validation Split Ratio"},"algorithm":{"type":"string","title":"Algorithm"},"hyperparameters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Hyperparameters"},"status":{"type":"string","title":"Status"},"is_active":{"type":"boolean","title":"Is Active"},"fitted_parameters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Fitted Parameters"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"training_progress":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Training Progress"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"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_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","model_id","name","dataset_id","algorithm","status","is_active","created_at","updated_at"],"title":"TrainingRunResponse","description":"Summary of a training run."},"TrainingRunUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"status":{"anyOf":[{"type":"string","pattern":"^(queued|running|completed|failed)$"},{"type":"null"}],"title":"Status"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"fitted_parameters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Fitted Parameters"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"training_progress":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Training Progress"},"error":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}],"title":"Error"}},"type":"object","title":"TrainingRunUpdateRequest","description":"Request body for updating a training run."},"UpdateComponentUrlRequest":{"properties":{"upload_url":{"type":"string","title":"Upload Url","description":"The upload URL that was used"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename","description":"Original filename to preserve"},"include_description":{"type":"boolean","title":"Include Description","description":"Whether to include description","default":false},"baseline_mode":{"type":"boolean","title":"Baseline Mode","description":"Use baseline mode","default":false},"baseline_provider":{"anyOf":[{"type":"string","enum":["vlm","azure","gcp"]},{"type":"null"}],"title":"Baseline Provider","description":"Baseline provider"},"fix_text_with_vlm":{"type":"boolean","title":"Fix Text With Vlm","description":"Fix text with VLM","default":true},"detect":{"type":"boolean","title":"Detect","description":"For schematic components: run symbol detection on the uploaded image instead of starting from an empty canvas","default":false},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config","description":"Optional config for schematic components"}},"type":"object","required":["upload_url"],"title":"UpdateComponentUrlRequest","description":"Request to finalize upload and trigger processing after direct S3 upload."},"UpdateDocumentUrlRequest":{"properties":{"upload_url":{"type":"string","title":"Upload Url","description":"The signed upload URL for the document."},"generate_content":{"type":"boolean","title":"Generate Content","description":"Whether to generate structured content (e.g., HTML tables)","default":true},"generate_description":{"type":"boolean","title":"Generate Description","description":"Whether to generate human-readable descriptions for visual components","default":true},"generate_summary":{"type":"boolean","title":"Generate Summary","description":"Whether to generate a document summary","default":true},"skip_visual_transcription":{"type":"boolean","title":"Skip Visual Transcription","description":"When True, skip VLM-based transcription for visual components","default":false},"skip_page_processing":{"type":"boolean","title":"Skip Page Processing","description":"When True, skip per-page visual processing entirely (no layout detection, OCR, or component extraction). The document is stored, converted to PDF, and its page count recorded.","default":false}},"type":"object","required":["upload_url"],"title":"UpdateDocumentUrlRequest"},"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"},"ValidationReport":{"properties":{"bbox_connectivity":{"$ref":"#/components/schemas/BboxConnectivityReport"},"text_completion":{"$ref":"#/components/schemas/TextCompletionReport"}},"type":"object","required":["bbox_connectivity","text_completion"],"title":"ValidationReport"},"VariableStateInput":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"unit":{"type":"string","maxLength":100,"minLength":1,"title":"Unit"},"dof_state":{"type":"string","pattern":"^(independent|dependent|fixed)$","title":"Dof State"},"fixed_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fixed Value"}},"type":"object","required":["name","unit","dof_state"],"title":"VariableStateInput","description":"A single variable state entry."},"VariableStateResponse":{"properties":{"name":{"type":"string","title":"Name"},"unit":{"type":"string","title":"Unit"},"dof_state":{"type":"string","title":"Dof State"},"fixed_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fixed Value"}},"type":"object","required":["name","unit","dof_state"],"title":"VariableStateResponse","description":"A variable state configuration for a campaign."},"VisualComponentCreateRequest":{"properties":{"type":{"type":"string","title":"Type","description":"Component type (text, table, image, etc.)"},"page_number":{"type":"integer","title":"Page Number","description":"0-indexed page number"},"bbox":{"$ref":"#/components/schemas/BoundingBox","description":"Bounding box coordinates"},"bbox_dpi":{"type":"integer","title":"Bbox Dpi","description":"DPI the `bbox` coordinates are expressed in. Stored VC bboxes are canonical BASE_DPI (72); a client that draws on a page image at a different DPI (e.g. PAGE_IMAGE_DPI=150) passes that value here and the server converts to BASE_DPI before persisting.","default":72},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Optional label"}},"type":"object","required":["type","page_number","bbox"],"title":"VisualComponentCreateRequest"},"VisualComponentUpdateRequest":{"properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the visual component"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content","description":"The structured content of the visual component"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"The label of the visual component"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type","description":"The type of the visual component"},"bbox":{"anyOf":[{"$ref":"#/components/schemas/BoundingBox"},{"type":"null"}],"description":"The bounding box of the visual component"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"The metadata of the visual component"},"grounding":{"anyOf":[{"$ref":"#/components/schemas/op_core__api__endpoints__documents__visual_components__GroundingUpdateRequest"},{"type":"null"}],"description":"Grounding data for component regeneration"},"sequence_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sequence Number","description":"The sequence number for ordering within a page"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id","description":"Public id of the parent visual component (must be on the same page and fully contain this component's bbox). Send null to clear the parent; omit the field entirely to leave it unchanged."}},"type":"object","title":"VisualComponentUpdateRequest"},"WorkerStatus":{"properties":{"name":{"type":"string","title":"Name","description":"Executor name."},"worker_name":{"type":"string","title":"Worker Name","description":"Worker host/process identifier."},"status":{"type":"string","title":"Status","description":"Executor status: RUNNING, LOST, SHUTDOWN, …"},"queues":{"items":{"type":"string"},"type":"array","title":"Queues","description":"Queues this worker pulls from."},"started":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started","description":"When the worker started."},"last_heartbeat":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Heartbeat","description":"Most recent heartbeat from the worker."},"seconds_since_heartbeat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Seconds Since Heartbeat","description":"Age of the last heartbeat, in seconds."}},"type":"object","required":["name","worker_name","status"],"title":"WorkerStatus","description":"A recently-active Hyrex executor (worker)."},"WorkspaceCommitRequest":{"properties":{"files":{"items":{"$ref":"#/components/schemas/WorkspaceManifestFile"},"type":"array","maxItems":10000,"title":"Files"},"expected_parent_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Expected Parent Version Id"}},"type":"object","title":"WorkspaceCommitRequest","description":"Full file set to snapshot as a new workspace version.\n\nEvery referenced blob must already be uploaded (see the blob endpoint);\nthe commit only writes the manifest, it never carries bytes.\n\n``expected_parent_version_id`` is the version the client diffed against\n(from ``GET /manifest``). When set, the commit is a compare-and-swap: if\nthe workspace has advanced past it, the commit is rejected with 409 so the\nclient re-pulls and merges rather than silently shadowing the other writer.\nOmit it to accept last-writer-wins."},"WorkspaceManifestFile":{"properties":{"path":{"type":"string","title":"Path"},"sha256":{"type":"string","title":"Sha256"},"size":{"type":"integer","maximum":67108864.0,"minimum":0.0,"title":"Size"}},"type":"object","required":["path","sha256","size"],"title":"WorkspaceManifestFile","description":"One file in a client-supplied workspace manifest."},"WorkspaceSyncPlanRequest":{"properties":{"shas":{"items":{"type":"string"},"type":"array","maxItems":10000,"title":"Shas"}},"type":"object","title":"WorkspaceSyncPlanRequest","description":"A list of content hashes the client is about to push."},"op_core__api__endpoints__components__crud__ComponentGetResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The ID of the component"},"type":{"type":"string","enum":["flowchart","diagram","mindmap","chart","table","schematic"],"title":"Type","description":"The type of the component"},"label":{"type":"string","title":"Label","description":"The label of the component"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"A description of the component"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content","description":"The generated component content"},"render_svg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Render Svg","description":"SVG rendering of the chart (for matplotlib charts only)"},"grounding":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Grounding","description":"Grounding metadata (bounding boxes, detections)"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Component metadata (includes processed_image_url for charts)"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence","description":"Global confidence score (0.0-1.0) for flowchart generation quality"}},"type":"object","required":["id","type","label"],"title":"ComponentGetResponse"},"op_core__api__endpoints__components__crud__GroundingUpdateRequest":{"properties":{"html_table":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Html Table","description":"The HTML table containing chart data (for charts)"},"intermediate_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Intermediate Json","description":"The intermediate JSON representation (for flowcharts)"}},"type":"object","title":"GroundingUpdateRequest"},"op_core__api__endpoints__documents__pages__ComponentGetResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The ID of the component"},"type":{"type":"string","title":"Type","description":"The type of the component"},"document_id":{"type":"string","format":"uuid","title":"Document Id","description":"The ID of the document"},"page_number":{"type":"integer","title":"Page Number","description":"The page number of the component"},"label":{"type":"string","title":"Label","description":"The label of the component"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text","description":"Detailed text or HTML for the component"},"bbox":{"$ref":"#/components/schemas/BoundingBox","description":"The bounding box of the component"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"The metadata of the component"}},"type":"object","required":["id","type","document_id","page_number","label","text","bbox","metadata"],"title":"ComponentGetResponse"},"op_core__api__endpoints__documents__schematic_archive__ImportArchiveResponse":{"properties":{"created_count":{"type":"integer","title":"Created Count"},"created_vc_ids":{"items":{"type":"string"},"type":"array","title":"Created Vc Ids"}},"type":"object","required":["created_count","created_vc_ids"],"title":"ImportArchiveResponse","description":"Outcome of an archive import: the new VCs added to the document."},"op_core__api__endpoints__documents__visual_components__GroundingUpdateRequest":{"properties":{"html_table":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Html Table","description":"The HTML table containing chart data (for graphs)"},"intermediate_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Intermediate Json","description":"The intermediate JSON representation (for flowcharts)"}},"type":"object","title":"GroundingUpdateRequest"},"op_core__api__endpoints__knowledge_graphs__archive__ImportArchiveResponse":{"properties":{"knowledge_graph_id":{"type":"string","format":"uuid","title":"Knowledge Graph Id"},"name":{"type":"string","title":"Name"},"package_count":{"type":"integer","title":"Package Count"},"document_count":{"type":"integer","title":"Document Count"},"visual_component_count":{"type":"integer","title":"Visual Component Count"},"node_count":{"type":"integer","title":"Node Count"},"edge_count":{"type":"integer","title":"Edge Count"},"extraction_run_count":{"type":"integer","title":"Extraction Run Count"},"extraction_source_count":{"type":"integer","title":"Extraction Source Count"},"attribute_claim_count":{"type":"integer","title":"Attribute Claim Count"},"fact_resolution_count":{"type":"integer","title":"Fact Resolution Count"}},"type":"object","required":["knowledge_graph_id","name","package_count","document_count","visual_component_count","node_count","edge_count","extraction_run_count","extraction_source_count","attribute_claim_count","fact_resolution_count"],"title":"ImportArchiveResponse"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}},"tags":[{"name":"Documents","description":"This section contains API endpoints related to documents. A document is a file that has been uploaded to the system (e.g. a .pdf, .docx, .txt, etc.)."},{"name":"Folders","description":"This section contains API endpoints related to folders. Folders provide a hierarchical organization structure for documents."},{"name":"Questions","description":"This section contains API endpoints related to questions. A question is a natural language question that the user has asked of the system, often in reference to a document."},{"name":"Job Status","description":"This section contains API endpoints related to job statuses. A job status is a record of the status of a job (e.g. queued, processing, done, error) and is used to track asynchronous operations."},{"name":"Settings","description":"This section contains API endpoints related to user settings. A user setting is a record of the user's settings (e.g. language, theme, etc.) and is used to track user preferences."},{"name":"Components","description":"This section contains API endpoints related to visual content generation. Generate Mermaid charts and diagrams from images using AI vision capabilities."},{"name":"Agent","description":"This section contains API endpoints for agentic interactions. Create sessions, run agent loops with tools, and manage conversation history."},{"name":"Agent Skills","description":"This section contains API endpoints for managing user-defined agent skills. Skills define custom behaviors and prompts for agents."},{"name":"Knowledge Bases","description":"This section contains API endpoints for managing knowledge bases. Knowledge bases organize documents into collections for retrieval and analysis."},{"name":"Knowledge Graphs","description":"This section contains API endpoints for managing knowledge graphs — collections of documents plus typed entities and typed relationships drawn from code-defined Packages."}]}