DDiwigo API

Initials Avatar API

SVG avatar with the initials of a name or e-mail address; the colour is stable for a given name.

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

ParameterDescription
keyYour API key (required)
avatarName or e-mail address
size16–1024 px (default 128)
shapecircle, rounded or square (default circle)
bg / colorHex colours (default: automatic / ffffff)

Code examples

cURL
curl "https://landing.diwigo.com/api/?key=YOUR_API_KEY&avatar=Ada%20Lovelace&size=128" -o result
HTML
<img src="https://landing.diwigo.com/api/?key=YOUR_API_KEY&avatar=Ada%20Lovelace&size=128" alt="Initials avatar">
JavaScript
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
<?php
$response = file_get_contents("https://landing.diwigo.com/api/?key=YOUR_API_KEY&avatar=Ada%20Lovelace&size=128");
file_put_contents("result", $response);
Python
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.