REST-API · v1

MakeFav-API-Dokumentation

Erzeugen Sie vollständige Favicon-Pakete aus Ihrem eigenen Code, Build-Skripten und CI-Pipelines. Eine Anfrage macht aus jedem Bild eine favicon.ico, Apple-Touch-Icons, Android- und PWA-Icons, ein Web-Manifest und einsatzbereites HTML zum Einfügen.

Auf dieser Seite

Schnellstart

Die MakeFav-API ist eine einfache REST-API über HTTPS + JSON. Alle Endpunkte befinden sich unter einer Basis-URL:

https://makefav.com/api/v1
  1. Kostenloses Konto erstellen
    Registrieren Sie sich, bestätigen Sie Ihre E-Mail-Adresse und lassen Sie das Abonnement des MakeFav-Newsletters aktiv – das ist die einzige Bedingung des kostenlosen Tarifs.
  2. API-Schlüssel erstellen
    Öffnen Sie in Ihrem Konto die Seite „API-Schlüssel“ und erstellen Sie einen persönlichen Schlüssel. Er beginnt mit mf_ und wird nur einmal angezeigt – bewahren Sie ihn daher sicher auf. API-Schlüssel verwalten
  3. Erste Anfrage senden
    Laden Sie ein Bild an den Generate-Endpunkt hoch und speichern Sie die zurückgegebene ZIP-Datei:
curl --fail-with-body -sS https://makefav.com/api/v1/generate \
  -H "Authorization: Bearer $MAKEFAV_API_KEY" \
  -F "[email protected]" \
  -F "app_name=My App" \
  -F "theme_color=#2f9e68" \
  -F "radius=20" \
  -o favicons.zip

Unzip favicons.zip, upload the files to your website and paste the HTML code from the end of readme-makefav.txt into the <head> of every page.

Authentifizierung

Jede Anfrage an einen geschützten Endpunkt muss einen persönlichen API-Schlüssel enthalten. Sie können Schlüssel jederzeit auf Ihrer Kontoseite erstellen, benennen und widerrufen: API-Schlüssel

Send the key as a bearer token in the Authorization header, or – if your HTTP client makes that awkward – in the X-API-Key header. Both are equivalent.

Authorization: Bearer mf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# or, alternatively
X-API-Key: mf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Schlüssel gehören zu einem Benutzer, dessen E-Mail-Adresse bestätigt ist und dessen Newsletter-Abonnement aktiv ist (Bedingung des kostenlosen Tarifs). Ist die E-Mail nicht bestätigt, der Newsletter deaktiviert oder das Konto gesperrt, liefert jede Anfrage 403 Forbidden zurück.
Behandeln Sie API-Schlüssel wie Passwörter: Bewahren Sie sie auf dem Server oder in CI-Secrets auf, niemals in Browser-Code, mobilen Apps oder öffentlichen Repositories. Widerrufen Sie einen Schlüssel sofort, wenn er offengelegt wurde.

Missing or invalid keys return 401 Unauthorized. The GET /sizes and GET /openapi.json endpoints do not require a key.

Ratenlimits

Standardmäßig darf jeder API-Schlüssel 100 Anfragen pro Stunde senden. Jede authentifizierte Antwort zeigt Ihnen, wo Sie stehen:

HeaderBeschreibung
X-RateLimit-LimitMaximale Anzahl an Anfragen, die im aktuellen Zeitfenster erlaubt sind.
X-RateLimit-RemainingVerbleibende Anfragen im aktuellen Zeitfenster.
X-RateLimit-ResetUnix-Zeitstempel (Sekunden, UTC), zu dem das Zeitfenster zurückgesetzt wird.
HTTP/1.1 200 OK
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 97
X-RateLimit-Reset: 1767225600

When the limit is exceeded the API responds with HTTP 429 and the error code rate_limited. Wait until the time in X-RateLimit-Reset before retrying – do not retry in a tight loop.

HTTP/1.1 429 Too Many Requests
Content-Type: application/json
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1767225600

{"error": {"code": "rate_limited", "message": "Rate limit exceeded. Try again after the reset time."}}

You can check your current quota at any time with GET /me.

Endpunkte

EndpunktAuthBeschreibung
POST /generateAPI-SchlüsselEin vollständiges Favicon-Paket erstellen.
GET /meAPI-SchlüsselIhr Konto und der aktuelle Status des Ratenlimits.
GET /sizesKeineListe aller Icon-Dateien und Größen, die der Generator erzeugt.
GET /openapi.jsonKeineMaschinenlesbare OpenAPI-3.1-Spezifikation.

Favicon-Paket generieren

POST/generate

