{"openapi":"3.1.0","info":{"title":"PeptideTech reconstitution calculator API","version":"1.0.0","description":"The arithmetic behind peptidetech.is/calculator: concentration, mL and syringe units per draw, the nearest printed syringe mark, water to add, blends, IU and cost per draw. Exact decimal arithmetic. Every amount is supplied by the caller; the API recommends none. Not medical advice."},"servers":[{"url":"https://peptidetech.is"}],"paths":{"/api/calc":{"get":{"summary":"Calculate a draw, a water volume, a blend or a pen dose","operationId":"calculate","parameters":[{"name":"mode","in":"query","schema":{"type":"string","enum":["single","reverse","blend","pen"],"default":"single"},"description":"single: draw from a vial; reverse: water to add for a reading; blend: several compounds in one vial; pen: clicks on a cartridge."},{"name":"vial","in":"query","required":false,"description":"Amount in the vial with its unit: \"10mg\", \"500mcg\", \"10iu\". Comma or point decimals; a bare number is mg.","schema":{"type":"string","example":"10mg"}},{"name":"water","in":"query","required":false,"description":"Bacteriostatic water added, mL.","schema":{"type":"string","example":"2"}},{"name":"target","in":"query","required":false,"description":"Amount per draw with its unit; a bare number is mg.","schema":{"type":"string","example":"250mcg"}},{"name":"units","in":"query","required":false,"description":"Reverse mode: syringe reading wanted per draw.","schema":{"type":"string","example":"10"}},{"name":"parts","in":"query","required":false,"description":"Blend mode: name:amount pairs separated by \";\".","schema":{"type":"string","example":"BPC-157:10mg;TB-500:10mg"}},{"name":"anchor","in":"query","schema":{"type":"integer","default":0},"description":"Blend mode: index of the component whose amount sets the draw."},{"name":"syringe","in":"query","schema":{"type":"string","enum":["u100-0.3","u100-0.5","u100-1","u40-0.5","u40-1","ml-1","ml-3"],"default":"u100-1"}},{"name":"mark","in":"query","required":false,"description":"Printed gradation of the syringe, in its own reading (0.5, 1 or 2 units; 0.01 or 0.1 mL).","schema":{"type":"string","example":"1"}},{"name":"price","in":"query","required":false,"description":"Vial price, for cost per draw and per mg.","schema":{"type":"string","example":"45.00"}},{"name":"iu","in":"query","required":false,"description":"IU per mg, when the vial and the draw use different units (somatropin: 3).","schema":{"type":"string","example":"3"}},{"name":"vialml","in":"query","required":false,"description":"Vial fill capacity, mL; flags water that will not fit.","schema":{"type":"string","example":"3"}},{"name":"coa","in":"query","required":false,"description":"Measured content from the lot certificate, which replaces the label amount.","schema":{"type":"string","example":"10.35mg"}},{"name":"purity","in":"query","required":false,"description":"HPLC purity %, used when no measured content is given.","schema":{"type":"string","example":"99.1"}},{"name":"compound","in":"query","required":false,"description":"Catalogue slug, for its IU factor (e.g. hcg, bpc-157).","schema":{"type":"string","example":"bpc-157"}},{"name":"vendor","in":"query","required":false,"description":"With compound and size: the supplier package the calculation is for (vendor id, e.g. amino). Recorded in the share link; the amounts still come from the other fields.","schema":{"type":"string","example":"amino"}},{"name":"size","in":"query","required":false,"description":"With vendor: the package size as the catalogue writes it.","schema":{"type":"string","example":"10mg"}},{"name":"format","in":"query","schema":{"type":"string","enum":["json","text"],"default":"json"}}],"responses":{"200":{"description":"Result. `answer` is a plain-text summary; `result` holds exact values as decimal strings; `warnings` carry a code, a message and a fix.","content":{"application/json":{"schema":{"type":"object"}},"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Missing or invalid input; `errors` names each field."}}},"post":{"summary":"Same as GET with a JSON body of the same fields (parts may be an array of {name, amount, unit}).","operationId":"calculatePost","requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"As GET."}}}},"/api/calc/search":{"get":{"summary":"Search compounds and supplier packages (names, aliases, supplier codes, typos; \"reta 10mg\", \"bpc amino club\")","operationId":"search","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","example":"reta 10mg"},"description":"Without q: the whole index (compounds, vendors with grade score and logo, one row per US powder-vial package with price, stock and certificate status)."}],"responses":{"200":{"description":"`compounds` and `packages`, ranked; packages of equal relevance are in stock first, then by price per mg. Certificates never reorder them."}}}},"/api/calc/compound":{"get":{"summary":"A compound's vial sizes, current US offers, certificate readings and cited doses","operationId":"compound","parameters":[{"name":"slug","in":"query","required":true,"schema":{"type":"string","example":"tirzepatide"}}],"responses":{"200":{"description":"Compound details."},"404":{"description":"Unknown, or not sold as a powder vial."}}}}},"externalDocs":{"url":"https://peptidetech.is/calculator","description":"The calculator"}}