JavaScript SDK
Install and analyze in a few lines.
import { VisageAI } from '@visageai/sdk'; const client = new VisageAI({ apiKey: process.env.NEXT_PUBLIC_VISAGE_KEY! }); const result = await client.analyze({ imageUrl: 'https://.../face.jpg', attributes: ['wrinkle','pigmentation','sagging'] }); console.log(result.recommendations);
Response
{ "face": {"bbox":[120,80,520,560]}, "findings": {"wrinkle":{"score":0.62, "heatmap":"/cdn/hm_abc.png"}}, "explanations":[{"attribute":"wrinkle","top_regions":["periocular","forehead"]}], "recommendations":[{"sku":"NARS-UV-001","reason":"SPF & anti-oxidant","confidence":0.87}] }