Skip to content

POST /recommend ​

Returns an AI-generated outfit recommendation based on current weather at the given coordinates.

Endpoint: POST https://skystyle.app/api/v1/recommend
Credit cost: 2 per request

Request ​

Headers ​

HeaderValue
AuthorizationBearer sk_live_YOUR_API_KEY
Content-Typeapplication/json

Body parameters ​

ParameterTypeRequiredDescription
latnumber✅Latitude (-90 to 90)
lonnumber✅Longitude (-180 to 180)
unitstring—"metric" (°C, km/h, default) or "imperial" (°F, mph)
genderstring—Gender context for the recommendation, e.g. "Male". Max 30 characters.

Response (200) ​

FieldTypeDescription
outfitstringConcise outfit recommendation (up to 120 words).
reasoningstringExplanation linking weather conditions to the outfit choices.
weatherobjectKey weather conditions used (see /weather for field definitions).
modelstringAI model that generated the recommendation.
generated_atstringISO-8601 UTC timestamp.

Examples ​

JavaScript (fetch) ​

javascript
const response = await fetch("https://skystyle.app/api/v1/recommend", {
  method: "POST",
  headers: {
    "Authorization": "Bearer sk_live_YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    lat: 40.7128,
    lon: -74.0060,
    unit: "imperial",
    gender: "Male",
  }),
});

const data = await response.json();

curl ​

bash
curl -X POST "https://skystyle.app/api/v1/recommend" \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "lat": 40.7128,
    "lon": -74.0060,
    "unit": "imperial",
    "gender": "Male"
  }'

Sample response ​

json
{
  "outfit": "Wear a light denim jacket over a white t-shirt, paired with dark chinos and white sneakers.",
  "reasoning": "At 64°F with a light breeze, you'll want a layer for the morning chill that you can remove by midday.",
  "weather": {
    "temp": 64,
    "feels_like": 61,
    "temp_unit": "°F",
    "humidity_pct": 55,
    "wind_speed": 9,
    "wind_speed_unit": "mph",
    "wind_dir": "SW",
    "description": "Partly cloudy",
    "rain_chance_pct": 10,
    "uv_index": 4,
    "is_day": true,
    "alerts": []
  },
  "model": "gemini-2.5-flash",
  "generated_at": "2026-04-17T12:00:00.000Z"
}

Sky Style Docs — always in sync with skystyle.app/api/v1