REST API · v1

MakeFav API 문서

직접 작성한 코드, 빌드 스크립트, CI 파이프라인에서 완전한 파비콘 패키지를 생성하세요. 요청 한 번으로 이미지를 favicon.ico, Apple 터치 아이콘, Android 및 PWA 아이콘, 웹 매니페스트, 바로 붙여 넣을 수 있는 HTML로 변환합니다.

이 페이지의 내용

빠른 시작

MakeFav API는 HTTPS + JSON 기반의 간단한 REST API입니다. 모든 엔드포인트는 하나의 기본 URL 아래에 있습니다:

https://makefav.com/api/v1
  1. 무료 계정 만들기
    가입하고 이메일 주소를 인증한 뒤 MakeFav 뉴스레터 구독을 유지하세요. 이것이 무료 요금제의 유일한 조건입니다.
  2. API 키 만들기
    계정의 API 키 페이지에서 개인 키를 만드세요. 키는 mf_로 시작하며 한 번만 표시되므로 안전하게 보관하세요. API 키 관리
  3. 첫 요청 보내기
    generate 엔드포인트에 이미지를 업로드하고 반환된 ZIP 파일을 저장하세요:
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.

인증

보호된 엔드포인트에 대한 모든 요청에는 개인 API 키가 포함되어야 합니다. 키는 계정 페이지에서 언제든지 만들고, 이름을 지정하고, 폐기할 수 있습니다: API 키

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
키는 이메일 주소가 인증되고 뉴스레터 구독이 활성화된 사용자에게 속합니다(무료 요금제 조건). 이메일이 인증되지 않았거나 뉴스레터가 비활성화되었거나 계정이 차단된 경우 모든 요청에서 403 Forbidden이 반환됩니다.
API 키는 비밀번호처럼 다루세요. 서버나 CI 시크릿에 보관하고, 브라우저 코드, 모바일 앱, 공개 저장소에는 절대 넣지 마세요. 키가 유출되면 즉시 폐기하세요.

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

요청 제한

기본적으로 API 키당 시간당 100건까지 요청할 수 있습니다. 인증된 모든 응답에는 현재 사용 현황이 포함됩니다:

헤더설명
X-RateLimit-Limit현재 기간에 허용되는 최대 요청 수입니다.
X-RateLimit-Remaining현재 기간에 남은 요청 수입니다.
X-RateLimit-Reset기간이 초기화되는 Unix 타임스탬프(초, UTC)입니다.
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.

엔드포인트

엔드포인트인증설명
POST /generateAPI 키완전한 파비콘 패키지를 생성합니다.
GET /meAPI 키계정 정보와 현재 요청 제한 상태입니다.
GET /sizes없음생성기가 만드는 모든 아이콘 파일과 크기의 목록입니다.
GET /openapi.json없음기계가 읽을 수 있는 OpenAPI 3.1 사양입니다.

파비콘 패키지 생성

POST/generate

원본 이미지 하나로 완전한 파비콘 패키지를 생성합니다. 이미지는 세 가지 방법 중 하나로 보낼 수 있습니다:

콘텐츠 유형이미지 필드설명
multipart/form-dataimage파일 업로드. 가장 효율적인 방법으로 권장합니다.
application/jsonimage_base64Base64-encoded image, either raw base64 or a data URL such as data:image/png;base64,iVBOR….
application/jsonimage_url이미지의 공개 http 또는 https URL입니다. 서버가 이미지를 다운로드합니다(최대 10MB).

지원하는 입력 형식: PNG, JPG, WebP, AVIF, GIF, BMP, SVG, ICO. 최대 파일 크기: 10MB.

매개변수

모든 매개변수는 선택 사항입니다. 폼 필드(multipart) 또는 JSON 속성으로 보낼 수 있습니다. 잘못된 값은 기본값으로 대체됩니다.

