スリープ最適化API¶
夜間の回復改善のための、睡眠品質の診断と実践的な最適化プロトコルを生成します。
エンドポイント¶
GET /api/v1/fitness/sleep-optimizerPOST /api/v1/fitness/sleep-optimizer/post
パラメータ¶
| 名前 | タイプ | 必須 | クエリ/ボディ | 説明 |
|---|---|---|---|---|
sleep_hours | 数値 (0-16) | はい | クエリ/ボディ | 睡眠の総時間。 |
sleep_consistency_score | 整数 (0-100) | はい | クエリ/ボディ | 睡眠スケジュールの一貫性。 |
caffeine_intake_mg | 数値 (0-1200) | はい | クエリ/ボディ | 1日に摂取するカフェインの量 (mg)。 |
screen_time_before_bed | 数値 (0-360) | はい | クエリ/ボディ | 就寝前の画面表示時間 (分)。 |
lang | 文字列 | いいえ | クエリ | レスポンス言語 (en,es,de,fr,pt,ja,hi,ar)。 |
このエンドポイントを使用する理由¶
- 睡眠と体内時計の質を1つのモデル出力で定量化できます。
- 迅速な行動の反復のための、ターゲットを絞った最適化手順を得られます。
- 睡眠介入を通じて、回復とトレーニングの結果を改善できます。
リクエストの例¶
curl -X GET "https://api.hefitapi.com/api/v1/fitness/sleep-optimizer?sleep_hours=6.9&sleep_consistency_score=62&caffeine_intake_mg=260&screen_time_before_bed=75&lang=en" \
-H "X-API-Key: YOUR_API_KEY"
curl -X POST "https://api.hefitapi.com/api/v1/fitness/sleep-optimizer/post?lang=en" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{"sleep_hours":7.8,"sleep_consistency_score":84,"caffeine_intake_mg":120,"screen_time_before_bed":20}'
レスポンスの例¶
Info
下記は、デモンストレーションのみを目的とした例です。 このエンドポイントに対してライブリクエストを実行して、完全な、リアルタイム、および可能性のあるより詳細なJSON構造を受信してください。
{
"sleep_hours": 6.9,
"sleep_consistency_score": 62,
"caffeine_intake_mg": 260.0,
"screen_time_before_bed_minutes": 75.0,
"sleep_quality_score": 55,
"sleep_quality_band": {"band": "fragile", "band_label": "Fragile"},
"circadian_alignment_insight": {"score": 58, "status": "misaligned", "status_label": "Misaligned", "insight": "Current schedule and habits reduce circadian stability."},
"optimization_protocol": ["Reduce late caffeine and screen exposure", "Anchor wake time consistency"],
"recovery_priority": "Stabilize routine before increasing training stress.",
"next_adjustment_window_days": 3,
"confidence_score": 77,
"summary": "Sleep profile is fragile; near-term routine correction advised.",
"language": "en",
"_enterprise": {"client": "Acme Health", "plan": "pro", "request_id": "56e5dbbb8de53ceb", "quota": 120, "usage_tracking": true},
"_api_metadata_": {"endpoint_name": "fitness_sleep_optimizer", "response_language": "en"}
}
製品のポジショニング¶
回復アプリ、パフォーマンスコーチング、およびウェルネス行動プラットフォーム向けの上級機能。
備考
screen_time_before_bedは分単位で測定されます。
推奨されるエンドポイント¶
GET /api/v1/bmi- BMI APIGET /api/v1/tdee- TDEE APIGET /api/v1/bmr- BMR APIGET /api/v1/protein-calculator- タンパク質計算 APIGET /api/v1/fitness/heart-rate-zones- 心拍数ゾーン APIGET /api/v1/bodyfat- 体脂肪 API