{"openapi":"3.1.0","info":{"title":"Focus & Sleep Planner","version":"1.0.0","description":"Sleep-cycle bedtimes, caffeine decay, Pomodoro and nap schedules, sleep tally, jet-lag shifts and time blocks. One call, one computed answer, no accounts or API keys. Machine-payable over x402.","x-guidance":"Focus & Sleep Planner: Sleep-cycle bedtimes, caffeine decay, Pomodoro and nap schedules, sleep tally, jet-lag shifts and time blocks. Use /sleep-cycles for bedtimes or wake times in 90 minute cycles, /caffeine-decay for remaining caffeine and the time it falls below a threshold, /pomodoro-plan for a work and break schedule, /nap-planner for nap wake times, /sleep-debt for a tally of nightly hours against a need, /jet-lag-shift for a day by day schedule shift and /time-blocks to split a window into blocks with breaks. Each paid GET returns a computed verdict with the reasons, the source and what was NOT checked. A verdict of UNVERIFIED means a lookup failed: treat it as unknown. No account or key: pay per call in USDC over x402."},"servers":[{"url":"https://focus-sleep-calc.x402tookit.com"}],"paths":{"/caffeine-decay":{"get":{"operationId":"caffeine_decay","summary":"Caffeine remaining after hours, and the time until it drops below a threshold, from a half-life you can set (default 5 hours).","description":"Caffeine remaining after hours, and the time until it drops below a threshold, from a half-life you can set (default 5 hours).","tags":["caffeine","half-life","decay","coffee"],"parameters":[{"name":"doseMg","in":"query","required":true,"description":"Caffeine taken, in milligrams (1 to 2000)","schema":{"type":"number"}},{"name":"halfLifeHours","in":"query","required":false,"description":"Half-life in hours, 0.5 to 24 (default 5; varies a lot between people)","schema":{"type":"number"}},{"name":"hoursElapsed","in":"query","required":false,"description":"Hours since the dose, for the remaining amount (default 0)","schema":{"type":"number"}},{"name":"thresholdMg","in":"query","required":false,"description":"Level to fall below, in mg (default 25)","schema":{"type":"number"}},{"name":"doseTime","in":"query","required":false,"description":"Clock time of the dose, like 2:00 PM; adds clock times to the answer","schema":{"type":"string"}},{"name":"bedtime","in":"query","required":false,"description":"Bedtime clock time; with doseTime gives the amount left at bedtime","schema":{"type":"string"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":["null","string"]},"summary":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"doseMg":{"type":["null","number"]},"halfLifeHours":{"type":["null","number"]},"hoursElapsed":{"type":["null","number"]},"remainingMg":{"type":["null","number"]},"percentRemaining":{"type":["null","number"]},"thresholdMg":{"type":["null","number"]},"hoursUntilBelowThreshold":{"type":["null","number"]},"halfLifeTable":{"type":["array","null"],"items":{"type":"object","properties":{"halfLives":{"type":["null","number"]},"hours":{"type":["null","number"]},"remainingMg":{"type":["null","number"]}}}},"doseTimeClock":{"type":["null","string"]},"belowThresholdAt":{"type":["null","string"]},"belowThresholdDayOffset":{"type":["null","number"]},"bedtimeClock":{"type":["null","string"]},"hoursFromDoseToBedtime":{"type":["null","number"]},"remainingAtBedtimeMg":{"type":["null","number"]},"degraded":{"type":["boolean","null"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"source":{"type":["null","string"]},"asOf":{"type":["null","string"]},"disclaimer":{"type":["null","string"]}}},"example":{"verdict":"COMPUTED","summary":"50 mg of 200 mg remains after 10 h (half-life 5 h); 15 h until below 25 mg. Below 25 mg at 5:00 AM (+1 day). At bedtime 10:00 PM (8 h later) about 66 mg remains.","reasons":["Each half-life halves the amount; remaining = dose x 0.5^(hours / half-life).","A bedtime earlier on the clock than the dose time is read as the next day."],"doseMg":200,"halfLifeHours":5,"hoursElapsed":10,"remainingMg":50,"percentRemaining":25,"thresholdMg":25,"hoursUntilBelowThreshold":15,"halfLifeTable":[{"halfLives":0,"hours":0,"remainingMg":200},{"halfLives":1,"hours":5,"remainingMg":100}],"doseTimeClock":"2:00 PM","belowThresholdAt":"5:00 AM","belowThresholdDayOffset":1,"bedtimeClock":"10:00 PM","hoursFromDoseToBedtime":8,"remainingAtBedtimeMg":65.98,"degraded":false,"notChecked":["your own caffeine half-life (genetics, pregnancy, medicines, smoking and liver health change it)","the real caffeine content of any drink","…2 more"],"source":"computed locally (first-order decay: dose x 0.5^(hours / half-life))","asOf":"2026-10-12T01:41:12.828Z","disclaimer":"Screening signal computed from the named public source. Not financial, legal or investment advice; provided as is. Verify at the source before acting."}}}},"400":{"description":"A parameter was missing or out of range."},"402":{"description":"Payment Required"},"502":{"description":"The upstream source failed or timed out."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.0200"},"protocols":[{"x402":{"network":"eip155:8453","scheme":"exact","currency":"USDC","endpoint":"https://focus-sleep-calc.x402tookit.com/caffeine-decay"}},{"x402":{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","scheme":"exact","currency":"USDC","endpoint":"https://focus-sleep-calc.x402tookit.com/caffeine-decay"}},{"x402":{"network":"eip155:137","scheme":"exact","currency":"USDC","endpoint":"https://focus-sleep-calc.x402tookit.com/caffeine-decay"}},{"x402":{"network":"eip155:42161","scheme":"exact","currency":"USDC","endpoint":"https://focus-sleep-calc.x402tookit.com/caffeine-decay"}}]}}},"/jet-lag-shift":{"get":{"operationId":"jet_lag_shift","summary":"Day-by-day bedtime and wake-time shift toward a new time zone, with dates and 12-hour clock times. Planning only.","description":"Day-by-day bedtime and wake-time shift toward a new time zone, with dates and 12-hour clock times. Planning only.","tags":["jet-lag","travel","time-zone","sleep-schedule"],"parameters":[{"name":"direction","in":"query","required":true,"description":"east (clocks ahead of home) or west (clocks behind home)","schema":{"type":"string"}},{"name":"hoursDifference","in":"query","required":true,"description":"Time zone difference in hours, 0.5 to 12","schema":{"type":"number"}},{"name":"startDate","in":"query","required":true,"description":"First day of shifting, YYYY-MM-DD","schema":{"type":"string"}},{"name":"bedtime","in":"query","required":true,"description":"Your usual bedtime, like 11:00 PM","schema":{"type":"string"}},{"name":"wakeTime","in":"query","required":true,"description":"Your usual wake time, like 7:00 AM","schema":{"type":"string"}},{"name":"shiftPerDayHours","in":"query","required":false,"description":"Hours to move per day, 0.25 to 3 (default 1)","schema":{"type":"number"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":["null","string"]},"summary":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"direction":{"type":["null","string"]},"hoursDifference":{"type":["null","number"]},"shiftPerDayHours":{"type":["null","number"]},"daysToShift":{"type":["null","number"]},"fullyShiftedOn":{"type":["null","string"]},"usualBedtime":{"type":["null","string"]},"usualWakeTime":{"type":["null","string"]},"schedule":{"type":["array","null"],"items":{"type":"object","properties":{"day":{"type":["null","number"]},"date":{"type":["null","string"]},"weekday":{"type":["null","string"]},"shiftedHours":{"type":["null","number"]},"bedtime":{"type":["null","string"]},"wakeTime":{"type":["null","string"]}}}},"degraded":{"type":["boolean","null"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"source":{"type":["null","string"]},"asOf":{"type":["null","string"]},"disclaimer":{"type":["null","string"]}}},"example":{"verdict":"COMPUTED","summary":"Going east 6 h at 1 h a day: 6 day(s), fully shifted on 2026-11-06: bed 5:00 PM, up 1:00 AM.","reasons":["Eastward trips need earlier bedtimes and wake times each day.","Day 1 is the start date and already includes the first step."],"direction":"east","hoursDifference":6,"shiftPerDayHours":1,"daysToShift":6,"fullyShiftedOn":"2026-11-06","usualBedtime":"11:00 PM","usualWakeTime":"7:00 AM","schedule":[{"day":1,"date":"2026-11-01","weekday":"Sunday","shiftedHours":1,"bedtime":"10:00 PM","wakeTime":"6:00 AM"},{"day":2,"date":"2026-11-02","weekday":"Monday","shiftedHours":2,"bedtime":"9:00 PM","wakeTime":"5:00 AM"}],"degraded":false,"notChecked":["light exposure, melatonin or any medicine (not medical advice)","flight times, layovers and the destination date line","…1 more"],"source":"computed locally (shift per day is an input; about 1 hour a day is a common rule of thumb)","asOf":"2026-10-12T01:41:13.091Z","disclaimer":"Screening signal computed from the named public source. Not financial, legal or investment advice; provided as is. Verify at the source before acting."}}}},"400":{"description":"A parameter was missing or out of range."},"402":{"description":"Payment Required"},"502":{"description":"The upstream source failed or timed out."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.0200"},"protocols":[{"x402":{"network":"eip155:8453","scheme":"exact","currency":"USDC","endpoint":"https://focus-sleep-calc.x402tookit.com/jet-lag-shift"}},{"x402":{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","scheme":"exact","currency":"USDC","endpoint":"https://focus-sleep-calc.x402tookit.com/jet-lag-shift"}},{"x402":{"network":"eip155:137","scheme":"exact","currency":"USDC","endpoint":"https://focus-sleep-calc.x402tookit.com/jet-lag-shift"}},{"x402":{"network":"eip155:42161","scheme":"exact","currency":"USDC","endpoint":"https://focus-sleep-calc.x402tookit.com/jet-lag-shift"}}]}}},"/nap-planner":{"get":{"operationId":"nap_planner","summary":"Nap lengths (10, 20, 30, 60, 90 minutes or your own) with the wake-up clock time for each, and a bedtime gap check.","description":"Nap lengths (10, 20, 30, 60, 90 minutes or your own) with the wake-up clock time for each, and a bedtime gap check.","tags":["nap","sleep","wake-time","schedule"],"parameters":[{"name":"startTime","in":"query","required":true,"description":"When you lie down, like 1:30 PM or 13:30","schema":{"type":"string"}},{"name":"fallAsleepMinutes","in":"query","required":false,"description":"Minutes to fall asleep, 0 to 60 (default 10)","schema":{"type":"number"}},{"name":"customMinutes","in":"query","required":false,"description":"One extra nap length in minutes to include (5 to 240)","schema":{"type":"number"}},{"name":"bedtime","in":"query","required":false,"description":"Tonight's bedtime; adds the gap between waking and bed","schema":{"type":"string"}},{"name":"minGapHours","in":"query","required":false,"description":"Smallest comfortable gap before bedtime in hours (default 6)","schema":{"type":"number"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":["null","string"]},"summary":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"startClock":{"type":["null","string"]},"fallAsleepMinutes":{"type":["null","number"]},"bedtimeClock":{"type":["null","string"]},"minGapHours":{"type":["null","number"]},"options":{"type":["array","null"],"items":{"type":"object","properties":{"napMinutes":{"type":["null","number"]},"note":{"type":["null","string"]},"wakeTime":{"type":["null","string"]},"wakeDayOffset":{"type":["null","number"]},"hoursBeforeBedtime":{"type":["null","number"]},"tooCloseToBedtime":{"type":["boolean","null"]}}}},"degraded":{"type":["boolean","null"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"source":{"type":["null","string"]},"asOf":{"type":["null","string"]},"disclaimer":{"type":["null","string"]}}},"example":{"verdict":"COMPUTED","summary":"Lying down at 1:30 PM: wake times run from 1:50 PM (10 min) to 3:10 PM (90 min). 0 option(s) leave under 6 h before bedtime.","reasons":["Wake time = lie-down time + 10 minutes to fall asleep + nap length.","Labels are common rules of thumb, not medical findings."],"startClock":"1:30 PM","fallAsleepMinutes":10,"bedtimeClock":"10:30 PM","minGapHours":6,"options":[{"napMinutes":10,"note":"short nap","wakeTime":"1:50 PM","wakeDayOffset":0,"hoursBeforeBedtime":8.67,"tooCloseToBedtime":false},{"napMinutes":20,"note":"short nap","wakeTime":"2:00 PM","wakeDayOffset":0,"hoursBeforeBedtime":8.5,"tooCloseToBedtime":false}],"degraded":false,"notChecked":["your real fall-asleep time and sleep need","whether napping is right for you (insomnia, shift work and health conditions are outside this tool; not medical advice)","…1 more"],"source":"computed locally (nap length labels are rule-of-thumb notes, not medical findings)","asOf":"2026-10-12T01:41:13.354Z","disclaimer":"Screening signal computed from the named public source. Not financial, legal or investment advice; provided as is. Verify at the source before acting."}}}},"400":{"description":"A parameter was missing or out of range."},"402":{"description":"Payment Required"},"502":{"description":"The upstream source failed or timed out."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.0200"},"protocols":[{"x402":{"network":"eip155:8453","scheme":"exact","currency":"USDC","endpoint":"https://focus-sleep-calc.x402tookit.com/nap-planner"}},{"x402":{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","scheme":"exact","currency":"USDC","endpoint":"https://focus-sleep-calc.x402tookit.com/nap-planner"}},{"x402":{"network":"eip155:137","scheme":"exact","currency":"USDC","endpoint":"https://focus-sleep-calc.x402tookit.com/nap-planner"}},{"x402":{"network":"eip155:42161","scheme":"exact","currency":"USDC","endpoint":"https://focus-sleep-calc.x402tookit.com/nap-planner"}}]}}},"/pomodoro-plan":{"get":{"operationId":"pomodoro_plan","summary":"Pomodoro schedule for a task total in minutes: work blocks, short breaks, a long break every N blocks, with 12-hour clock times.","description":"Pomodoro schedule for a task total in minutes: work blocks, short breaks, a long break every N blocks, with 12-hour clock times.","tags":["pomodoro","focus","schedule","productivity"],"parameters":[{"name":"totalMinutes","in":"query","required":true,"description":"Total focused work needed, in minutes (1 to 2400)","schema":{"type":"number"}},{"name":"startTime","in":"query","required":true,"description":"When you start, like 9:00 AM or 09:00","schema":{"type":"string"}},{"name":"workMinutes","in":"query","required":false,"description":"Length of one work block (default 25)","schema":{"type":"number"}},{"name":"shortBreakMinutes","in":"query","required":false,"description":"Short break length (default 5)","schema":{"type":"number"}},{"name":"longBreakMinutes","in":"query","required":false,"description":"Long break length (default 15)","schema":{"type":"number"}},{"name":"longBreakAfter","in":"query","required":false,"description":"Take the long break after every Nth work block, 2 to 12 (default 4)","schema":{"type":"number"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":["null","string"]},"summary":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"startClock":{"type":["null","string"]},"workBlocks":{"type":["null","number"]},"shortBreaks":{"type":["null","number"]},"longBreaks":{"type":["null","number"]},"workMinutesTotal":{"type":["null","number"]},"breakMinutesTotal":{"type":["null","number"]},"elapsedMinutes":{"type":["null","number"]},"finishClock":{"type":["null","string"]},"finishDayOffset":{"type":["null","number"]},"schedule":{"type":["array","null"],"items":{"type":"object","properties":{"step":{"type":["null","number"]},"type":{"type":["null","string"]},"block":{"type":["null","number"]},"minutes":{"type":["null","number"]},"start":{"type":["null","string"]},"end":{"type":["null","string"]},"startDayOffset":{"type":["null","number"]},"endDayOffset":{"type":["null","number"]}}}},"degraded":{"type":["boolean","null"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"source":{"type":["null","string"]},"asOf":{"type":["null","string"]},"disclaimer":{"type":["null","string"]}}},"example":{"verdict":"COMPUTED","summary":"5 work block(s) for 120 min; finish 11:30 AM after 150 min on the clock (30 min of breaks).","reasons":["The last work block is shortened to fit the total, and no break is added after it.","totalMinutes counts work only; breaks come on top."],"startClock":"9:00 AM","workBlocks":5,"shortBreaks":3,"longBreaks":1,"workMinutesTotal":120,"breakMinutesTotal":30,"elapsedMinutes":150,"finishClock":"11:30 AM","finishDayOffset":0,"schedule":[{"step":1,"type":"work","block":1,"minutes":25,"start":"9:00 AM","end":"9:25 AM","startDayOffset":0,"endDayOffset":0},{"step":2,"type":"short-break","minutes":5,"start":"9:25 AM","end":"9:30 AM","startDayOffset":0,"endDayOffset":0}],"degraded":false,"notChecked":["meetings, meals or interruptions (breaks are the only gaps)","whether this rhythm suits you: the 25/5 pattern is a popular technique, not a proven optimum","…1 more"],"source":"computed locally (work and break lengths are inputs; 25/5/15 after 4 is the common default)","asOf":"2026-10-12T01:41:13.617Z","disclaimer":"Screening signal computed from the named public source. Not financial, legal or investment advice; provided as is. Verify at the source before acting."}}}},"400":{"description":"A parameter was missing or out of range."},"402":{"description":"Payment Required"},"502":{"description":"The upstream source failed or timed out."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.0200"},"protocols":[{"x402":{"network":"eip155:8453","scheme":"exact","currency":"USDC","endpoint":"https://focus-sleep-calc.x402tookit.com/pomodoro-plan"}},{"x402":{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","scheme":"exact","currency":"USDC","endpoint":"https://focus-sleep-calc.x402tookit.com/pomodoro-plan"}},{"x402":{"network":"eip155:137","scheme":"exact","currency":"USDC","endpoint":"https://focus-sleep-calc.x402tookit.com/pomodoro-plan"}},{"x402":{"network":"eip155:42161","scheme":"exact","currency":"USDC","endpoint":"https://focus-sleep-calc.x402tookit.com/pomodoro-plan"}}]}}},"/sleep-cycles":{"get":{"operationId":"sleep_cycles","summary":"Bedtimes for a wake-up time, or wake times for a bedtime, using 90 minute cycles plus a fall-asleep allowance. Planning only.","description":"Bedtimes for a wake-up time, or wake times for a bedtime, using 90 minute cycles plus a fall-asleep allowance. Planning only.","tags":["sleep","bedtime","wake-time","sleep-cycles"],"parameters":[{"name":"know","in":"query","required":true,"description":"wake = you know the wake-up time and want bedtimes; bed = you know your bedtime and want wake times","schema":{"type":"string"}},{"name":"time","in":"query","required":true,"description":"The known time, 12-hour like 7:00 AM or 24-hour like 07:00","schema":{"type":"string"}},{"name":"cycleMinutes","in":"query","required":false,"description":"Length of one sleep cycle in minutes, 60 to 120 (default 90)","schema":{"type":"number"}},{"name":"fallAsleepMinutes","in":"query","required":false,"description":"Minutes allowed to fall asleep, 0 to 120 (default 15)","schema":{"type":"number"}},{"name":"minCycles","in":"query","required":false,"description":"Fewest cycles to list, 1 to 8 (default 3)","schema":{"type":"number"}},{"name":"maxCycles","in":"query","required":false,"description":"Most cycles to list, 1 to 10 (default 6)","schema":{"type":"number"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":["null","string"]},"summary":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"know":{"type":["null","string"]},"anchorTime":{"type":["null","string"]},"cycleMinutes":{"type":["null","number"]},"fallAsleepMinutes":{"type":["null","number"]},"options":{"type":["array","null"],"items":{"type":"object","properties":{"cycles":{"type":["null","number"]},"hoursOfSleep":{"type":["null","number"]},"hoursInBed":{"type":["null","number"]},"bedtime":{"type":["null","string"]},"bedtimeDayOffset":{"type":["null","number"]}}}},"degraded":{"type":["boolean","null"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"source":{"type":["null","string"]},"asOf":{"type":["null","string"]},"disclaimer":{"type":["null","string"]}}},"example":{"verdict":"COMPUTED","summary":"To wake at 7:00 AM, go to bed at 9:45 PM (6 cycles); 4 options listed.","reasons":["Each option is cycles x 90 minutes of sleep plus 15 minutes to fall asleep.","A dayOffset of -1 means the previous calendar day, +1 the next day."],"know":"wake","anchorTime":"7:00 AM","cycleMinutes":90,"fallAsleepMinutes":15,"options":[{"cycles":6,"hoursOfSleep":9,"hoursInBed":9.25,"bedtime":"9:45 PM","bedtimeDayOffset":-1},{"cycles":5,"hoursOfSleep":7.5,"hoursInBed":7.75,"bedtime":"11:15 PM","bedtimeDayOffset":-1}],"degraded":false,"notChecked":["your real sleep need, which varies by person and age","how long you actually take to fall asleep or how long your cycles last","…1 more"],"source":"computed locally (cycle length and fall-asleep allowance are rule-of-thumb inputs)","asOf":"2026-10-12T01:41:13.882Z","disclaimer":"Screening signal computed from the named public source. Not financial, legal or investment advice; provided as is. Verify at the source before acting."}}}},"400":{"description":"A parameter was missing or out of range."},"402":{"description":"Payment Required"},"502":{"description":"The upstream source failed or timed out."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.0200"},"protocols":[{"x402":{"network":"eip155:8453","scheme":"exact","currency":"USDC","endpoint":"https://focus-sleep-calc.x402tookit.com/sleep-cycles"}},{"x402":{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","scheme":"exact","currency":"USDC","endpoint":"https://focus-sleep-calc.x402tookit.com/sleep-cycles"}},{"x402":{"network":"eip155:137","scheme":"exact","currency":"USDC","endpoint":"https://focus-sleep-calc.x402tookit.com/sleep-cycles"}},{"x402":{"network":"eip155:42161","scheme":"exact","currency":"USDC","endpoint":"https://focus-sleep-calc.x402tookit.com/sleep-cycles"}}]}}},"/sleep-debt":{"get":{"operationId":"sleep_debt","summary":"Tally nightly sleep hours against a nightly need: net shortfall, short nights, average, and extra hours a night to even out.","description":"Tally nightly sleep hours against a nightly need: net shortfall, short nights, average, and extra hours a night to even out.","tags":["sleep-debt","sleep","tally","hours"],"parameters":[{"name":"nights","in":"query","required":true,"description":"Comma-separated hours slept each night, like 7,6.5,5,8 (1 to 60 nights, 0 to 24 each)","schema":{"type":"string"}},{"name":"needHours","in":"query","required":false,"description":"Hours you aim to sleep per night, 1 to 16 (default 8)","schema":{"type":"number"}},{"name":"recoverNights","in":"query","required":false,"description":"Nights over which to spread the catch-up, 1 to 60 (default 7)","schema":{"type":"number"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":["null","string"]},"summary":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"nightsCounted":{"type":["null","number"]},"needHours":{"type":["null","number"]},"hoursSlept":{"type":["null","number"]},"hoursWanted":{"type":["null","number"]},"netShortfallHours":{"type":["null","number"]},"shortfallOnlyHours":{"type":["null","number"]},"surplusOnlyHours":{"type":["null","number"]},"shortNights":{"type":["null","number"]},"averageHours":{"type":["null","number"]},"shortestNightHours":{"type":["null","number"]},"longestNightHours":{"type":["null","number"]},"recoverNights":{"type":["null","number"]},"extraHoursPerNightToEvenOut":{"type":["null","number"]},"degraded":{"type":["boolean","null"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"source":{"type":["null","string"]},"asOf":{"type":["null","string"]},"disclaimer":{"type":["null","string"]}}},"example":{"verdict":"SHORT","summary":"5 night(s): slept 32 h of 40 h wanted; net short by 8 h; average 6.4 h a night.","reasons":["Net balance = nights x need - hours slept; shortfall counts only the nights below the need.","The catch-up figure spreads the net shortfall evenly over 7 night(s)."],"nightsCounted":5,"needHours":8,"hoursSlept":32,"hoursWanted":40,"netShortfallHours":8,"shortfallOnlyHours":9,"surplusOnlyHours":1,"shortNights":3,"averageHours":6.4,"shortestNightHours":4,"longestNightHours":9,"recoverNights":7,"extraHoursPerNightToEvenOut":1.14,"degraded":false,"notChecked":["whether sleep debt can be fully repaid (the science is mixed; this is arithmetic only)","your real sleep need","…1 more"],"source":"computed locally (simple sum of need minus hours slept)","asOf":"2026-10-12T01:41:14.145Z","disclaimer":"Screening signal computed from the named public source. Not financial, legal or investment advice; provided as is. Verify at the source before acting."}}}},"400":{"description":"A parameter was missing or out of range."},"402":{"description":"Payment Required"},"502":{"description":"The upstream source failed or timed out."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.0200"},"protocols":[{"x402":{"network":"eip155:8453","scheme":"exact","currency":"USDC","endpoint":"https://focus-sleep-calc.x402tookit.com/sleep-debt"}},{"x402":{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","scheme":"exact","currency":"USDC","endpoint":"https://focus-sleep-calc.x402tookit.com/sleep-debt"}},{"x402":{"network":"eip155:137","scheme":"exact","currency":"USDC","endpoint":"https://focus-sleep-calc.x402tookit.com/sleep-debt"}},{"x402":{"network":"eip155:42161","scheme":"exact","currency":"USDC","endpoint":"https://focus-sleep-calc.x402tookit.com/sleep-debt"}}]}}},"/time-blocks":{"get":{"operationId":"time_blocks","summary":"Split a time window into equal blocks with breaks between them, with 12-hour clock times and the minutes left over.","description":"Split a time window into equal blocks with breaks between them, with 12-hour clock times and the minutes left over.","tags":["time-blocking","schedule","planner","focus"],"parameters":[{"name":"windowStart","in":"query","required":true,"description":"Window start, like 9:00 AM","schema":{"type":"string"}},{"name":"windowEnd","in":"query","required":true,"description":"Window end, like 12:00 PM (an end at or before the start means the next day)","schema":{"type":"string"}},{"name":"blockMinutes","in":"query","required":true,"description":"Length of each block, 5 to 480","schema":{"type":"number"}},{"name":"breakMinutes","in":"query","required":false,"description":"Break between blocks, 0 to 120 (default 10)","schema":{"type":"number"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":["null","string"]},"summary":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"windowMinutes":{"type":["null","number"]},"blockMinutes":{"type":["null","number"]},"breakMinutes":{"type":["null","number"]},"blockCount":{"type":["null","number"]},"focusMinutesTotal":{"type":["null","number"]},"breakMinutesTotal":{"type":["null","number"]},"leftoverMinutes":{"type":["null","number"]},"blocks":{"type":["array","null"],"items":{"type":"object","properties":{"block":{"type":["null","number"]},"start":{"type":["null","string"]},"end":{"type":["null","string"]},"startDayOffset":{"type":["null","number"]},"endDayOffset":{"type":["null","number"]}}}},"degraded":{"type":["boolean","null"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"source":{"type":["null","string"]},"asOf":{"type":["null","string"]},"disclaimer":{"type":["null","string"]}}},"example":{"verdict":"COMPUTED","summary":"3 block(s) of 50 min with 10 min breaks fit in 180 min; 10 min left over.","reasons":["Breaks sit between blocks only, never after the last block.","A window end at or before the start is read as ending on the next day."],"windowMinutes":180,"blockMinutes":50,"breakMinutes":10,"blockCount":3,"focusMinutesTotal":150,"breakMinutesTotal":20,"leftoverMinutes":10,"blocks":[{"block":1,"start":"9:00 AM","end":"9:50 AM","startDayOffset":0,"endDayOffset":0},{"block":2,"start":"10:00 AM","end":"10:50 AM","startDayOffset":0,"endDayOffset":0}],"degraded":false,"notChecked":["fixed meetings or meals inside the window","whether the blocks suit the task (this is arithmetic, not a productivity study)","…1 more"],"source":"computed locally (whole blocks that fit, breaks only between blocks)","asOf":"2026-10-12T01:41:14.410Z","disclaimer":"Screening signal computed from the named public source. Not financial, legal or investment advice; provided as is. Verify at the source before acting."}}}},"400":{"description":"A parameter was missing or out of range."},"402":{"description":"Payment Required"},"502":{"description":"The upstream source failed or timed out."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.0200"},"protocols":[{"x402":{"network":"eip155:8453","scheme":"exact","currency":"USDC","endpoint":"https://focus-sleep-calc.x402tookit.com/time-blocks"}},{"x402":{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","scheme":"exact","currency":"USDC","endpoint":"https://focus-sleep-calc.x402tookit.com/time-blocks"}},{"x402":{"network":"eip155:137","scheme":"exact","currency":"USDC","endpoint":"https://focus-sleep-calc.x402tookit.com/time-blocks"}},{"x402":{"network":"eip155:42161","scheme":"exact","currency":"USDC","endpoint":"https://focus-sleep-calc.x402tookit.com/time-blocks"}}]}}}}}