---
title: "Sleep Calculator"
method: POST
path: "/api/v1/tools/sleep-calculator"
tags: ["tools"]
---

# Sleep Calculator

`POST /api/v1/tools/sleep-calculator`

## Request

- Base URL: `https://toolforte.com`
- URL: `https://toolforte.com/api/v1/tools/sleep-calculator`
- Auth: HTTP bearer

Bedtimes or wake-up times that complete whole sleep cycles. From one clock time it counts six, five, four and three blocks of 90 minutes, plus the 15 minutes an average adult needs to fall asleep, so the alarm lands between cycles instead of in deep sleep. This is an indication, not medical advice.

## Request body

- object
  - `time` string
  - `mode` string

## Response `200`

Successful result

- object
  - `ok` boolean
  - `data` object
    - `mode` string
    - `time` string
    - `cycleMinutes` integer
    - `fallAsleepMinutes` integer
    - `options` object[]
      - `cycles` integer
      - `time` string
      - `hours` integer
      - `quality` string
      - `tone` string
    - `note` string

## Other responses

- `400`: Missing or invalid request fields
- `401`: Invalid or missing API key
- `429`: Monthly plan limit reached

---

[API](https://skmtc.dev/toolforte/apis/toolforte-api.md) · [All operations](https://skmtc.dev/toolforte/apis/toolforte-api/llms.txt) · [OpenAPI document](https://skmtc.dev/toolforte/apis/toolforte-api/revisions/4d814d484dfc?raw)
