Overview
- Category
- Health
- API mode
not_available- Processing
- client-side
- Privacy
- no-data-stored
Public descriptor
The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.
GET /api/v1/tools/bedtime-calculator
Execute availability
This tool is documented as a browser capability. Its execute route does not produce a server-side result; when execution is enabled, it responds with browser_interaction_required and points callers to the public tool page.
POST /api/v1/tools/bedtime-calculator/execute
Authentication is not issued during the preview. A bearer API key is planned for execution after launch.
Input schema
object object; additional properties are not accepted.
wake_time· string · required- Enter the desired wake time used by this tool.
fall_asleep_minutes· number · required- Enter the time to fall asleep used by this tool.
cycle_minutes· number · required- Enter the planning sleep-cycle length used by this tool.
{
"type": "object",
"properties": {
"wake_time": {
"type": "string",
"description": "Enter the desired wake time used by this tool."
},
"fall_asleep_minutes": {
"type": "number",
"description": "Enter the time to fall asleep used by this tool.",
"minimum": 0,
"maximum": 180
},
"cycle_minutes": {
"type": "number",
"description": "Enter the planning sleep-cycle length used by this tool.",
"minimum": 60,
"maximum": 120
}
},
"required": [
"wake_time",
"fall_asleep_minutes",
"cycle_minutes"
],
"additionalProperties": false
}
Output schema
On a successful execution, schema values appear in data.result.values.
recommended_bedtime· string- Recommended bedtime produced by the tool.
earlier_bedtime· string- Earlier bedtime option produced by the tool.
later_bedtime· string- Later bedtime option produced by the tool.
recommended_sleep· string- Recommended time asleep produced by the tool.
cycle_options· array- Sleep-cycle options produced by the tool.
{
"type": "object",
"properties": {
"recommended_bedtime": {
"type": "string",
"description": "Recommended bedtime produced by the tool."
},
"earlier_bedtime": {
"type": "string",
"description": "Earlier bedtime option produced by the tool."
},
"later_bedtime": {
"type": "string",
"description": "Later bedtime option produced by the tool."
},
"recommended_sleep": {
"type": "string",
"description": "Recommended time asleep produced by the tool."
},
"cycle_options": {
"type": "array",
"description": "Sleep-cycle options produced by the tool."
}
},
"additionalProperties": false
}
Bedtime Calculator example
The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.
curl -X POST "https://utilitypages.org/api/v1/tools/bedtime-calculator/execute" \
-H "Content-Type: application/json" \
-d '{
"wake_time": "07:00",
"fall_asleep_minutes": 15,
"cycle_minutes": 90
}'
{
"ok": true,
"data": {
"slug": "bedtime-calculator",
"result": {
"values": {
"recommended_bedtime": "9:45 PM",
"earlier_bedtime": "8:15 PM",
"later_bedtime": "11:15 PM",
"recommended_sleep": "9 hours",
"cycle_options": [
{
"cycles": 4,
"bedtime": "12:45 AM",
"sleep_time": "6 hours"
},
{
"cycles": 5,
"bedtime": "11:15 PM",
"sleep_time": "7.5 hours"
},
{
"cycles": 6,
"bedtime": "9:45 PM",
"sleep_time": "9 hours"
},
{
"cycles": 7,
"bedtime": "8:15 PM",
"sleep_time": "10.5 hours"
}
]
},
"display": {
"display": "9:45 PM"
},
"warnings": [],
"assumptions": [],
"steps": []
}
},
"meta": [],
"request_id": "req_example_123"
}
Errors
api_not_launched· 503- Returned by the current launch gate for every execute request.
invalid_json· 400- Returned when an enabled execute request does not contain valid JSON.
validation_failed· 422- Returned when a request does not satisfy the input schema.
browser_interaction_required· 422- Returned for browser capability tools instead of inventing a server-side result.
tool_not_found· 404- Returned when a requested descriptor slug does not exist.
execution_failed· 503- Returned when an enabled server-side execution cannot complete.