AI Color Season Analyzer — Agent Skill
AI Color Season Analyzer — Agent Skill
Determine a person's color season (Spring/Summer/Autumn/Winter) from a photo using AI Pass multimodal API.
Quick Start
import requests, base64, re, os
AIPASS_API_KEY = os.environ["AIPASS_API_KEY"]
def analyze_color_season(image_path: str) -> dict:
"""Returns dict with season, tagline, analysis, palette"""
with open(image_path, "rb") as f:
b64 = base64.b64encode(f.read()).decode()
ext = image_path.rsplit(".", 1)[-1].lower()
mime = {"png":"image/png","jpg":"image/jpeg","jpeg":"image/jpeg"}.get(ext,"image/jpeg")
r = requests.post(
"https://aipass.one/apikey/v1/chat/completions",
headers={"Authorization": f"Bearer {AIPASS_API_KEY}", "Content-Type": "application/json"},
json={"model": "gpt-5-mini", "temperature": 1, "max_tokens": 2000,
"messages": [{"role": "user", "content": [
{"type": "text", "text": "Analyze color season. SEASON: X\nTAGLINE: X\nANALYSIS: X\nPALETTE: hex1,hex2,..."},
{"type": "image_url", "image_url": {"url": f"data:{mime};base64,{b64}"}}
]}]},
timeout=60
)
text = r.json()["choices"][0]["message"]["content"]
season = re.search(r"SEASON:\s*(\w+)", text, re.I)
palette = re.search(r"PALETTE:\s*([^\n]+)", text, re.I)
return {
"season": season.group(1) if season else "Unknown",
"palette": palette.group(1).strip() if palette else "",
"full_analysis": text
}
# Usage
result = analyze_color_season("selfie.jpg")
print(f"Season: {result['season']}, Palette: {result['palette']}")
Setup
- Sign up at aipass.one (valid email required)
- Developer Dashboard → API Keys
export AIPASS_API_KEY=your_key_here
Multimodal API
Sends both image and text in one call:
- Endpoint:
POST https://aipass.one/apikey/v1/chat/completions - Model:
gpt-5-mini(supports vision/multimodal) - Image format: base64 data URI in
image_urlfield
Web App
aipass.one/apps/color-season-analyzer
Related: AI Fashion Try-On
Skill File
name: ai-color-season-analyzer
description: Determine personal color season from photos using AI Pass multimodal API
version: 1.0.0
auth:
type: api_key
env: AIPASS_API_KEY
instructions: "Get API key from https://aipass.one/panel/developer.html under API Keys"
import requests, base64, re, os
def analyze_color_season(image_path: str) -> dict:
AIPASS_API_KEY = os.environ["AIPASS_API_KEY"]
with open(image_path, "rb") as f:
b64 = base64.b64encode(f.read()).decode()
ext = image_path.rsplit(".", 1)[-1].lower()
mime = {"png":"image/png","jpg":"image/jpeg","jpeg":"image/jpeg"}.get(ext,"image/jpeg")
r = requests.post(
"https://aipass.one/apikey/v1/chat/completions",
headers={"Authorization": f"Bearer {AIPASS_API_KEY}", "Content-Type": "application/json"},
json={"model": "gpt-5-mini", "temperature": 1, "max_tokens": 2000,
"messages": [{"role": "user", "content": [
{"type": "text", "text": "Determine color season (Spring/Summer/Autumn/Winter). Format: SEASON: X\nTAGLINE: X\nANALYSIS: X\nPALETTE: hex1,hex2,..."},
{"type": "image_url", "image_url": {"url": f"data:{mime};base64,{b64}"}}
]}]},
timeout=60
)
text = r.json()["choices"][0]["message"]["content"]
season = re.search(r"SEASON:\s*(\w+)", text, re.I)
tagline = re.search(r"TAGLINE:\s*([^\n]+)", text, re.I)
analysis = re.search(r"ANALYSIS:\s*([\s\S]*?)(?=PALETTE:|$)", text, re.I)
palette = re.search(r"PALETTE:\s*([^\n]+)", text, re.I)
return {
"season": season.group(1) if season else "Unknown",
"tagline": tagline.group(1).strip() if tagline else "",
"analysis": analysis.group(1).strip() if analysis else text,
"palette": palette.group(1).strip() if palette else ""
}
Download Skill File