이름유형 / 범위기본값설명
app_name문자열, 최대 60자My Website웹사이트 또는 앱의 이름으로, manifest.json과 예제 페이지에 사용됩니다.
short_name문자열, 최대 24자app_name의 처음 12자Android 홈 화면에서 아이콘 아래에 표시되는 짧은 이름입니다.
theme_color#rrggbb#ffffff브라우저 UI 색상입니다(theme-color 메타 태그 및 매니페스트).
tile_color#rrggbbtheme_color와 동일Windows 시작 타일의 배경색입니다.
backgroundtransparent | #rrggbbtransparent브라우저, Android, Windows 아이콘의 배경입니다.
apple_background#rrggbb#ffffffApple 터치 아이콘과 마스커블 아이콘의 배경입니다(iOS는 투명도를 지원하지 않습니다). background가 색상이면 무시되고 해당 색상이 사용됩니다.
padding정수, 0–40 (%)0아이콘 크기에 대한 백분율로 나타낸 이미지 주변의 여백입니다.
radius정수, 0–50 (%)0모서리 둥글기입니다. 50이면 원이 됩니다. iOS가 직접 둥글게 처리하는 Apple 아이콘에는 적용되지 않습니다.
zoom정수, 50–400 (%)100아이콘 안에서의 이미지 배율입니다. 100을 넘으면 이미지가 잘립니다.
offset_x, offset_y숫자, -1 ~ 10아이콘 크기에 대한 비율로 이미지를 가로 / 세로로 이동합니다.
path문자열/아이콘이 위치할 서버의 폴더입니다. HTML 스니펫, 매니페스트, browserconfig에 사용됩니다.
displaystandalone | fullscreen | minimal-ui | browserstandalone매니페스트에 기록되는 PWA 표시 모드입니다.
pixelatedauto | 1 | 0auto픽셀 아트용의 선명한 최근접 이웃 방식 스케일링입니다. auto는 64px 이하의 원본에서 이를 활성화합니다.
maskable1 | 01Android 적응형 아이콘을 위한 안전 영역 여백이 포함된 maskable-icon-512x512.png도 함께 생성합니다.
ico_sizes16, 24, 32, 48, 64, 128, 256 중 쉼표로 구분한 목록16,32,48favicon.ico에 포함되는 크기입니다.
groupsfavicon, apple, android, ms 중 쉼표로 구분한 목록favicon,apple,android,ms생성할 아이콘 세트: 브라우저 favicon, Apple 터치 아이콘, Android / PWA 아이콘, Windows 타일.
formatzip | jsonzip응답 형식 – 아래를 참고하세요.

응답

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.

요청 예시 – multipart, ZIP 응답

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>

요청 예시 – 이미지 URL이 포함된 JSON, JSON 응답

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…"}
  ]
}

내 계정 조회

GET/me

API 키 소유자와 현재 요청 제한 상태를 반환합니다. 키를 확인할 때 유용합니다. 인증이 필요하며 매개변수는 없습니다.

요청 예시

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

응답 예시

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

아이콘 크기 목록

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.

요청 예시

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

응답 예시

{
  "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 사양

GET/openapi.json

이 API의 OpenAPI 3.1 설명을 반환합니다. 인증이 필요 없습니다. Postman, Insomnia, Swagger UI로 가져오거나 사용하는 언어에 맞는 타입 클라이언트를 생성하는 데 활용하세요.

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

오류

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 상태오류 코드의미
400bad_request요청 형식이 올바르지 않습니다. 예를 들어 이미지가 전송되지 않았거나 JSON 본문이 유효하지 않은 경우입니다.
401unauthorizedAPI 키가 없거나 유효하지 않습니다.
403forbidden키 소유자의 이메일이 인증되지 않았거나, 뉴스레터 구독이 비활성화되었거나, 계정이 차단되었습니다.
413file_too_large이미지가 10MB보다 큽니다.
415unsupported_type지원하지 않는 파일 형식 또는 요청 콘텐츠 형식입니다.
422invalid_image파일을 이미지로 디코딩할 수 없거나 이미지 URL을 다운로드할 수 없습니다.
429rate_limited요청이 너무 많습니다. X-RateLimit-Reset 시각까지 기다려 주세요.
500server_error서버에 문제가 발생했습니다. 잠시 후 다시 시도하고, 계속되면 지원팀에 문의하세요.

출력 파일

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

파일크기그룹
favicon.ico16, 32, 48 (설정 가능)항상
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

추가 파일

파일포함됨설명
favicon.svg자르기, 확대/축소, 여백, 모서리, 배경을 적용하지 않은 SVG 입력에만 해당벡터 favicon을 지원하는 브라우저를 위한 SVG의 정리된 사본입니다.
manifest.json, site.webmanifestandroidAndroid 및 설치형 PWA용 웹 앱 매니페스트입니다(동일한 사본 2개).
browserconfig.xmlms선택한 타일 색상이 적용된 Windows 타일 구성 파일입니다.
readme-makefav.txt항상마지막에 <head>에 넣을 HTML 코드가 포함된 설치 안내가 있습니다.

코드 예제

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 업로드:

# 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; }

base64로 인코딩된 이미지가 포함된 JSON 본문(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 사용법

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>

배포 후에는 브라우저 캐시를 지우거나 시크릿 창에서 사이트를 여세요. 브라우저는 favicon을 강하게 캐시합니다.

변경 내역

v1

  • MakeFav REST API 최초 공개 버전입니다.
  • Endpoints POST /generate, GET /me, GET /sizes and GET /openapi.json.
  • ZIP 및 JSON 응답 형식, multipart, base64, URL 이미지 입력을 지원합니다.
  • 시간당 100회 요청이 가능한 개인 API 키.

버전 1은 안정 버전입니다. 선택적 매개변수와 필드만 추가하며, 호환성이 깨지는 변경은 사전 공지 후 새 버전으로 출시됩니다.

지원

질문, 버그 신고 또는 더 높은 요청 제한이 필요하신가요? 기꺼이 도와드리겠습니다. 메시지에 요청 시간과 오류 코드를 포함해 주세요. API 키는 절대 포함하지 마세요.