{"openapi":"3.0.3","info":{"title":"AdapterSpot Power Supply Identifier API","version":"1.0.0","description":"Read the rating label of a power adapter (or a device's type plate) from one photo and get the output voltage, current, wattage, connector and polarity, plus the power supply that fits from the AdapterSpot catalog and connector library.","contact":{"name":"AdapterSpot (Clear Solutions)","url":"https://adapterspot.com/en/api/","email":"info@adapterspot.com"},"termsOfService":"https://adapterspot.com/en/terms/"},"externalDocs":{"url":"https://adapterspot.com/en/api/"},"servers":[{"url":"https://api.adapterspot.com"}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key"}},"schemas":{"ConnectorRef":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"b21"},"name":{"type":"string","example":"5.5 × 2.1 mm barrel"}}},"PowerSupply":{"type":"object","properties":{"name":{"type":"string","example":"Synology DS211j power supply (12V DC, 60W)"},"voltage_v":{"type":"number","example":12},"current_a":{"type":"number","example":5},"power_w":{"type":"number","example":60},"connector":{"$ref":"#/components/schemas/ConnectorRef"},"polarity":{"type":"string","enum":["center_positive","see_product_page"]},"price_eur":{"type":"number","nullable":true,"example":24.95},"url":{"type":"string","format":"uri"},"fits_device_count":{"type":"integer"},"example_devices":{"type":"array","items":{"type":"string"}},"ships_to":{"type":"array","items":{"type":"string"},"example":["BE","NL"]}}},"Usage":{"type":"object","properties":{"month":{"type":"string","example":"2026-11"},"label_reads_used":{"type":"integer"},"label_reads_quota":{"type":"integer"},"label_reads_left":{"type":"integer"}}},"Match":{"type":"object","properties":{"exact":{"type":"boolean","description":"true when voltage, current, connector and polarity are all known and fit"},"power_supplies":{"type":"array","items":{"$ref":"#/components/schemas/PowerSupply"}}}},"Error":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/v1/label":{"post":{"operationId":"readLabel","summary":"Read a power adapter label from a photo","description":"Counts toward the monthly quota (free tier: 10 per month). The photo is only used to read the label and is not stored.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["image"],"properties":{"image":{"type":"string","description":"Base64-encoded JPEG, PNG or WebP, or a data URL. Max ~3.7 MB; 1600 px on the long side is plenty."},"media_type":{"type":"string","enum":["image/jpeg","image/png","image/webp"],"description":"Optional; detected from the data when omitted."},"lang":{"type":"string","enum":["en","nl","fr"],"default":"en","description":"Language of the note and the product links."}}}}}},"responses":{"200":{"description":"Label read (check readable)","content":{"application/json":{"schema":{"type":"object","properties":{"readable":{"type":"boolean"},"confidence":{"type":"string","enum":["high","medium","low"]},"note":{"type":"string"},"label_type":{"type":"string","enum":["power_adapter","device","unknown"]},"brand":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"output":{"type":"object","properties":{"voltage_v":{"type":"number","nullable":true},"current_a":{"type":"number","nullable":true},"power_w":{"type":"number","nullable":true},"computed_field":{"type":"string","nullable":true,"description":"Which of voltage_v/current_a/power_w was calculated from the other two"},"polarity":{"type":"string","enum":["center_positive","center_negative","unknown"]}}},"connector":{"type":"object","properties":{"id":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"printed":{"type":"string","nullable":true},"seen_in_photo":{"type":"string","enum":["barrel","din_4pin","usb_c","other","not_visible"]}}},"match":{"$ref":"#/components/schemas/Match"},"usage":{"$ref":"#/components/schemas/Usage"}}}}}},"400":{"description":"Bad request or image","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The model could not read the photo","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Monthly quota used up","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily busy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/power-supply":{"get":{"operationId":"findPowerSupply","summary":"Find the power supply that fits given ratings","description":"Free (does not count toward the quota). Give at least two of voltage, current and power.","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"voltage","in":"query","schema":{"type":"number"},"example":12},{"name":"current","in":"query","schema":{"type":"number"},"example":5},{"name":"power","in":"query","schema":{"type":"number"}},{"name":"connector","in":"query","schema":{"type":"string"},"description":"Connector id from /v1/connectors or text such as '5.5x2.1'"},{"name":"polarity","in":"query","schema":{"type":"string","enum":["center_positive","center_negative"]}},{"name":"lang","in":"query","schema":{"type":"string","enum":["en","nl","fr"],"default":"en"}}],"responses":{"200":{"description":"Matching power supplies","content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object"},"match":{"$ref":"#/components/schemas/Match"}}}}}},"400":{"description":"Not enough ratings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/connectors":{"get":{"operationId":"listConnectors","summary":"List the connector library","responses":{"200":{"description":"Connector types","content":{"application/json":{"schema":{"type":"object","properties":{"connectors":{"type":"array","items":{"type":"object"}}}}}}}}}},"/v1/usage":{"get":{"operationId":"getUsage","summary":"Quota usage for this key this month","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Usage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}}}}}},"/v1/keys":{"post":{"operationId":"requestKey","summary":"Request a free API key by e-mail","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"}}}}}},"responses":{"200":{"description":"Key sent by e-mail"},"400":{"description":"Invalid e-mail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}