DPPM / Sigma / Failure Rate API Documentation

This REST API converts between Failure Rate (%), DPPM (Defective Parts Per Million), Sigma (1-sided), and defect ratio inputs. Provide any one input value and the API returns all corresponding calculated metrics.

Endpoint

POST https://www.promptbox.cn/api/dppm.php

Request

Send a JSON body with at least one of the following fields:

Parameter Type Required Description
failure_rate number No Failure rate as a percentage (0 ≤ value < 100). Example: 0.01 for 0.01%.
dppm number No DPPM (Defective Parts Per Million). Example: 100.
sigma number No Sigma value (1-sided, manufacturing convention). Example: 3.72.
defects number No Observed number of defective units.
total number No Total number of units tested. Must be > 0. Used together with defects.
Note: You must provide at least one input. Priority order of usage: defects + totalfailure_ratedppmsigma.

Example Request

{
  "failure_rate": 0.01
}

Response

The API responds with a JSON object containing normalized results:

Field Type Description
failure_rate_percent number Failure rate as a percentage.
dppm number DPPM (defects per million).
sigma_one_sided number Equivalent 1-sided sigma value.
method string Indicates which input method was used (e.g., defects_ratio, failure_rate_input, dppm_input, sigma_input).

Example Response

{
  "failure_rate_percent": 0.01,
  "dppm": 100,
  "sigma_one_sided": 3.72,
  "method": "failure_rate_input"
}

Error Handling

If input values are invalid, the API responds with an error:

{
  "error": "Invalid DPPM value."
}

Usage Notes

Disclaimer: This API is for quality and reliability analysis. Values are approximate and assume a normal distribution model.