Erstellt aus einem Quellbild ein vollständiges Favicon-Paket. Senden Sie das Bild auf eine von drei Arten:

Content-TypeBildfeldBeschreibung
multipart/form-dataimageDatei-Upload. Empfohlen – die effizienteste Option.
application/jsonimage_base64Base64-encoded image, either raw base64 or a data URL such as data:image/png;base64,iVBOR….
application/jsonimage_urlÖffentliche http- oder https-URL des Bildes. Der Server lädt es herunter (max. 10 MB).

Unterstützte Eingabeformate: PNG, JPG, WebP, AVIF, GIF, BMP, SVG und ICO. Maximale Dateigröße: 10 MB.

Parameter

Alle Parameter sind optional. Senden Sie sie als Formularfelder (multipart) oder als JSON-Eigenschaften. Ungültige Werte werden durch den Standardwert ersetzt.

NameTyp / BereichStandardBeschreibung
app_nameString, max. 60 ZeichenMy WebsiteName Ihrer Website oder App, verwendet in manifest.json und auf der Beispielseite.
short_nameString, max. 24 Zeichendie ersten 12 Zeichen von app_nameKurzname, der auf Android-Startbildschirmen unter dem Icon angezeigt wird.
theme_color#rrggbb#ffffffFarbe der Browseroberfläche (theme-color-Meta-Tag und Manifest).
tile_color#rrggbbwie theme_colorHintergrundfarbe der Windows-Startkacheln.
backgroundtransparent | #rrggbbtransparentHintergrund der Browser-, Android- und Windows-Icons.
apple_background#rrggbb#ffffffHintergrund der Apple-Touch-Icons und des maskierbaren Icons (iOS unterstützt keine Transparenz). Wird ignoriert, wenn background eine Farbe ist – dann wird diese Farbe verwendet.
paddingGanzzahl, 0–40 (%)0Leerer Raum um das Bild, als Prozentsatz der Icon-Größe.
radiusGanzzahl, 0–50 (%)0Abgerundete Ecken. 50 ergibt einen Kreis. Wird nicht auf Apple-Icons angewendet, die iOS selbst abrundet.
zoomGanzzahl, 50–400 (%)100Skalierung des Bildes innerhalb des Icons. Werte über 100 schneiden das Bild zu.
offset_x, offset_yZahl, -1 bis 10Verschiebt das Bild horizontal / vertikal, als Bruchteil der Icon-Größe.
pathString/Ordner auf Ihrem Server, in dem die Icons liegen werden. Wird im HTML-Snippet, im Manifest und in der browserconfig verwendet.
displaystandalone | fullscreen | minimal-ui | browserstandalonePWA-Anzeigemodus, der in das Manifest geschrieben wird.
pixelatedauto | 1 | 0autoScharfe Nearest-Neighbor-Skalierung für Pixel-Art. „auto“ aktiviert sie für Quellbilder mit 64 px oder weniger.
maskable1 | 01Erstellt zusätzlich maskable-icon-512x512.png mit Sicherheitsabstand für adaptive Android-Icons.
ico_sizeskommagetrennte Liste aus 16, 24, 32, 48, 64, 128, 25616,32,48In favicon.ico eingebettete Größen.
groupskommagetrennte Liste aus favicon, apple, android, msfavicon,apple,android,msZu erzeugende Icon-Sets: Browser-Favicons, Apple-Touch-Icons, Android-/PWA-Icons und Windows-Kacheln.
formatzip | jsonzipAntwortformat – siehe unten.

Antwort

format=zip
Binary ZIP archive with Content-Type: application/zip and Content-Disposition: attachment. Default.
format=json
JSON object with the package id (32 hex characters), the html snippet for your <head> and a files array; each file has name, mime, size (bytes) and base64 contents.

Beispielanfrage – Multipart, ZIP-Antwort

curl --fail-with-body -sS https://makefav.com/api/v1/generate \
  -H "Authorization: Bearer $MAKEFAV_API_KEY" \
  -F "[email protected]" \
  -F "app_name=My App" \
  -F "theme_color=#2f9e68" \
  -F "radius=20" \
  -o favicons.zip
HTTP/1.1 200 OK
Content-Type: application/zip
Content-Disposition: attachment
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 99
X-RateLimit-Reset: 1767225600

<binary ZIP data>

Beispielanfrage – JSON mit Bild-URL, JSON-Antwort

