# BMI Calculator

## /calculate-bmi

This endpoint calculates the Body Mass Index (BMI) of an individual based on the provided weight, height, age, and unit system. It returns the calculated BMI along with the BMI category, which is determined based on age. If any of the parameters are missing or invalid, it returns a 400 error with a corresponding message.

### Query Parameters

| Parameter | Type   | Description                                                                    |
| --------- | ------ | ------------------------------------------------------------------------------ |
| weight    | number | Weight of the individual in kilograms or pounds (based on `unit`).             |
| height    | number | Height of the individual in centimeters or inches (based on `unit`).           |
| age       | number | Age of the individual in years.                                                |
| unit      | string | The unit system used for weight and height. Options: "metric" (default), "us". |

### Response

```json
{
    "age": "number",
    "bmi": "string",
    "bmiCategory": "string"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ziomark.xyz/get-endpoints/bmi-calculator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
