Taste Profile
Search for artwork, pick what you like, and discover artists who match your style.
Selected: 0 / 10
How this works: API calls behind this demo
This demo chains three API calls. Search for art, measure taste coherence, then find matching artists.
1. Search for artwork
curl "https://lagoon.io/api/v1/search?nl=blue+hair+on+pixiv&limit=24"
Returns posts with thumbnails. The user picks favorites from the results. Each post has an id used in the next steps.
2. Measure taste coherence (requires API key)
curl -H "X-API-Key: YOUR_KEY" \ "https://lagoon.io/api/v1/batch-similar?ids=1234,5678,9012&threshold=0.5"
Computes pairwise cosine similarity across the selected posts. The average of all pairs gives a coherence score: high means the picks share a consistent style, low means eclectic taste.
Response shape (batch-similar)
{
"ok": true,
"count": 3,
"pairs": [
{ "id_a": 1234, "id_b": 5678, "similarity": 0.812 },
{ "id_a": 1234, "id_b": 9012, "similarity": 0.654 }
]
}
3. Find matching artists (requires API key)
curl -H "X-API-Key: YOUR_KEY" \ "https://lagoon.io/api/v1/similar-artists?id=1234&limit=8"
Pass any of the selected post IDs to find artists with a similar visual style. The demo averages results across all picks. Each result includes cross-platform handles via also_on.
Minimal example: recreate the taste flow
const KEY = "YOUR_KEY";
const headers = { "X-API-Key": KEY };
// 1. search
const search = await fetch("https://lagoon.io/api/v1/search?nl=blue+hair&limit=24")
.then(r => r.json());
const picks = search.results.slice(0, 5); // user picks
// 2. coherence
const ids = picks.map(p => p.id).join(",");
const coherence = await fetch(
`https://lagoon.io/api/v1/batch-similar?ids=${ids}`,
{ headers }
).then(r => r.json());
const avg = coherence.pairs.reduce((s, p) => s + p.similarity, 0)
/ coherence.pairs.length;
console.log("coherence:", avg.toFixed(2));
// 3. artist recommendations (from first pick)
const artists = await fetch(
`https://lagoon.io/api/v1/similar-artists?id=${picks[0].id}&limit=8`,
{ headers }
).then(r => r.json());
console.log(artists.results);
Full parameter reference: batch-similar, similar-artists.