curl --fail-with-body -sS https://makefav.com/api/v1/generate \
  -H "Authorization: Bearer $MAKEFAV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image_url": "https://example.com/logo.png",
    "app_name": "My App",
    "theme_color": "#2f9e68",
    "radius": 20,
    "groups": "favicon,apple,android",
    "format": "json"
  }'
{
  "id": "9f86d081884c7d659a2feaa0c55ad015",
  "html": "<link rel=\"apple-touch-icon\" sizes=\"57x57\" href=\"/apple-icon-57x57.png\">\n…\n<meta name=\"theme-color\" content=\"#2f9e68\">",
  "files": [
    {"name": "favicon.ico", "mime": "image/x-icon", "size": 15086, "base64": "AAABAAMAEBAAAAEAIABoBAAANgAAACAg…"},
    {"name": "favicon-16x16.png", "mime": "image/png", "size": 612, "base64": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQ…"},
    {"name": "manifest.json", "mime": "application/json", "size": 1094, "base64": "ewogICAgIm5hbWUiOiAiTXkgQXBwIiwK…"}
  ]
}

Dein Konto abrufen

GET/me

Gibt den Nutzer zurück, zu dem der API-Schlüssel gehört, sowie den aktuellen Rate-Limit-Status. Praktisch, um einen Schlüssel zu überprüfen. Erfordert Authentifizierung; keine Parameter.

Beispielanfrage

curl -sS https://makefav.com/api/v1/me \
  -H "Authorization: Bearer $MAKEFAV_API_KEY"

Beispielantwort

{
  "id": 1,
  "email": "[email protected]",
  "name": "Jane Doe",
  "rate_limit": {"limit": 100, "remaining": 97, "reset": 1767225600}
}

Icon-Größen auflisten

GET/sizes

Returns every icon file the generator can produce, with its pixel size and group. No authentication and no parameters. The group value matches the groups parameter of POST /generate.

Beispielanfrage

curl -sS https://makefav.com/api/v1/sizes

Beispielantwort

{
  "files": [
    {"name": "favicon-16x16.png", "size": 16, "group": "favicon"},
    {"name": "favicon-32x32.png", "size": 32, "group": "favicon"},
    {"name": "apple-touch-icon.png", "size": 180, "group": "apple"},
    {"name": "android-icon-192x192.png", "size": 192, "group": "android"},
    {"name": "ms-icon-144x144.png", "size": 144, "group": "ms"}
  ]
}

OpenAPI-Spezifikation

GET/openapi.json

Gibt die OpenAPI-3.1-Beschreibung dieser API zurück. Keine Authentifizierung nötig. Importiere sie in Postman, Insomnia oder Swagger UI oder generiere damit einen typisierten Client für deine Sprache.

curl -sS https://makefav.com/api/v1/openapi.json -o makefav-openapi.json

Fehler

Successful requests return HTTP 200. Every error returns a JSON body with a stable, machine-readable code and a human-readable message. Always branch on the code, not on the message text.

HTTP/1.1 422 Unprocessable Content
Content-Type: application/json

{
  "error": {
    "code": "invalid_image",
    "message": "The uploaded file could not be decoded as an image."
  }
}
HTTP-StatusFehlercodeBedeutung
400bad_requestDie Anfrage ist fehlerhaft, zum Beispiel wurde kein Bild gesendet oder der JSON-Body ist ungültig.
401unauthorizedDer API-Schlüssel fehlt oder ist ungültig.
403forbiddenDie E-Mail-Adresse des Schlüsselinhabers ist nicht bestätigt, das Newsletter-Abo ist deaktiviert oder das Konto ist gesperrt.
413file_too_largeDas Bild ist größer als 10 MB.
415unsupported_typeDer Dateityp oder der Content-Type der Anfrage wird nicht unterstützt.
422invalid_imageDie Datei konnte nicht als Bild dekodiert werden oder die Bild-URL konnte nicht heruntergeladen werden.
429rate_limitedZu viele Anfragen. Warte bis X-RateLimit-Reset.
500server_errorAuf unserer Seite ist etwas schiefgelaufen. Versuche es später erneut; wende dich an den Support, falls das Problem bestehen bleibt.

Ausgabedateien

With all groups enabled, a package contains the files below. Files from disabled groups are left out.

DateiGrößeGruppe
favicon.ico16, 32, 48 (konfigurierbar)immer
favicon-16x16.png16 × 16favicon
favicon-32x32.png32 × 32favicon
favicon-96x96.png96 × 96favicon
apple-icon-57x57.png57 × 57apple
apple-icon-60x60.png60 × 60apple
apple-icon-72x72.png72 × 72apple
apple-icon-76x76.png76 × 76apple
apple-icon-114x114.png114 × 114apple
apple-icon-120x120.png120 × 120apple
apple-icon-144x144.png144 × 144apple
apple-icon-152x152.png152 × 152apple
apple-icon-180x180.png180 × 180apple
apple-icon.png192 × 192apple
apple-icon-precomposed.png192 × 192apple
apple-touch-icon.png180 × 180apple
android-icon-36x36.png36 × 36android
android-icon-48x48.png48 × 48android
android-icon-72x72.png72 × 72android
android-icon-96x96.png96 × 96android
android-icon-144x144.png144 × 144android
android-icon-192x192.png192 × 192android
android-icon-512x512.png512 × 512android
web-app-manifest-192x192.png192 × 192android
web-app-manifest-512x512.png512 × 512android
maskable-icon-512x512.png512 × 512android
ms-icon-70x70.png70 × 70ms
ms-icon-144x144.png144 × 144ms
ms-icon-150x150.png150 × 150ms
ms-icon-310x310.png310 × 310ms

Zusätzliche Dateien

DateiEnthaltenBeschreibung
favicon.svgNur für SVG-Eingaben ohne Zuschneiden, Zoom, Innenabstand, Ecken oder HintergrundBereinigte Kopie deines SVGs für Browser, die Vektor-Favicons unterstützen.
manifest.json, site.webmanifestandroidWeb-App-Manifest für Android und installierbare PWAs (zwei identische Kopien).
browserconfig.xmlmsWindows-Kachelkonfiguration mit deiner Kachelfarbe.
readme-makefav.txtimmerInstallationsanleitung mit dem HTML-Code für Ihr <head> am Ende.

Codebeispiele

Each example uploads logo.png with a few options and saves favicons.zip, handling API errors. Set the environment variable MAKEFAV_API_KEY to your API key first.

Multipart-Upload:

# Multipart upload (recommended). --fail-with-body exits non-zero on HTTP errors
# and still saves the JSON error body, so you can inspect it.
curl --fail-with-body -sS https://makefav.com/api/v1/generate \
  -H "Authorization: Bearer $MAKEFAV_API_KEY" \
  -F "[email protected]" \
  -F "app_name=My App" \
  -F "theme_color=#2f9e68" \
  -F "radius=20" \
  -o favicons.zip \
  || { echo "Request failed:"; cat favicons.zip; rm -f favicons.zip; exit 1; }

JSON-Body mit base64-kodiertem Bild (erfordert jq):

# JSON body with a base64-encoded image (built with jq to avoid argument length limits)
base64 < logo.png | tr -d '\n' > logo.b64
jq -n --rawfile img logo.b64 \
  '{image_base64: $img, app_name: "My App", theme_color: "#2f9e68", radius: 20}' \
| curl --fail-with-body -sS https://makefav.com/api/v1/generate \
    -H "Authorization: Bearer $MAKEFAV_API_KEY" \
    -H "Content-Type: application/json" \
    --data-binary @- \
    -o favicons.zip \
  || { echo "Request failed:"; cat favicons.zip; rm -f favicons.zip; exit 1; }

HTML-Verwendung

Upload all files to the folder you set with path, then paste the snippet into the <head> of every page. It is included at the end of readme-makefav.txt in the package and, with format=json, returned in the html field. Example for the options used in the code examples above:

<head>
  <meta charset="utf-8">
  <title>My App</title>

  <link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png">
  <link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png">
  <link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png">
  <link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png">
  <link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png">
  <link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png">
  <link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png">
  <link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png">
  <link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png">
  <link rel="icon" type="image/png" sizes="192x192" href="/android-icon-192x192.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
  <link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
  <link rel="icon" href="/favicon.ico" sizes="any">
  <link rel="manifest" href="/manifest.json">
  <meta name="msapplication-TileColor" content="#2f9e68">
  <meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
  <meta name="msapplication-config" content="/browserconfig.xml">
  <meta name="theme-color" content="#2f9e68">
</head>

Leere nach dem Deployment den Browser-Cache oder öffne die Seite in einem privaten Fenster – Browser cachen Favicons sehr aggressiv.

Änderungsprotokoll

v1

  • Erste öffentliche Version der MakeFav-REST-API.
  • Endpoints POST /generate, GET /me, GET /sizes and GET /openapi.json.
  • ZIP- und JSON-Antwortformate, Multipart-, base64- und URL-Bildeingabe.
  • Persönliche API-Schlüssel mit 100 Anfragen pro Stunde.

Version 1 ist stabil: Wir fügen nur optionale Parameter und Felder hinzu. Breaking Changes erscheinen mit Vorankündigung als neue Version.

Support

Fragen, Fehlermeldungen oder ein höheres Rate-Limit nötig? Wir helfen gern. Bitte gib in deiner Nachricht den Zeitpunkt der Anfrage und den Fehlercode an – niemals deinen API-Schlüssel.