> For the complete documentation index, see [llms.txt](https://developer.gerosense.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.gerosense.ai/gerosense-api-reference/triggering-biological-age-acceleration-computations.md).

# Triggering biological age acceleration computations

Since biological age acceleration computations are resource-intensive, we don't start them automatically on each new sample batch received. There are two options on how to trigger them:

1. Biological age accelerations will be calculated automatically 5 minutes after receiving the last batch with a user's data.
2. You can manually trigger these computations when the last batch is sent by calling `/bioage/calculate`.

<mark style="color:green;">`POST`</mark> `https://api-b2b.gerosense.ai/api/v2.2/bioage/calculate`

#### Headers

| Name                                            | Type   | Description      |
| ----------------------------------------------- | ------ | ---------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer \<token>  |
| Content-Type<mark style="color:red;">\*</mark>  | String | application/json |

#### Request Body

| Name                                       | Type   | Description                                                                                |
| ------------------------------------------ | ------ | ------------------------------------------------------------------------------------------ |
| user\_id<mark style="color:red;">\*</mark> | String | User's unique identifier                                                                   |
| model\_type                                | String | <p>Model to trigger.<br>Either <code>steps</code> or <code>bpm</code> (for heart rate)</p> |

{% tabs %}
{% tab title="200: OK The request has been accepted" %}

{% endtab %}
{% endtabs %}

{% code title="REQUEST (EXAMPLE)" %}

```bash
curl -X 'POST' 'https://api-b2b.gerosense.ai/api/v2.2/bioage/calculate' \
     -H 'accept: application/json' \
     -H 'Authorization: Bearer <token>' \
     -H 'Content-Type: application/json' \
     -d '{
       "user_id": "85b4453a-46de-484c-bbc2-12666ebc7ed9",
       "model_type": "steps"
     }'
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://developer.gerosense.ai/gerosense-api-reference/triggering-biological-age-acceleration-computations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
