{"openapi":"3.0.3","info":{"title":"Injection Process API","version":"1","description":"Two paid calls. Read GET /v1/schema for the field catalog, defect codes, and error codes. That call is free. Units default to mm, mm/s, and MPa. Send Authorization: Bearer <api key>."},"servers":[{"url":"https://aicraft4injection.com"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer"}}},"security":[{"apiKey":[]}],"paths":{"/v1/first-shot":{"post":{"operationId":"firstShot","summary":"Recommend a first-shot process. Costs 1 call.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"required":["polymer","mold","machine"],"properties":{"polymer":{"type":"object","required":["polymer_abbreviation"],"properties":{"polymer_abbreviation":{"type":"string","description":"Material short name, for example PC or ABS."},"melt_density":{"type":"number","description":"Melt density, g/cm3."},"recommend_back_pressure":{"type":"number","description":"Recommended back pressure, MPa."},"drying_temp_c":{"type":"number","description":"Drying temperature, Celsius."}}},"mold":{"type":"object","required":["product_ave_thickness"],"properties":{"product_ave_thickness":{"type":"number","description":"Average wall thickness, mm. Greater than 0 and less than 50."},"gate_thickness":{"type":"number","description":"Gate thickness, mm."},"product_max_length":{"type":"number","description":"Longest flow length, mm."}}},"machine":{"type":"object","required":["injector"],"properties":{"machine_clamp_force_ton":{"type":"number","description":"Clamp force, tons."},"injector":{"type":"object","required":["injector_screw_diameter_mm"],"properties":{"injector_screw_diameter_mm":{"type":"number","description":"Screw diameter, mm."},"injector_max_injection_stroke_mm":{"type":"number","description":"Maximum injection stroke, mm."},"machine_barrel_temperature_stage":{"type":"integer","description":"Number of barrel temperature zones."}}}}},"init_strategy":{"type":"string","enum":["profile","midpoint","auto","legacy"],"default":"profile"}}},"example":{"polymer":{"polymer_abbreviation":"PC","melt_density":1.05},"mold":{"product_ave_thickness":2.0,"gate_thickness":1.2,"product_max_length":180},"machine":{"machine_clamp_force_ton":180,"injector":{"injector_screw_diameter_mm":36,"injector_max_injection_stroke_mm":160}}}}}},"responses":{"200":{"description":"Process parameters, a short summary, and the remaining monthly quota."},"400":{"description":"MISSING_FIELD, INVALID_FIELD, or UNKNOWN_DEFECT. No quota is charged."}}}},"/v1/optimize":{"post":{"operationId":"optimize","summary":"Adjust the current process for a defect. Costs 1 call.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"required":["defect_info","current_params"],"properties":{"defect_info":{"type":"array","minItems":1,"items":{"type":"object","required":["desc","level"],"properties":{"desc":{"type":"string","enum":["SHORTSHOT","FLASH","SHRINKAGE","BURN","WELDLINE","OVERSIZE","UNDERSIZE","JETTING","AIRTRAP","GASVEINS","MATERIALFLOWER","ABERRATION","TOPWHITE","HARDDEMOLDING","WARPING","GATEMARK","SHADING","DELAYEDFLOW","HEAVYWEIGHT","LIGHTWEIGHT","GATEHEIGHT","SOFTWATEROUTLET","FIBERFLOATATION","WIREDRAWING","SCREWZERO"]},"level":{"type":"string","enum":["none","mild","moderate","severe","critical"],"description":"Defect severity. Use one of the enum values, or a number from 0 to 1."}}}},"current_params":{"type":"object","minProperties":1,"description":"Current process. Include the keys you have. The useful ones are NT, IP0, IV0, PP0, PT0, CT, VPTL, and MEL. Further stage keys such as IP1 or BT1 may be sent with the same names.","additionalProperties":{"type":"number"},"properties":{"NT":{"type":"number"},"IP0":{"type":"number"},"IV0":{"type":"number"},"PP0":{"type":"number"},"PT0":{"type":"number"},"CT":{"type":"number"},"VPTL":{"type":"number"},"MEL":{"type":"number"}}},"opt_strategy":{"type":"string","enum":["fuzzy","tsk","tsk_legacy","auto","auto_gray","bayesian","hybrid","shadow_auto"],"default":"fuzzy"},"mold":{"type":"object","properties":{"product_ave_thickness":{"type":"number","description":"Average wall thickness, mm."}}}}},"example":{"defect_info":[{"desc":"FLASH","level":"moderate"}],"current_params":{"IP0":90,"IV0":40,"PP0":50,"CT":12}}}}},"responses":{"200":{"description":"Adjusted process, a short summary, and the remaining monthly quota."},"400":{"description":"MISSING_FIELD, INVALID_FIELD, or UNKNOWN_DEFECT. No quota is charged."}}}}}}