{"openapi":"3.1.0","info":{"title":"Stillwind API","description":"This API provides methods for searching electronic components.","version":"0.1.0"},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PartsResponseV0":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the part."},"summary":{"type":"string","description":"A brief summary of the part."},"rank":{"type":"number","description":"The relevance of the part to the search term. Higher values indicate a better match."}},"required":["id","summary"]},"description":"The results on this page."},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"],"description":"The cursor for getting the next page of results. If null, there are no more results."},"totalCount":{"type":"number","minimum":0,"description":"The total number of results."}},"required":["nextCursor","totalCount"]},"requestId":{"type":"string","description":"The unique identifier for this request."}},"required":["results","pagination","requestId"]},"PartSearchQueryV0":{"type":"object","properties":{"q":{"type":"string","minLength":1,"description":"Search term"},"invalidate_cache":{"type":"boolean","default":false,"description":"Invalidate cached AI-generated queries"},"store_query":{"type":"boolean","default":false,"description":"Store the generated query. Results can be retrieved again using /ai/parts/search/<request_id>."},"cursor":{"type":"string","description":"Cursor for pagination.\nMust be a valid base64 string obtained from the pagination.nextCursor field of a previous response."},"limit":{"type":"number","minimum":1,"default":50,"description":"Limit for pagination"}},"required":["q"]},"StoredPartSearchParamsV0":{"type":"object","properties":{"request_id":{"type":"string","description":"ID of the previous stored search request"}},"required":["request_id"]},"StoredPartSearchQueryV0":{"type":"object","properties":{"cursor":{"type":"string","description":"Cursor for pagination.\nMust be a valid base64 string obtained from the pagination.nextCursor field of a previous response."},"limit":{"type":"number","minimum":1,"default":50,"description":"Limit for pagination"}}},"PartReplacementFormV0":{"type":"object","properties":{"datasheet":{"anyOf":[{"type":"string","format":"uri","minLength":1,"description":"Datasheet URL"},{"type":"string","description":"Datasheet file","format":"binary"}],"description":"Datasheet of the part to find a replacement for"}},"required":["datasheet"]},"PartsQueryV0":{"type":"object","properties":{"search":{"type":"string","minLength":1,"description":"Search term"},"cursor":{"type":"string","description":"Cursor for pagination.\nMust be a valid base64 string obtained from the pagination.nextCursor field of a previous response."},"limit":{"type":"number","minimum":1,"default":50,"description":"Limit for pagination"}}},"PartResponseV0":{"type":"object","properties":{"result":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the part."},"summary":{"type":"string","description":"A brief summary of the part."}},"required":["id","summary"],"description":"The result of the request."},"requestId":{"type":"string","description":"The unique identifier for this request."}},"required":["result","requestId"]},"PartParamsV0":{"type":"object","properties":{"id":{"type":"string","description":"Part ID"}},"required":["id"]},"ManufacturersResponseV0":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"description":"The results on this page."},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"],"description":"The cursor for getting the next page of results. If null, there are no more results."},"totalCount":{"type":"number","minimum":0,"description":"The total number of results."}},"required":["nextCursor","totalCount"]},"requestId":{"type":"string","description":"The unique identifier for this request."}},"required":["results","pagination","requestId"]},"ManufacturersQueryV0":{"type":"object","properties":{"search":{"type":"string","minLength":1,"description":"Search term"},"cursor":{"type":"string","description":"Cursor for pagination.\nMust be a valid base64 string obtained from the pagination.nextCursor field of a previous response."},"limit":{"type":"number","minimum":1,"default":50,"description":"Limit for pagination"}}},"ManufacturerResponseV0":{"type":"object","properties":{"result":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"description":"The result of the request."},"requestId":{"type":"string","description":"The unique identifier for this request."}},"required":["result","requestId"]},"ManufacturerParamsV0":{"type":"object","properties":{"manufacturer_id":{"type":"string","description":"Manufacturer ID"}},"required":["manufacturer_id"]}}},"security":[{"bearerAuth":[]}],"paths":{"/api/v0/ai/parts/search":{"get":{"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartsResponseV0"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false,"example":false},"error":{"type":"object","additionalProperties":{},"example":{"parameters":{"q":["Required"]}}}},"required":["success","error"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false,"example":false},"error":{"type":"object","additionalProperties":{},"example":{"message":"Internal Server Error"}}},"required":["success","error"]}}}}},"operationId":"getApiV0AiPartsSearch","tags":["AI"],"parameters":[{"in":"query","name":"#/components/schemas/PartSearchQueryV0","schema":{"$ref":"#/components/schemas/PartSearchQueryV0"}}],"description":"Semantic search for parts.\nSupports pagination query parameters.\n\nA specialized AI agent will search for parts based on the provided search term."}},"/api/v0/ai/parts/search/{request_id}":{"get":{"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartsResponseV0"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false,"example":false},"error":{"type":"object","additionalProperties":{},"example":{"parameters":{"cursor":["Invalid base64"]}}}},"required":["success","error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false,"example":false},"error":{"type":"object","additionalProperties":{},"example":{"message":"Search with request id not found"}}},"required":["success","error"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false,"example":false},"error":{"type":"object","additionalProperties":{},"example":{"message":"Internal Server Error"}}},"required":["success","error"]}}}}},"operationId":"getApiV0AiPartsSearchByRequest_id","tags":["Basic"],"parameters":[{"in":"path","name":"#/components/schemas/StoredPartSearchParamsV0","schema":{"$ref":"#/components/schemas/StoredPartSearchParamsV0"}},{"in":"query","name":"#/components/schemas/StoredPartSearchQueryV0","schema":{"$ref":"#/components/schemas/StoredPartSearchQueryV0"}},{"schema":{"type":"string"},"in":"path","name":"request_id","required":true}],"description":"Paginated list of all parts by the manufacturer identified by `id`.\nSupports `search` and pagination query parameters.\n\nIf `search` is provided, only parts that match the search term in a full-text search will be returned."}},"/api/v0/ai/parts/replacements":{"get":{"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartsResponseV0"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false,"example":false},"error":{"type":"object","additionalProperties":{},"example":{"parameters":{"q":["Required"]}}}},"required":["success","error"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false,"example":false},"error":{"type":"object","additionalProperties":{},"example":{"message":"Internal Server Error"}}},"required":["success","error"]}}}}},"operationId":"getApiV0AiPartsReplacements","tags":["AI"],"parameters":[{"in":"query","name":"#/components/schemas/PartSearchQueryV0","schema":{"$ref":"#/components/schemas/PartSearchQueryV0"}}],"description":"Semantic search for replacement parts.\nSupports pagination query parameters.\n\nA specialized AI agent will search for replacement parts based on the provided search term."},"post":{"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartsResponseV0"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false,"example":false},"error":{"type":"object","additionalProperties":{},"example":{"parameters":{"q":["Required"]}}}},"required":["success","error"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false,"example":false},"error":{"type":"object","additionalProperties":{},"example":{"message":"Internal Server Error"}}},"required":["success","error"]}}}}},"operationId":"postApiV0AiPartsReplacements","tags":["AI"],"parameters":[{"in":"query","name":"#/components/schemas/PartSearchQueryV0","schema":{"$ref":"#/components/schemas/PartSearchQueryV0"}}],"description":"Semantic search for replacement parts.\nSupports pagination query parameters.\n\nA specialized AI agent will search for replacement parts based on the provided datasheet.","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PartReplacementFormV0"}}}}}},"/api/v0/parts":{"get":{"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartsResponseV0"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false,"example":false},"error":{"type":"object","additionalProperties":{},"example":{"parameters":{"cursor":["Invalid base64"]}}}},"required":["success","error"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false,"example":false},"error":{"type":"object","additionalProperties":{},"example":{"message":"Internal Server Error"}}},"required":["success","error"]}}}}},"operationId":"getApiV0Parts","tags":["Basic"],"parameters":[{"in":"query","name":"#/components/schemas/PartsQueryV0","schema":{"$ref":"#/components/schemas/PartsQueryV0"}}],"description":"Paginated list of all parts.\nSupports `search` and pagination query parameters.\n\nIf `search` is provided, only parts that match the search term in a full-text search will be returned."}},"/api/v0/parts/{id}":{"get":{"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartResponseV0"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false,"example":false},"error":{"type":"object","additionalProperties":{},"example":{"message":"Part not found"}}},"required":["success","error"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false,"example":false},"error":{"type":"object","additionalProperties":{},"example":{"message":"Internal Server Error"}}},"required":["success","error"]}}}}},"operationId":"getApiV0PartsById","tags":["Basic"],"parameters":[{"in":"path","name":"#/components/schemas/PartParamsV0","schema":{"$ref":"#/components/schemas/PartParamsV0"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"description":"Detailed information about the part identified by `id`."}},"/api/v0/manufacturers":{"get":{"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManufacturersResponseV0"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false,"example":false},"error":{"type":"object","additionalProperties":{},"example":{"parameters":{"cursor":["Invalid base64"]}}}},"required":["success","error"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false,"example":false},"error":{"type":"object","additionalProperties":{},"example":{"message":"Internal Server Error"}}},"required":["success","error"]}}}}},"operationId":"getApiV0Manufacturers","tags":["Basic"],"parameters":[{"in":"query","name":"#/components/schemas/ManufacturersQueryV0","schema":{"$ref":"#/components/schemas/ManufacturersQueryV0"}}],"description":"Paginated list of all manufacturers.\nSupports `search` and pagination query parameters.\n\nIf `search` is provided, only manufacturers that match the search term in a full-text search will be returned."}},"/api/v0/manufacturers/{manufacturer_id}":{"get":{"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManufacturerResponseV0"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false,"example":false},"error":{"type":"object","additionalProperties":{},"example":{"message":"Manufacturer not found"}}},"required":["success","error"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false,"example":false},"error":{"type":"object","additionalProperties":{},"example":{"message":"Internal Server Error"}}},"required":["success","error"]}}}}},"operationId":"getApiV0ManufacturersByManufacturer_id","tags":["Basic"],"parameters":[{"in":"path","name":"#/components/schemas/ManufacturerParamsV0","schema":{"$ref":"#/components/schemas/ManufacturerParamsV0"}},{"schema":{"type":"string"},"in":"path","name":"manufacturer_id","required":true}],"description":"Detailed information about the manufacturer identified by `id`."}},"/api/v0/manufacturers/{manufacturer_id}/parts":{"get":{"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartsResponseV0"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false,"example":false},"error":{"type":"object","additionalProperties":{},"example":{"parameters":{"cursor":["Invalid base64"]}}}},"required":["success","error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false,"example":false},"error":{"type":"object","additionalProperties":{},"example":{"message":"Manufacturer not found"}}},"required":["success","error"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false,"example":false},"error":{"type":"object","additionalProperties":{},"example":{"message":"Internal Server Error"}}},"required":["success","error"]}}}}},"operationId":"getApiV0ManufacturersByManufacturer_idParts","tags":["Basic"],"parameters":[{"in":"path","name":"#/components/schemas/ManufacturerParamsV0","schema":{"$ref":"#/components/schemas/ManufacturerParamsV0"}},{"in":"query","name":"#/components/schemas/PartsQueryV0","schema":{"$ref":"#/components/schemas/PartsQueryV0"}},{"schema":{"type":"string"},"in":"path","name":"manufacturer_id","required":true}],"description":"Paginated list of all parts by the manufacturer identified by `id`.\nSupports `search` and pagination query parameters.\n\nIf `search` is provided, only parts that match the search term in a full-text search will be returned."}}}}