{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/api/schematic_upload_url":{"post":{"tags":["schematics"],"summary":"Get Schematic Upload Url","description":"Generate a presigned S3 upload URL for a given file extension.\nExpiration defaults to 300 seconds unless provided.","operationId":"get_schematic_upload_url_api_schematic_upload_url_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/detect/parts-placed":{"post":{"tags":["detection"],"summary":"Parts Placed","operationId":"parts_placed_api_detect_parts_placed_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/detect-schematic":{"post":{"tags":["schematic-detection"],"summary":"Detect Schematic","operationId":"detect_schematic_api_detect_schematic_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectSchematicRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectSchematicResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/detect-intent":{"post":{"tags":["schematic-detection"],"summary":"Detect Intent","operationId":"detect_intent_api_detect_intent_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectSchematicRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectSchematicResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spice-netlist/process-xml":{"post":{"tags":["spice"],"summary":"Process Spice Netlist","operationId":"process_spice_netlist_api_spice_netlist_process_xml_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpiceNetlistRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spice-netlist/process-with-autowiring":{"post":{"tags":["spice"],"summary":"Process Netlist With Autowiring","description":"Process a .PARTS/.NETS format netlist with auto-placement and autowiring.\n\nComponents with #POS are placed at their specified positions.\nComponents without #POS are auto-placed using net-connectivity-based\nheuristics (weighted centroid + spiral search) in pin_wire_calculator.\n\nFlow:\n1. Parse .PARTS/.NETS/.WIRES format\n2. Pass raw netlist to pin_wire_calculator which handles both positioned\n   and unpositioned components, then does A* wire routing","operationId":"process_netlist_with_autowiring_api_spice_netlist_process_with_autowiring_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpiceNetlistRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpiceNetlistResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chat/thread/{thread_id}":{"delete":{"tags":["chat"],"summary":"Clear Thread","description":"Clear conversation history and schematic context for a thread.\n\nCalled by the frontend when the user starts a new schematic so stale\nhistory does not bleed into the new session.","operationId":"clear_thread_chat_thread__thread_id__delete","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chat/stream":{"post":{"tags":["chat"],"summary":"Chat Stream Endpoint","operationId":"chat_stream_endpoint_chat_stream_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessagePayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat-suggestions":{"get":{"tags":["chat"],"summary":"Suggestions","operationId":"suggestions_api_chat_suggestions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/tracking/event/":{"post":{"tags":["tracking"],"summary":"Tracking Event","operationId":"tracking_event_api_tracking_event__post","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackingEventPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/test-schematic/test-librarian":{"get":{"summary":"Test Librarian","description":"Isolated test endpoint for _call_librarian.\nUsage: /test-schematic/test-librarian?message=I+need+a+5V+regulator\nAdd &debug=true to see Stage 1 candidates.","operationId":"test_librarian_test_schematic_test_librarian_get","parameters":[{"name":"message","in":"query","required":true,"schema":{"type":"string","title":"Message"}},{"name":"debug","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Debug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/test-schematic/test-evaluator":{"get":{"summary":"Test Evaluator","description":"Isolated test endpoint: Librarian + Template Lookup + Evaluator.\nReturns the evaluator's path decision and block plan without running\nsearch or build. Usage: /test-schematic/test-evaluator?message=I+need+a+5V+regulator","operationId":"test_evaluator_test_schematic_test_evaluator_get","parameters":[{"name":"message","in":"query","required":true,"schema":{"type":"string","title":"Message"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/test-schematic/v2/testers":{"get":{"summary":"Get Testers","description":"Return distinct tester names from query_log.","operationId":"get_testers_test_schematic_v2_testers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/test-schematic/v2/search":{"post":{"summary":"Search Schematic V2 Sse","description":"New architecture: Designer → Block Matcher + Search Agent → Evaluate → Build.","operationId":"search_schematic_v2_sse_test_schematic_v2_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchematicSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/test-schematic/clear-cache":{"post":{"summary":"Clear Path A Cache","description":"Clear all Path A cached results (in-memory + Redis).","operationId":"clear_path_a_cache_test_schematic_clear_cache_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/use-cases":{"get":{"summary":"Use Cases Page","description":"Serve the use cases management UI.","operationId":"use_cases_page_admin_use_cases_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/test-schematic/catalog":{"get":{"summary":"Get Catalog","description":"Return all available blocks for testers to see what the system knows.","operationId":"get_catalog_test_schematic_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/test-schematic/feedback":{"post":{"summary":"Submit Feedback","description":"Submit thumbs up/down feedback for a search result.","operationId":"submit_feedback_test_schematic_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchematicFeedbackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/test-schematic/use-cases":{"get":{"summary":"List Use Cases","description":"List use cases, optionally filtered by block_id.","operationId":"list_use_cases_test_schematic_use_cases_get","parameters":[{"name":"block_id","in":"query","required":false,"schema":{"type":"string","title":"Block Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Add Use Case","description":"Add a use case to a block.","operationId":"add_use_case_test_schematic_use_cases_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UseCaseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/test-schematic/use-cases/bulk":{"post":{"summary":"Add Use Cases Bulk","description":"Add multiple use cases to a block at once.","operationId":"add_use_cases_bulk_test_schematic_use_cases_bulk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UseCaseBulkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/test-schematic/use-cases/{use_case_id}":{"delete":{"summary":"Delete Use Case","description":"Delete a use case by ID.","operationId":"delete_use_case_test_schematic_use_cases__use_case_id__delete","parameters":[{"name":"use_case_id","in":"path","required":true,"schema":{"type":"integer","title":"Use Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/test-schematic/download/{block_id}":{"get":{"summary":"Download Schematic","description":"Download the .sch file for a block.","operationId":"download_schematic_test_schematic_download__block_id__get","parameters":[{"name":"block_id","in":"path","required":true,"schema":{"type":"string","title":"Block Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/test-schematic/v3/testers":{"get":{"summary":"Testers V3","operationId":"testers_v3_test_schematic_v3_testers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/test-schematic/v3/search":{"post":{"summary":"Search Schematic V3 Sse","description":"Unified pipeline: one flow for all circuit generation.","operationId":"search_schematic_v3_sse_test_schematic_v3_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchematicSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/schematic/version":{"get":{"tags":["schematic"],"summary":"Generation Version","operationId":"generation_version_api_schematic_version_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/schematic/generate":{"post":{"tags":["schematic"],"summary":"Generate Schematic","operationId":"generate_schematic_api_schematic_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/schematic/blocks":{"get":{"tags":["schematic"],"summary":"List Blocks","description":"Return all available blocks with .sch files.","operationId":"list_blocks_api_schematic_blocks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/feedback/data":{"get":{"summary":"Feedback Data","description":"Return all query_log entries as JSON (cached for 5 min).","operationId":"feedback_data_admin_feedback_data_get","parameters":[{"name":"since","in":"query","required":false,"schema":{"type":"string","description":"ISO timestamp to filter from","title":"Since"},"description":"ISO timestamp to filter from"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/feedback":{"get":{"summary":"Feedback Page","operationId":"feedback_page_admin_feedback_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/blocks/ingest":{"post":{"summary":"Ingest Single Block","description":"Upload a single .sch file to create/update a block.\nOptional: BOM CSV, netlist file, description, use cases.","operationId":"ingest_single_block_api_blocks_ingest_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_ingest_single_block_api_blocks_ingest_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/blocks/ingest/bulk":{"post":{"summary":"Ingest Bulk Blocks","description":"Upload multiple .sch files at once. Returns SSE stream with progress.\nAccepts either individual .sch files OR a single .zip containing .sch files.\nOptional: matching BOM files (matched by filename stem).","operationId":"ingest_bulk_blocks_api_blocks_ingest_bulk_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_ingest_bulk_blocks_api_blocks_ingest_bulk_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/blocks/backfill-formulas":{"post":{"summary":"Backfill Formulas","description":"Retroactively extract design formulas for all blocks missing them.","operationId":"backfill_formulas_api_blocks_backfill_formulas_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/ingest":{"get":{"summary":"Ingest Page","operationId":"ingest_page_admin_ingest_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/health/db":{"get":{"summary":"Health Db","description":"DB connection status — pool stats + server-side connection count.","operationId":"health_db_health_db_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/test-schematic/v2":{"get":{"summary":"Test Schematic V2 Page","operationId":"test_schematic_v2_page_test_schematic_v2_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/test-schematic":{"get":{"summary":"Test Schematic Page","operationId":"test_schematic_page_test_schematic_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/test-schematic/v3":{"get":{"summary":"Test Schematic Page","operationId":"test_schematic_page_test_schematic_v3_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/test-schematic/evaluator":{"get":{"summary":"Test Evaluator Page","operationId":"test_evaluator_page_test_schematic_evaluator_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/test-schematic/compare":{"get":{"summary":"Compare Page","operationId":"compare_page_test_schematic_compare_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/test-schematic/process-xml":{"get":{"summary":"Process Xml Page","operationId":"process_xml_page_test_schematic_process_xml_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/proxy/manufacturer-logo":{"get":{"summary":"Proxy Manufacturer Logo","description":"Proxy manufacturer logos from snapeda.com to avoid CORS issues.","operationId":"proxy_manufacturer_logo_api_proxy_manufacturer_logo_get","parameters":[{"name":"manufacturer","in":"query","required":true,"schema":{"type":"string","description":"Manufacturer name","title":"Manufacturer"},"description":"Manufacturer name"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/desktop/health":{"get":{"tags":["desktop"],"summary":"Health","operationId":"health_api_desktop_health_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/desktop/runs":{"post":{"tags":["desktop"],"summary":"Run","operationId":"run_api_desktop_runs_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/desktop/exports":{"post":{"tags":["desktop"],"summary":"Start Export","operationId":"start_export_api_desktop_exports_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/desktop/exports/{job}":{"get":{"tags":["desktop"],"summary":"Export Status","operationId":"export_status_api_desktop_exports__job__get","parameters":[{"name":"job","in":"path","required":true,"schema":{"type":"string","title":"Job"}},{"name":"ticket","in":"query","required":true,"schema":{"type":"string","title":"Ticket"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/desktop/replacements":{"post":{"tags":["desktop"],"summary":"Replacement","operationId":"replacement_api_desktop_replacements_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplacementRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/desktop/parts/provenance":{"get":{"tags":["desktop"],"summary":"Provenance","operationId":"provenance_api_desktop_parts_provenance_get","parameters":[{"name":"part_number","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":300,"title":"Part Number"}},{"name":"manufacturer","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":300,"title":"Manufacturer"}},{"name":"unipart_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{1,20}$"},{"type":"null"}],"title":"Unipart Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Provenance"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/desktop/parts/resources":{"get":{"tags":["desktop"],"summary":"Resources","operationId":"resources_api_desktop_parts_resources_get","parameters":[{"name":"part_number","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":300,"title":"Part Number"}},{"name":"manufacturer","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":300,"title":"Manufacturer"}},{"name":"unipart_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{1,20}$"},{"type":"null"}],"title":"Unipart Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resources"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/desktop/parts/reference-designs":{"get":{"tags":["desktop"],"summary":"Reference Designs","operationId":"reference_designs_api_desktop_parts_reference_designs_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":300,"default":"","title":"Q"}},{"name":"manufacturer","in":"query","required":false,"schema":{"type":"string","maxLength":300,"default":"","title":"Manufacturer"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":1,"default":1,"title":"Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceCatalog"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_ingest_bulk_blocks_api_blocks_ingest_bulk_post":{"properties":{"sch_files":{"anyOf":[{"items":{"type":"string","format":"binary"},"type":"array"},{"type":"null"}],"title":"Sch Files"},"zip_file":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"Zip File"},"bom_files":{"anyOf":[{"items":{"type":"string","format":"binary"},"type":"array"},{"type":"null"}],"title":"Bom Files"},"overwrite":{"type":"string","title":"Overwrite","default":"false"},"use_cases":{"type":"string","title":"Use Cases"}},"type":"object","title":"Body_ingest_bulk_blocks_api_blocks_ingest_bulk_post"},"Body_ingest_single_block_api_blocks_ingest_post":{"properties":{"sch_file":{"type":"string","format":"binary","title":"Sch File"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"bom_file":{"type":"string","format":"binary","title":"Bom File"},"netlist_file":{"type":"string","format":"binary","title":"Netlist File"},"use_cases":{"type":"string","title":"Use Cases"},"overwrite":{"type":"boolean","title":"Overwrite","default":false}},"type":"object","required":["sch_file"],"title":"Body_ingest_single_block_api_blocks_ingest_post"},"BomOverride":{"properties":{"ref":{"type":"string","title":"Ref"},"part":{"type":"string","title":"Part"},"manufacturer":{"type":"string","title":"Manufacturer","default":""},"specs":{"type":"string","title":"Specs","default":""}},"type":"object","required":["ref","part"],"title":"BomOverride"},"BomOverrideItem":{"properties":{"ref":{"type":"string","title":"Ref"},"part":{"type":"string","title":"Part"},"manufacturer":{"type":"string","title":"Manufacturer","default":""},"specs":{"type":"string","title":"Specs","default":""}},"type":"object","required":["ref","part"],"title":"BomOverrideItem"},"CadMetadata":{"properties":{"part_id":{"type":"integer","title":"Part Id"},"standard":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Standard"},"standard_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Standard Description"},"datasheet_revision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Datasheet Revision"},"added_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Added At"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format"},"model_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Type"}},"type":"object","required":["part_id"],"title":"CadMetadata"},"ChatMessagePayload":{"properties":{"message":{"type":"string","title":"Message"},"token":{"type":"string","title":"Token"},"is_test":{"type":"boolean","title":"Is Test","default":false},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref"},"aiTrainingAllowed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Aitrainingallowed"},"thread_id":{"type":"string","title":"Thread Id"},"supported_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supported Format"},"schematic":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Schematic"},"public_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Url"},"current_web_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Web Url"}},"type":"object","required":["message","token","thread_id"],"title":"ChatMessagePayload"},"Component":{"properties":{"unipart_id":{"type":"string","title":"Unipart Id"},"part_number":{"type":"string","title":"Part Number"},"manufacturer":{"type":"string","title":"Manufacturer"},"description":{"type":"string","title":"Description","default":""},"url":{"type":"string","title":"Url"}},"type":"object","required":["unipart_id","part_number","manufacturer","url"],"title":"Component"},"ComponentPosition":{"properties":{"name":{"type":"string","title":"Name"},"x":{"type":"number","title":"X"},"y":{"type":"number","title":"Y"},"rotation":{"type":"number","title":"Rotation"},"part_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Part Number"},"manufacturer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manufacturer"}},"type":"object","required":["name","x","y","rotation"],"title":"ComponentPosition"},"Context":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"revision":{"type":"string","title":"Revision"},"format":{"type":"string","enum":["eagle","kicad","altium","png","jpeg","pdf"],"title":"Format"},"content":{"type":"string","maxLength":14000000,"title":"Content"}},"type":"object","required":["id","name","revision","format","content"],"title":"Context"},"Creator":{"properties":{"attribution":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attribution"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"avatar_initials":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Initials"},"profile_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Url"}},"type":"object","title":"Creator"},"DetectSchematicRequest":{"properties":{"message":{"type":"string","maxLength":20000,"minLength":1,"title":"Message"},"include_intent":{"type":"boolean","title":"Include Intent","default":false},"has_existing_schematic":{"type":"boolean","title":"Has Existing Schematic","default":false}},"type":"object","required":["message"],"title":"DetectSchematicRequest"},"DetectSchematicResponse":{"properties":{"is_schematic_request":{"type":"boolean","title":"Is Schematic Request"},"intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"}},"type":"object","required":["is_schematic_request"],"title":"DetectSchematicResponse"},"ExportRequest":{"properties":{"format":{"type":"string","enum":["altium","kicad","orcad"],"title":"Format"},"xml":{"type":"string","maxLength":10000000,"title":"Xml"}},"type":"object","required":["format","xml"],"title":"ExportRequest"},"GenerateRequest":{"properties":{"description":{"type":"string","title":"Description"},"thread_id":{"type":"string","title":"Thread Id","default":""},"previous_netlist":{"type":"string","title":"Previous Netlist","default":""},"bom_overrides":{"anyOf":[{"items":{"$ref":"#/components/schemas/BomOverrideItem"},"type":"array"},{"type":"null"}],"title":"Bom Overrides"}},"type":"object","required":["description"],"title":"GenerateRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Message":{"properties":{"role":{"type":"string","enum":["user","assistant"],"title":"Role"},"content":{"type":"string","maxLength":100000,"title":"Content"}},"type":"object","required":["role","content"],"title":"Message"},"Provenance":{"properties":{"creator":{"anyOf":[{"$ref":"#/components/schemas/Creator"},{"type":"null"}]},"cad_metadata":{"anyOf":[{"$ref":"#/components/schemas/CadMetadata"},{"type":"null"}]}},"type":"object","title":"Provenance"},"ReferenceCatalog":{"properties":{"results":{"items":{"$ref":"#/components/schemas/ReferenceDesign"},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"has_next":{"type":"boolean","title":"Has Next"},"query":{"type":"string","title":"Query"},"manufacturer":{"type":"string","title":"Manufacturer"},"manufacturers":{"items":{"type":"string"},"type":"array","title":"Manufacturers"}},"type":"object","required":["results","total","page","page_size","has_next","query","manufacturer","manufacturers"],"title":"ReferenceCatalog"},"ReferenceDesign":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"},"url":{"type":"string","title":"Url"},"access":{"type":"string","title":"Access"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format"},"part_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Part Id"},"id":{"type":"string","title":"Id"},"components":{"items":{"$ref":"#/components/schemas/Component"},"type":"array","title":"Components"},"preview":{"anyOf":[{"$ref":"#/components/schemas/SchematicPreview"},{"type":"null"}]}},"type":"object","required":["name","type","url","access","id","components"],"title":"ReferenceDesign"},"ReplacementRequest":{"properties":{"content":{"type":"string","maxLength":10000000,"title":"Content"},"ref":{"type":"string","maxLength":100,"minLength":1,"title":"Ref"},"part_number":{"type":"string","maxLength":300,"minLength":1,"title":"Part Number"},"manufacturer":{"type":"string","maxLength":300,"minLength":1,"title":"Manufacturer"}},"type":"object","required":["content","ref","part_number","manufacturer"],"title":"ReplacementRequest"},"Resource":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"},"url":{"type":"string","title":"Url"},"access":{"type":"string","title":"Access"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format"},"part_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Part Id"}},"type":"object","required":["name","type","url","access"],"title":"Resource"},"Resources":{"properties":{"simulation_models":{"items":{"$ref":"#/components/schemas/Resource"},"type":"array","title":"Simulation Models"},"reference_designs":{"items":{"$ref":"#/components/schemas/Resource"},"type":"array","title":"Reference Designs"}},"type":"object","required":["simulation_models","reference_designs"],"title":"Resources"},"RunRequest":{"properties":{"id":{"type":"string","maxLength":100,"title":"Id"},"message":{"type":"string","maxLength":20000,"minLength":1,"title":"Message"},"history":{"items":{"$ref":"#/components/schemas/Message"},"type":"array","maxItems":50,"title":"History"},"context":{"anyOf":[{"$ref":"#/components/schemas/Context"},{"type":"null"}]},"previousArtifact":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Previousartifact"},"search_mode":{"type":"string","enum":["legacy","website"],"title":"Search Mode","default":"legacy"},"surface":{"type":"string","enum":["desktop","web"],"title":"Surface","default":"desktop"},"is_test":{"type":"boolean","title":"Is Test","default":false},"capabilities":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Capabilities"}},"type":"object","required":["id","message"],"title":"RunRequest"},"SchematicFeedbackRequest":{"properties":{"log_id":{"type":"integer","title":"Log Id"},"correct":{"type":"boolean","title":"Correct"},"notes":{"type":"string","title":"Notes","default":""},"failure_step":{"type":"string","title":"Failure Step","default":""},"failure_type":{"type":"string","title":"Failure Type","default":""},"step_feedback":{"items":{},"type":"array","title":"Step Feedback","default":[]}},"type":"object","required":["log_id","correct"],"title":"SchematicFeedbackRequest"},"SchematicPreview":{"properties":{"image_url":{"type":"string","title":"Image Url"},"title":{"type":"string","title":"Title","default":""},"description":{"type":"string","title":"Description","default":""}},"type":"object","required":["image_url"],"title":"SchematicPreview"},"SchematicSearchRequest":{"properties":{"message":{"type":"string","title":"Message"},"tester":{"type":"string","title":"Tester","default":"anonymous"},"previous_netlist":{"type":"string","title":"Previous Netlist","default":""},"bom_overrides":{"anyOf":[{"items":{"$ref":"#/components/schemas/BomOverride"},"type":"array"},{"type":"null"}],"title":"Bom Overrides"}},"type":"object","required":["message"],"title":"SchematicSearchRequest"},"SpiceNetlistRequest":{"properties":{"netlist":{"type":"string","title":"Netlist","description":"SPICE netlist text"},"normalize_passive_layout":{"type":"boolean","title":"Normalize Passive Layout","default":false},"grid_size":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Grid Size","description":"Grid size in millimeters for component placement (default: 2.54mm)","default":2.54},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"AI model to use for component placement. OpenAI models: 'gpt-4o-mini', 'ft:gpt-4o-mini-2024-07-18:snapeda:block-designer-v2:DCnTdm8s'. Anthropic models: 'claude-opus-4-6', 'claude-sonnet-4-6'. If not provided, uses AI_MODEL_NAME env var, or defaults based on AI_MODEL_PROVIDER env var."}},"type":"object","required":["netlist"],"title":"SpiceNetlistRequest"},"SpiceNetlistResponse":{"properties":{"enhanced_netlist":{"type":"string","title":"Enhanced Netlist","description":"Enhanced netlist with positions and wires"},"components":{"items":{"$ref":"#/components/schemas/ComponentPosition"},"type":"array","title":"Components","description":"List of components with positions"},"wires":{"items":{"$ref":"#/components/schemas/WireConnection"},"type":"array","title":"Wires","description":"List of wire connections"},"component_count":{"type":"integer","title":"Component Count","description":"Number of components found"}},"type":"object","required":["enhanced_netlist","components","wires","component_count"],"title":"SpiceNetlistResponse"},"TrackingEventPayload":{"properties":{"event":{"type":"string","title":"Event"},"properties":{"additionalProperties":true,"type":"object","title":"Properties"}},"type":"object","required":["event","properties"],"title":"TrackingEventPayload"},"UploadRequest":{"properties":{"file_extension":{"type":"string","title":"File Extension","description":"File extension, e.g. png, jpg, svg"},"expires_in":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires In","description":"Optional expiration time for the presigned URL in seconds (default: 300)"}},"type":"object","required":["file_extension"],"title":"UploadRequest"},"UploadResponse":{"properties":{"upload_url":{"type":"string","title":"Upload Url"},"file_key":{"type":"string","title":"File Key"},"public_url":{"type":"string","title":"Public Url"}},"type":"object","required":["upload_url","file_key","public_url"],"title":"UploadResponse"},"UseCaseBulkRequest":{"properties":{"block_id":{"type":"string","title":"Block Id"},"use_cases":{"items":{"type":"string"},"type":"array","title":"Use Cases"},"source":{"type":"string","title":"Source","default":"manual"}},"type":"object","required":["block_id","use_cases"],"title":"UseCaseBulkRequest"},"UseCaseRequest":{"properties":{"block_id":{"type":"string","title":"Block Id"},"use_case":{"type":"string","title":"Use Case"},"source":{"type":"string","title":"Source","default":"manual"}},"type":"object","required":["block_id","use_case"],"title":"UseCaseRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WireConnection":{"properties":{"id":{"type":"string","title":"Id"},"node":{"type":"string","title":"Node"},"from_component":{"type":"string","title":"From Component"},"to_component":{"type":"string","title":"To Component"},"points":{"items":{"$ref":"#/components/schemas/WirePoint"},"type":"array","title":"Points"}},"type":"object","required":["id","node","from_component","to_component","points"],"title":"WireConnection"},"WirePoint":{"properties":{"x":{"type":"number","title":"X"},"y":{"type":"number","title":"Y"}},"type":"object","required":["x","y"],"title":"WirePoint"}}}}