/v1/avatar
Generate an avatar from a style + seed
Essayez-le en direct
10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.
Ça marche. Récupérez une clé API et utilisez-la dans votre projet.
Obtenez une clé APIExtraits de code
curl "https://api.oanor.com/avatar-api/v1/avatar" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/avatar-api/v1/avatar", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/avatar-api/v1/avatar");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/avatar-api/v1/avatar",
headers={"x-oanor-key": "oanor_test_..."}
)
Exemple de réponse
Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.
{
"data": {
"avatar": {
"svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 180 180\" fill=\"none\" shape-rendering=\"auto\" width=\"128\" height=\"128\"><metadata xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:dcterms=\"http://purl.org/dc/terms/\"><rdf:RDF><rdf:Description><dc:title>Bottts</dc:title><dc:creator>Pablo Stanley</dc:creator><dc:source xsi:type=\"dcterms:URI\">https://bottts.com/</dc:source><dcterms:license xsi:type=\"dcterms:URI\">https://bottts.com/</dcterms:license><dc:rights>Remix of „Bottts” (https://bottts.com/) by „Pablo Stanley”, licensed under „Free for personal and commercial use” (https://bottts.com/)</dc:rights></rdf:Description></rdf:RDF></metadata><mask id=\"viewboxMask\"><rect width=\"180\" height=\"180\" rx=\"0\" ry=\"0\" x=\"0\" y=\"0\" fill=\"#fff\" /></mask><g mask=\"url(#viewboxMask)\"><g transform=\"translate(0 66)\"><g opacity=\".9\" stroke=\"#2A3544\"><ellipse cx=\"32.5\" cy=\"23\" rx=\"16.5\" ry=\"18\" stroke-width=\"6\"/><path d=\"M29.51 36.76c-7.4 4.29-17 1.55-21.42-6.1\" stroke-width=\"4\"/><ellipse cx=\"28.5\" cy=\"52.5\" rx=\"16.5\" ry=\"14.5\" stroke-width=\"4\"/></g><g opacity=\".9\" stroke=\"#2A3544\"><path d=\"M168.6 60.42c-4.27-7.41-13.95-9.84-21.6-5.42\" stroke-width=\"4\"/><ellipse cx=\"148.5\" cy=\"22.5\" rx=\"16.5\" ry=\"15.5\" stroke-width=\"6\"/></g><mask id=\"sidesCables02-a\" style=\"mask-type:luminance\" maskUnits=\"userSpaceOnUse\" x=\"21\" y=\"0\" width=\"138\" height=\"72\"><g fill=\"#fff\"><rect x=\"21\" y=\"27\" width=\"16\" height=\"22\" rx=\"2\"/><rect x=\"22\" y=\"60\" width=\"16\" height=\"12\" rx=\"2\"/><rect x=\"143\" y=\"42\" width=\"16\" height=\"22\" rx=\"2\"/><rect x=\"143\" width=\"16\" height=\"22\" rx=\"2\"/></g></mask><g mask=\"url(#sidesCables02-a)\"><path d=\"M0 0h180v76H0V0Z\" fill=\"#546e7a\"/><path d=\"M0 0h180v76H0V0Z\" fill=\"#fff\" fill-opacity=\".3\"/></g></g><g transform=\"translate(41)\"><mask id=\"topRadar-a\" style=\"mask-type:luminance\" maskUnits=\"userSpaceOnUse\" x=\"37\" y=\"0\" width=\"36\" height=\"53\"><g fill=\"#fff\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M43.8.11A20 20 0 1 0 72.08 28.4\"/><circle cx=\"67.13\" cy=\"5.06\" r=\"4\" transform=\"rotate(45 67.13 5.06)\"/><path transform=\"rotate(45 64.3 6.48)\" d=\"M64.31 6.48h2v26h-2z\"/><path d=\"M47.94 28.11h4v24h-4z\"/></g></mask><g mask=\"url(#topRadar-a)\"><path d=\"M0 0h100v52H0V0Z\" fill=\"#90A4AE\"/><path d=\"M0 0h100v52H0V0Z\" fill=\"#fff\" fill-opacity=\".3\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M43.8.11A20 20 0 1 0 72.08 28.4\" fill=\"#fff\" fill-opacity=\".2\"/><circle cx=\"67.13\" cy=\"7.41\" r=\"5.66\" transform=\"rotate(45 67.13 7.4)\" fill=\"#fff\" fill-opacity=\".8\"/></g></g><g transform=\"translate(25 44)\"><mask id=\"faceSquare01-a\" style=\"mask-type:luminance\" maskUnits=\"userSpaceOnUse\" x=\"0\"
…