What is it?
The Diwigo avatar API draws an SVG avatar with the initials of a name or e-mail address, with a colour that stays the same for each person.
It answers with SVG image and is included in the free plan: 10,000 requests per API key and per month.
Example request
GET https://landing.diwigo.com/api/?key=YOUR_API_KEY&avatar=Ada%20Lovelace&size=128
Parameters
| Parameter | Description |
|---|---|
key | Your API key (required) |
avatar | Name or e-mail address |
size | 16–1024 px (default 128) |
shape | circle, rounded or square (default circle) |
bg / color | Hex colours (default: automatic / ffffff) |
Code examples
curl "https://landing.diwigo.com/api/?key=YOUR_API_KEY&avatar=Ada%20Lovelace&size=128" -o result
<img src="https://landing.diwigo.com/api/?key=YOUR_API_KEY&avatar=Ada%20Lovelace&size=128" alt="Initials avatar">
const img = new Image();
img.src = "https://landing.diwigo.com/api/?key=YOUR_API_KEY&avatar=Ada%20Lovelace&size=128";
img.alt = "Initials avatar";
document.body.append(img);
<?php
$response = file_get_contents("https://landing.diwigo.com/api/?key=YOUR_API_KEY&avatar=Ada%20Lovelace&size=128");
file_put_contents("result", $response);
import requests
response = requests.get("https://landing.diwigo.com/api/?key=YOUR_API_KEY&avatar=Ada%20Lovelace&size=128")
open("result", "wb").write(response.content)
Use cases
- Default profile pictures for user accounts
- Comment and chat avatars
- Team pages without photos
Initials avatar: questions and answers
What does the Initials avatar API do?
The Diwigo avatar API draws an SVG avatar with the initials of a name or e-mail address, with a colour that stays the same for each person.
How do I call the Initials avatar API?
Send a GET request to https://landing.diwigo.com/api/?key=YOUR_API_KEY&avatar=Ada%20Lovelace&size=128 with your own API key instead of YOUR_API_KEY. It answers with SVG image.
Is the Initials avatar API free?
Yes, it is included in the free plan: 10,000 requests per API key and per calendar month, shared by all Diwigo endpoints. Higher limits are available on request.