Climate
Vitamin-D sun time API
Estimates minutes of midday sun needed for a target vitamin-D dose given UV index and Fitzpatrick skin type, via a standard erythemal-dose conversion. Answers 'How long in UVI 8 sun to make 1000 IU vitamin D?', 'How much sun does a darker-skinned person need?'.
Price$0.04per request
MethodPOST
Route/v1/climate/vitamin-d-exposure
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
vitamin-dsun-exposureuv-indexfitzpatrickhealtherythemalsupplementationsunlight
API URL
Integration docshttps://x402.hexl.dev/v1/climate/vitamin-d-exposureExample request
{
"uvIndex": 8,
"skinType": 3,
"targetIu": 1000
}Example response
{
"exposureMinutes": 10.8,
"uvIndex": 8,
"skinType": 3,
"targetIu": 1000,
"standardErythemalDosesNeeded": 1.3,
"interpretation": "~11 min midday sun on ~25% skin to make 1000 IU vitamin D (skin type 3, UVI 8).",
"formula": "time = (100 J/m² per SED / (UVI×0.025)) × (targetIU/1000 × skinFactor); 1 SED≈1000 IU for type II"
}Input schema
{
"type": "object",
"required": [
"uvIndex"
],
"properties": {
"uvIndex": {
"type": "number",
"description": "UV index",
"examples": [
8
]
},
"skinType": {
"type": "number",
"description": "Fitzpatrick skin type 1-6 (default 2)",
"examples": [
3
]
},
"targetIu": {
"type": "number",
"description": "Target vitamin-D dose in IU (default 1000)",
"examples": [
1000
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}