{"openapi":"3.1.0","info":{"title":"Injection Process API","description":"Paid first-shot and defect-tuning API for injection molding. Subscribe to obtain a key, then call /v1/first-shot or /v1/optimize. Send material, part and machine numbers on every call. Pressure defaults to MPa, velocity to mm/s, position to mm.","version":"1.0.0"},"paths":{"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/checkout":{"post":{"summary":"Checkout","operationId":"checkout_v1_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/access":{"get":{"summary":"Access","description":"Polled by /success until the webhook has provisioned the key.\n\nHardening before production: verify the `signature` query parameter that\nCreem appends to success_url, instead of relying on email + local storage.","operationId":"access_v1_access_get","parameters":[{"name":"checkout_id","in":"query","required":true,"schema":{"type":"string","title":"Checkout Id"}},{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/creem":{"post":{"summary":"Creem Webhook","operationId":"creem_webhook_webhooks_creem_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/first-shot":{"post":{"summary":"First Shot","description":"First-shot process recommendation (1 credit).\n\nGive material / mold / machine contexts; the engine returns the full flat\nprocess plus explainability (method, init_trace, recommend_thinking).\nUnknown fields are forwarded verbatim -- no engine capability is blocked.","operationId":"first_shot_v1_first_shot_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FirstShotRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EngineInvokeResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/optimize":{"post":{"summary":"Optimize","description":"Defect-driven process tuning (1 credit).\n\nProvide current_params and defect_info; optional trial_points enable\nbayesian/hybrid strategies. Full rule traces are returned when trace=true.","operationId":"optimize_v1_optimize_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptimizeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EngineInvokeResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/master-data/machines":{"post":{"summary":"Upsert Machine","description":"Upsert a machine (free, does not consume a call credit). Disabled by default.\n\nRecords are stored under this API key, so two customers can reuse the same serial.","operationId":"upsert_machine_v1_master_data_machines_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertMachineRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EngineInvokeResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/master-data/molds":{"post":{"summary":"Upsert Mold","description":"Upsert a mould snapshot (free). Disabled by default. Isolated per API key.","operationId":"upsert_mold_v1_master_data_molds_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertMoldRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EngineInvokeResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/master-data/polymers":{"post":{"summary":"Upsert Polymer","description":"Upsert a material snapshot (free). Disabled by default. Isolated per API key.","operationId":"upsert_polymer_v1_master_data_polymers_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertPolymerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EngineInvokeResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Landing","operationId":"landing__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/success":{"get":{"summary":"Success","operationId":"success_success_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/legal/terms":{"get":{"summary":"Terms","operationId":"terms_legal_terms_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/legal/privacy":{"get":{"summary":"Privacy","operationId":"privacy_legal_privacy_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"CheckoutIn":{"properties":{"email":{"type":"string","title":"Email","description":"Buyer email. Used to deliver the API key."},"plan":{"type":"string","title":"Plan","description":"Plan identifier stored in key metadata.","default":"starter"}},"type":"object","required":["email"],"title":"CheckoutIn"},"DefectItem":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Defect name in Chinese, e.g. 短射."},"desc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Desc","description":"Stable defect code, e.g. SHORTSHOT, or B000 code."},"level":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"null"}],"title":"Level","description":"Severity: 轻微/中等/严重 or 0-1 number."},"position":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position","description":"Defect location on the part."},"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count","description":"Occurrence count; >0 means present."},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback","description":"Effect of last correction: good/bad/没变化."},"feedback_ui":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback Ui","description":"Business UI signal: 好/不好/没变化."}},"additionalProperties":true,"type":"object","title":"DefectItem"},"EngineInvokeResult":{"properties":{"status":{"type":"integer","title":"Status","description":"Engine status: 0 success, 1 failure.","default":0},"msg":{"type":"string","title":"Msg","description":"Engine message.","default":""},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method","description":"Strategy that produced the result."},"confidence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confidence","description":"low, medium, or high when the engine provides it."},"summary":{"type":"string","title":"Summary","description":"Short text an agent can read to the user.","default":""},"parameters":{"items":{"$ref":"#/components/schemas/ParameterReading"},"type":"array","title":"Parameters","description":"Named process values with units."},"thinking":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Thinking","description":"recommend_thinking when the engine returned one."},"data":{"additionalProperties":true,"type":"object","title":"Data","description":"Full engine payload, including traces."}},"additionalProperties":true,"type":"object","title":"EngineInvokeResult","description":"Narratable result plus the full engine payload.\n\n``parameters`` names every returned process key. ``data`` is the engine\npayload unchanged, including traces when trace is on."},"FeedbackMeta":{"properties":{"feedback_confidence":{"anyOf":[{"type":"string","enum":["low","medium","high"]},{"type":"null"}],"title":"Feedback Confidence","description":"Confidence of field feedback; low forces fuzzy fallback."},"quality_feedback":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Quality Feedback","description":"Observed quality signals keyed by phase."},"process_signals":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Process Signals","description":"Process signals from the trial."},"operator_decision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Decision","description":"Operator decision, e.g. accepted."},"phase":{"anyOf":[{"type":"string","enum":["T1","T2","T3","OQ","PQ"]},{"type":"null"}],"title":"Phase","description":"Trial phase."}},"additionalProperties":true,"type":"object","title":"FeedbackMeta"},"FirstShotRequest":{"properties":{"polymer":{"anyOf":[{"$ref":"#/components/schemas/PolymerContext"},{"type":"null"}],"description":"Material context (recommended)."},"mold":{"anyOf":[{"$ref":"#/components/schemas/MoldContext"},{"type":"null"}],"description":"Mould / product geometry (recommended)."},"machine":{"anyOf":[{"$ref":"#/components/schemas/MachineContext"},{"type":"null"}],"description":"Machine and injector context (recommended)."},"current_params":{"anyOf":[{"$ref":"#/components/schemas/FlatParams"},{"type":"null"}],"description":"Optional baseline process parameters."},"init_strategy":{"anyOf":[{"type":"string","enum":["midpoint","profile","auto","legacy"]},{"type":"null"}],"title":"Init Strategy","description":"First-shot strategy; default auto/profile."},"phase":{"anyOf":[{"type":"string","enum":["T1","T2","T3","OQ","PQ"]},{"type":"null"}],"title":"Phase","description":"Trial phase, default T1."},"trace":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Trace","description":"Return init_trace and explainability fields."},"persist":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Persist","description":"Persist to process history. In agent mode this is forced off unless enabled."},"process_index_id":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Process Index Id","description":"Process record id for history linkage."},"process_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Process No","description":"Business process number."},"mold_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mold No","description":"Mould number (shorthand of mold.mold_no)."},"polymer_trademark":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Polymer Trademark","description":"Material grade (shorthand)."},"machine_serial_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Machine Serial No","description":"Machine SN (shorthand)."},"actual_mould_temp":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Actual Mould Temp","description":"Measured mold temperature, Celsius. Cooling uses this when present."},"dose_efficiency":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Dose Efficiency","description":"Measured shot efficiency, 0.5-1.0. Absent keeps a geometric shot."}},"additionalProperties":true,"type":"object","title":"FirstShotRequest"},"FlatParams":{"properties":{"injection_stage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Injection Stage","description":"Number of injection stages (default engine 6)."},"holding_stage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Holding Stage","description":"Number of holding stages (default engine 3)."},"metering_stage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Metering Stage","description":"Number of metering stages (default engine 2)."},"barrel_temperature_stage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Barrel Temperature Stage","description":"Number of barrel temperature stages (default engine 5)."},"NT":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Nt","description":"Nozzle temperature."},"BT1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bt1","description":"Barrel temperature zone 1."},"BT2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bt2","description":"Barrel temperature zone 2."},"BT3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bt3","description":"Barrel temperature zone 3."},"BT4":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bt4","description":"Barrel temperature zone 4."},"IT":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"It","description":"Injection time, s."},"ID":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Id","description":"Injection delay, s."},"CT":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ct","description":"Cooling time, s."},"MD":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Md","description":"Metering delay, s."},"MEL":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mel","description":"Metering end position."},"VPTL":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vptl","description":"V/P transfer position."},"VPTT":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vptt","description":"V/P transfer time, s."},"VPTP":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vptp","description":"V/P transfer pressure."},"VPTV":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vptv","description":"V/P transfer velocity."},"VPTM":{"anyOf":[{},{"type":"null"}],"title":"Vptm","description":"V/P transfer mode."},"mold_temp":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mold Temp","description":"Mold temperature."},"mold_temp_front":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mold Temp Front","description":"Front mold temperature."},"mold_temp_back":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mold Temp Back","description":"Back mold temperature."},"hot_runner_temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hot Runner Temperature","description":"Hot runner temperature."},"VP_switch_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vp Switch Mode","description":"V/P switch mode."},"decompressure_mode_before_metering":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decompressure Mode Before Metering","description":"Decompression mode before metering."},"decompressure_mode_after_metering":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decompressure Mode After Metering","description":"Decompression mode after metering."},"IP0":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ip0","description":"Injection pressure stage 0, in the machine pressure unit."},"IP1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ip1","description":"Injection pressure stage 1, in the machine pressure unit."},"IP2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ip2","description":"Injection pressure stage 2, in the machine pressure unit."},"IP3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ip3","description":"Injection pressure stage 3, in the machine pressure unit."},"IP4":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ip4","description":"Injection pressure stage 4, in the machine pressure unit."},"IP5":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ip5","description":"Injection pressure stage 5, in the machine pressure unit."},"IV0":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Iv0","description":"Injection velocity stage 0, in the machine velocity unit."},"IV1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Iv1","description":"Injection velocity stage 1, in the machine velocity unit."},"IV2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Iv2","description":"Injection velocity stage 2, in the machine velocity unit."},"IV3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Iv3","description":"Injection velocity stage 3, in the machine velocity unit."},"IV4":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Iv4","description":"Injection velocity stage 4, in the machine velocity unit."},"IV5":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Iv5","description":"Injection velocity stage 5, in the machine velocity unit."},"IL0":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Il0","description":"Injection stroke end stage 0, in the machine position unit."},"IL1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Il1","description":"Injection stroke end stage 1, in the machine position unit."},"IL2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Il2","description":"Injection stroke end stage 2, in the machine position unit."},"IL3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Il3","description":"Injection stroke end stage 3, in the machine position unit."},"IL4":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Il4","description":"Injection stroke end stage 4, in the machine position unit."},"IL5":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Il5","description":"Injection stroke end stage 5, in the machine position unit."},"PP0":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pp0","description":"Holding pressure stage 0, in the machine pressure unit."},"PP1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pp1","description":"Holding pressure stage 1, in the machine pressure unit."},"PP2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pp2","description":"Holding pressure stage 2, in the machine pressure unit."},"PP3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pp3","description":"Holding pressure stage 3, in the machine pressure unit."},"PP4":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pp4","description":"Holding pressure stage 4, in the machine pressure unit."},"PV0":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pv0","description":"Holding velocity stage 0, in the machine velocity unit."},"PV1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pv1","description":"Holding velocity stage 1, in the machine velocity unit."},"PV2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pv2","description":"Holding velocity stage 2, in the machine velocity unit."},"PV3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pv3","description":"Holding velocity stage 3, in the machine velocity unit."},"PV4":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pv4","description":"Holding velocity stage 4, in the machine velocity unit."},"PT0":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pt0","description":"Holding time stage 0, seconds."},"PT1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pt1","description":"Holding time stage 1, seconds."},"PT2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pt2","description":"Holding time stage 2, seconds."},"PT3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pt3","description":"Holding time stage 3, seconds."},"PT4":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pt4","description":"Holding time stage 4, seconds."},"MP0":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mp0","description":"Metering pressure stage 0, in the machine pressure unit."},"MP1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mp1","description":"Metering pressure stage 1, in the machine pressure unit."},"MP2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mp2","description":"Metering pressure stage 2, in the machine pressure unit."},"MP3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mp3","description":"Metering pressure stage 3, in the machine pressure unit."},"MSR0":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Msr0","description":"Screw rotation speed stage 0."},"MSR1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Msr1","description":"Screw rotation speed stage 1."},"MSR2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Msr2","description":"Screw rotation speed stage 2."},"MSR3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Msr3","description":"Screw rotation speed stage 3."},"MBP0":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mbp0","description":"Back pressure stage 0, in the machine pressure unit."},"MBP1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mbp1","description":"Back pressure stage 1, in the machine pressure unit."},"MBP2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mbp2","description":"Back pressure stage 2, in the machine pressure unit."},"MBP3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mbp3","description":"Back pressure stage 3, in the machine pressure unit."},"ML0":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ml0","description":"Metering position stage 0, in the machine position unit."},"ML1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ml1","description":"Metering position stage 1, in the machine position unit."},"ML2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ml2","description":"Metering position stage 2, in the machine position unit."},"ML3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ml3","description":"Metering position stage 3, in the machine position unit."},"DPBM":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Dpbm","description":"Decompression pressure before metering."},"DVBM":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Dvbm","description":"Decompression velocity before metering."},"DDBM":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ddbm","description":"Decompression distance before metering."},"DTBM":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Dtbm","description":"Decompression time before metering, seconds."},"DPAM":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Dpam","description":"Decompression pressure after metering."},"DVAM":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Dvam","description":"Decompression velocity after metering."},"DDAM":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ddam","description":"Decompression distance after metering."},"DTAM":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Dtam","description":"Decompression time after metering, seconds."}},"additionalProperties":true,"type":"object","title":"FlatParams"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InjectorContext":{"properties":{"injector_screw_diameter_mm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Injector Screw Diameter Mm","description":"Screw diameter, mm."},"injector_max_shot_volume_cm3":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Injector Max Shot Volume Cm3","description":"Max shot volume, cm3."},"injector_max_injection_stroke_mm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Injector Max Injection Stroke Mm","description":"Max injection stroke, mm."},"injector_max_injection_velocity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Injector Max Injection Velocity","description":"Max injection velocity."},"injector_max_injection_pressure":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Injector Max Injection Pressure","description":"Max injection pressure."},"injector_max_injection_pressure_bar":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Injector Max Injection Pressure Bar","description":"Max injection pressure, bar."},"injector_max_set_injection_pressure":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Injector Max Set Injection Pressure","description":"Max set injection pressure."},"injector_max_screw_rotation_speed":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Injector Max Screw Rotation Speed","description":"Max screw rotation speed, rpm."},"injector_max_decompression_pressure":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Injector Max Decompression Pressure","description":"Max decompression pressure."},"injector_max_set_decompression_pressure":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Injector Max Set Decompression Pressure","description":"Max set decompression pressure."},"injector_max_set_metering_pressure":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Injector Max Set Metering Pressure","description":"Max set metering pressure."},"injector_max_holding_pressure":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Injector Max Holding Pressure","description":"Max holding pressure."},"injector_max_holding_velocity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Injector Max Holding Velocity","description":"Max holding velocity."},"machine_barrel_temperature_stage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Machine Barrel Temperature Stage","description":"Available barrel temperature stages."},"machine_max_injection_stage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Machine Max Injection Stage","description":"Max injection stages."},"machine_max_holding_stage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Machine Max Holding Stage","description":"Max holding stages."},"machine_max_metering_stage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Machine Max Metering Stage","description":"Max metering stages."},"use_small_size":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Small Size","description":"Small injector mode."},"cylinder_numer":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cylinder Numer","description":"Cylinder count (engine spelling)."},"cylinder_diameter":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cylinder Diameter","description":"Cylinder diameter."},"piston_rod_diameter":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Piston Rod Diameter","description":"Piston rod diameter."},"intensification_ratio":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Intensification Ratio","description":"Hydraulic intensification ratio."}},"additionalProperties":true,"type":"object","title":"InjectorContext"},"MachineContext":{"properties":{"machine_serial_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Machine Serial No","description":"Machine serial number; used for SPC unit lookup."},"machine_trademark":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Machine Trademark","description":"Machine brand."},"machine_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Machine Type","description":"Machine model / type."},"machine_clamp_force_ton":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Machine Clamp Force Ton","description":"Clamp force, tons."},"power_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Power Method","description":"Drive type: electric / hydraulic."},"pressure_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pressure Unit","description":"Pressure unit used by the caller (MPa or bar)."},"velocity_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Velocity Unit","description":"Velocity unit used by the caller."},"position_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position Unit","description":"Position unit used by the caller."},"screw_rotation_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screw Rotation Unit","description":"Screw rotation unit used by the caller."},"injector":{"anyOf":[{"$ref":"#/components/schemas/InjectorContext"},{"type":"null"}],"description":"Injection unit specifications."}},"additionalProperties":true,"type":"object","title":"MachineContext"},"MoldContext":{"properties":{"mold_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mold No","description":"Mould number; engine uses it to enrich wall thickness."},"product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Name","description":"Product / part name."},"product_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product No","description":"Product number."},"cavity_num":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cavity Num","description":"Number of cavities."},"product_ave_thickness":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Product Ave Thickness","description":"Average wall thickness, mm."},"product_max_thickness":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Product Max Thickness","description":"Max wall thickness, mm."},"product_min_thickness":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Product Min Thickness","description":"Min wall thickness, mm."},"product_total_weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Product Total Weight","description":"Product total weight, g."},"single_cavity_part_weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Single Cavity Part Weight G","description":"Single cavity part weight, g."},"runner_weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Runner Weight","description":"Runner weight, g."},"runner_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Runner Type","description":"Runner type: hot / cold."},"gate_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gate Type","description":"Gate type."},"gate_shape":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gate Shape","description":"Gate shape."},"gate_area":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gate Area","description":"Gate area."},"gate_radius":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gate Radius","description":"Gate radius."},"gate_width":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gate Width","description":"Gate width."},"gate_length":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gate Length","description":"Gate length."},"gate_thickness":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gate Thickness","description":"Gate thickness."},"gate_depth":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gate Depth","description":"Gate depth."},"gate_num":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gate Num","description":"Number of gates."},"hot_runner_num":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hot Runner Num","description":"Number of hot runners."},"valve_num":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Valve Num","description":"Number of valve pins."},"flow_length":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Flow Length","description":"Melt flow length, mm."},"product_max_length":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Product Max Length","description":"Max flow length when flow_length is absent, mm."},"runner_length":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Runner Length","description":"Runner length, mm."},"projected_area_cm2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Projected Area Cm2","description":"Projected area, cm2."},"inject_cycle_require":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Inject Cycle Require","description":"Required cycle time, s."},"appearance_requirement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appearance Requirement","description":"Appearance requirement, when the part is cosmetic."}},"additionalProperties":true,"type":"object","title":"MoldContext"},"OptimizeRequest":{"properties":{"current_params":{"anyOf":[{"$ref":"#/components/schemas/FlatParams"},{"type":"null"}],"description":"Current process flat parameters (required in practice)."},"defect_info":{"anyOf":[{"items":{"$ref":"#/components/schemas/DefectItem"},"type":"array"},{"type":"null"}],"title":"Defect Info","description":"Defects observed in the last trial."},"trial_points":{"anyOf":[{"items":{"$ref":"#/components/schemas/TrialPoint"},"type":"array"},{"type":"null"}],"title":"Trial Points","description":"Historical trials for bayesian/hybrid strategies."},"feedback_meta":{"anyOf":[{"$ref":"#/components/schemas/FeedbackMeta"},{"type":"null"}],"description":"Feedback confidence and quality signals."},"opt_strategy":{"anyOf":[{"type":"string","enum":["fuzzy","tsk","tsk_legacy","auto","auto_gray","bayesian","hybrid","shadow_auto"]},{"type":"null"}],"title":"Opt Strategy","description":"Tuning strategy. Default fuzzy. bayesian and hybrid need at least 3 trial_points in this request; otherwise the engine falls back to fuzzy."},"phase":{"anyOf":[{"type":"string","enum":["T1","T2","T3","OQ","PQ"]},{"type":"null"}],"title":"Phase","description":"Trial phase."},"trace":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Trace","description":"Return rule_trace / clamp_trace / thinking fields."},"persist":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Persist","description":"Persist to process history; agent mode forces off by default."},"process_index_id":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Process Index Id","description":"Process record id for history linkage."},"mold_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mold No","description":"Mould number; engine uses it to enrich geometry."},"polymer_trademark":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Polymer Trademark","description":"Material grade."},"machine_serial_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Machine Serial No","description":"Machine SN."},"actual_injection_peak_pressure":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Actual Injection Peak Pressure","description":"Measured peak injection pressure."},"actual_fast_injection_speed":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Actual Fast Injection Speed","description":"Measured fast injection speed."},"actual_product_weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Actual Product Weight","description":"Measured part weight, g."},"target_shot_weight_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Target Shot Weight G","description":"Target shot weight, g."},"min_buffer_position":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Buffer Position","description":"Measured cushion / minimum buffer position."},"cushion_mm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cushion Mm","description":"Cushion alias of min_buffer_position, mm."},"actual_vp_position":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Actual Vp Position","description":"Measured V/P switch position."},"actual_mould_temp":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Actual Mould Temp","description":"Measured mold temperature, Celsius."},"dose_efficiency":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Dose Efficiency","description":"Measured shot efficiency, 0.5-1.0."}},"additionalProperties":true,"type":"object","title":"OptimizeRequest"},"ParameterReading":{"properties":{"key":{"type":"string","title":"Key","description":"Engine process key, for example IP0 or CT."},"name":{"type":"string","title":"Name","description":"What the key means."},"value":{"title":"Value","description":"Recommended or returned value."},"unit":{"type":"string","title":"Unit","description":"Unit for this value. Pressure, velocity and position follow the request.","default":""},"group":{"type":"string","title":"Group","description":"injection, holding, metering, temperature, time, position, or other.","default":""}},"additionalProperties":true,"type":"object","required":["key","name"],"title":"ParameterReading"},"PolymerContext":{"properties":{"polymer_abbreviation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Polymer Abbreviation","description":"Material abbreviation, e.g. PC, ABS."},"polymer_trademark":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Polymer Trademark","description":"Material trademark / grade."},"polymer_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Polymer Type","description":"Polymer family / type."},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"Material category alias of polymer_type."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Material display name."},"recommend_melt_temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Recommend Melt Temperature","description":"Recommended melt temperature, Celsius."},"max_melt_temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Melt Temperature","description":"Max allowed melt temperature, Celsius."},"min_melt_temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Melt Temperature","description":"Min allowed melt temperature, Celsius."},"recommend_mold_temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Recommend Mold Temperature","description":"Recommended mold temperature, Celsius."},"recommend_back_pressure":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Recommend Back Pressure","description":"Recommended back pressure."},"melt_density":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Melt Density","description":"Melt density, g/cm3."},"solid_density":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Solid Density","description":"Solid density, g/cm3."},"shrinkage_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Shrinkage Percent","description":"Typical shrinkage, percent."},"average_horizontal_shrinkage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Horizontal Shrinkage","description":"Horizontal shrinkage alias."},"max_sheer_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Sheer Rate","description":"Max shear rate."},"max_sheer_stress":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Sheer Stress","description":"Max shear stress."},"recommend_shear_linear_speed":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Recommend Shear Linear Speed","description":"Recommended shear linear speed."},"drying_temp_c":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Drying Temp C","description":"Drying temperature, Celsius."},"drying_time_h":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Drying Time H","description":"Drying time, hours."},"thermal_sensitivity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thermal Sensitivity","description":"Thermal sensitivity class."},"crystallinity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crystallinity","description":"Crystallinity class."},"max_mold_temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Mold Temperature","description":"Max mold temperature, Celsius."},"min_mold_temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Mold Temperature","description":"Min mold temperature, Celsius."},"ejection_temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ejection Temperature","description":"Ejection temperature, Celsius. Overrides the material-family default."},"thermal_diffusivity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Thermal Diffusivity","description":"Thermal diffusivity, mm2/s. Overrides the material-family default."},"average_vertical_shrinkage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Vertical Shrinkage","description":"Vertical shrinkage, percent."},"recommend_injection_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Recommend Injection Rate","description":"Recommended injection rate."},"degradation_temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Degradation Temperature","description":"Degradation temperature, Celsius."},"barrel_residence_time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Barrel Residence Time","description":"Maximum barrel residence time."},"filler":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filler","description":"Filler name, if any."},"filler_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filler Type","description":"Filler type."},"filler_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Filler Percentage","description":"Filler percentage."}},"additionalProperties":true,"type":"object","title":"PolymerContext"},"TrialPoint":{"properties":{"flat":{"additionalProperties":true,"type":"object","title":"Flat","description":"Process flat for this trial, typically IV1/IV2/IP1/PP1/CT."},"score":{"type":"number","title":"Score","description":"Trial score; higher is better (0-1).","default":0.5}},"additionalProperties":true,"type":"object","title":"TrialPoint"},"UpsertMachineRequest":{"properties":{"serial_no":{"type":"string","title":"Serial No","description":"Machine serial number (unique key)."},"trademark":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trademark","description":"Brand."},"machine_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Machine Type","description":"Model / type."},"clamp_force_ton":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Clamp Force Ton","description":"Clamp force, tons."},"power_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Power Method","description":"Drive type."},"injectors_info":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Injectors Info","description":"Injection unit list; first element is primary."}},"additionalProperties":true,"type":"object","required":["serial_no"],"title":"UpsertMachineRequest"},"UpsertMoldRequest":{"properties":{"mold_no":{"type":"string","title":"Mold No","description":"Mould number (unique key)."},"product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Name","description":"Product name."},"product_infos":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Product Infos","description":"Product geometry list; first element is primary."}},"additionalProperties":true,"type":"object","required":["mold_no"],"title":"UpsertMoldRequest"},"UpsertPolymerRequest":{"properties":{"trademark":{"type":"string","title":"Trademark","description":"Material trademark / grade (unique key)."},"abbreviation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Abbreviation","description":"Short code, e.g. PC."},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"Material family."}},"additionalProperties":true,"type":"object","required":["trademark"],"title":"UpsertPolymerRequest"},"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"}}}}