# Focus & Sleep Planner – Sleep Cycle Calculator

> Focus & Sleep Planner – Sleep Cycle Calculator is a paid API for AI agents from focus-sleep-calc.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-29).

Returns a list of optimal bedtimes or wake times based on 90-minute sleep cycles and a configurable fall-asleep allowance, given either a known wake-up time or a known bedtime.

## Facts

- Endpoint: GET https://focus-sleep-calc.x402tookit.com/sleep-cycles?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/focus-sleep-planner-sleep-cycle-calculator-22b6073e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_VGwsX8izgFFMlCfFzG1mN

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability focus-sleep-planner-sleep-cycle-calculator-22b6073e
```

Example prompt: I need to wake up at 6:30 AM tomorrow — can you give me a list of bedtimes I should aim for tonight based on 90-minute sleep cycles, assuming it takes me about 15 minutes to fall asleep?

## When to prefer this

Use this endpoint when you need to calculate multiple optimal bedtimes or wake times for a given anchor time using sleep cycle logic. Prefer it over generic calendar or alarm tools when the user specifically wants cycle-based sleep planning with configurable parameters like cycle duration and fall-asleep allowance. It is planning-only and does not set alarms or interact with device clocks.

## Known failure modes

- Missing required 'know' parameter (wake or bed) returns an error
- Invalid time format not matching 12-hour or 24-hour patterns may cause a parse error
- minCycles greater than maxCycles produces no valid options
- cycleMinutes out of range (below 60 or above 120) rejected
- fallAsleepMinutes out of range (above 120) rejected

## How this service works

Bedtimes for a wake-up time, or wake times for a bedtime, using 90 minute cycles plus a fall-asleep allowance. Planning only.

## Output

An ordered list of sleep options, each with the target bedtime or wake time, number of sleep cycles, total hours in bed, and hours of actual sleep. Also includes a summary, a verdict on the best option, a disclaimer about planning-only use, and metadata like cycle length and fall-asleep allowance used.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "know",
      "time"
     ],
     "properties": {
      "know": {
       "type": "string",
       "description": "wake = you know the wake-up time and want bedtimes; bed = you know your bedtime and want wake times"
      },
      "time": {
       "type": "string",
       "description": "The known time, 12-hour like 7:00 AM or 24-hour like 07:00"
      },
      "maxCycles": {
       "type": "number",
       "description": "Most cycles to list, 1 to 10 (default 6)"
      },
      "minCycles": {
       "type": "number",
       "description": "Fewest cycles to list, 1 to 8 (default 3)"
      },
      "cycleMinutes": {
       "type": "number",
       "description": "Length of one sleep cycle in minutes, 60 to 120 (default 90)"
      },
      "fallAsleepMinutes": {
       "type": "number",
       "description": "Minutes allowed to fall asleep, 0 to 120 (default 15)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "know": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "options": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "object",
        "properties": {
         "cycles": {
          "type": [
           "null",
           "number"
          ]
         },
         "bedtime": {
          "type": [
           "null",
           "string"
          ]
         },
         "hoursInBed": {
          "type": [
           "null",
           "number"
          ]
         },
         "hoursOfSleep": {
          "type": [
           "null",
           "number"
          ]
         },
         "bedtimeDayOffset": {
          "type": [
           "null",
           "number"
          ]
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/focus-sleep-planner-sleep-cycle-calculator-22b6073e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from focus-sleep-calc.x402tookit.com](https://www.zero.xyz/host/focus-sleep-calc.x402tookit.com/llms.txt)
