REST API · v1

MakeFav API ਦਸਤਾਵੇਜ਼

ਆਪਣੇ ਕੋਡ, ਬਿਲਡ ਸਕ੍ਰਿਪਟਾਂ ਅਤੇ CI ਪਾਈਪਲਾਈਨਾਂ ਤੋਂ ਪੂਰੇ ਫੈਵੀਕੋਨ ਪੈਕੇਜ ਬਣਾਓ। ਇੱਕ ਬੇਨਤੀ ਕਿਸੇ ਵੀ ਚਿੱਤਰ ਨੂੰ favicon.ico, Apple touch ਆਈਕਨ, 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-ResetUnix ਟਾਈਮਸਟੈਂਪ (ਸਕਿੰਟ, 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 ਵਿਸ਼ੇਸ਼ਤਾ।

favicon ਪੈਕੇਜ ਬਣਾਓ

POST/generate

ਇੱਕ ਸਰੋਤ ਚਿੱਤਰ ਤੋਂ ਪੂਰਾ favicon ਪੈਕੇਜ ਬਣਾਉਂਦਾ ਹੈ। ਚਿੱਤਰ ਨੂੰ ਤਿੰਨ ਤਰੀਕਿਆਂ ਵਿੱਚੋਂ ਕਿਸੇ ਇੱਕ ਨਾਲ ਭੇਜੋ:

ਕੰਟੈਂਟ ਕਿਸਮਚਿੱਤਰ ਖੇਤਰਵੇਰਵਾ
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। ਸਰਵਰ ਇਸਨੂੰ ਡਾਊਨਲੋਡ ਕਰਦਾ ਹੈ (ਵੱਧ ਤੋਂ ਵੱਧ 10 MB)।

ਸਮਰਥਿਤ ਇਨਪੁੱਟ ਫਾਰਮੈਟ: PNG, JPG, WebP, AVIF, GIF, BMP, SVG ਅਤੇ ICO। ਵੱਧ ਤੋਂ ਵੱਧ ਫ਼ਾਈਲ ਆਕਾਰ: 10 MB।

ਪੈਰਾਮੀਟਰ

ਸਾਰੇ ਪੈਰਾਮੀਟਰ ਵਿਕਲਪਿਕ ਹਨ। ਇਹਨਾਂ ਨੂੰ ਫਾਰਮ ਫੀਲਡਾਂ (multipart) ਜਾਂ JSON ਪ੍ਰਾਪਰਟੀਆਂ ਵਜੋਂ ਭੇਜੋ। ਗਲਤ ਮੁੱਲਾਂ ਦੀ ਥਾਂ ਡਿਫ਼ਾਲਟ ਵਰਤਿਆ ਜਾਂਦਾ ਹੈ।

ਨਾਮਕਿਸਮ / ਸੀਮਾਡਿਫ਼ਾਲਟਵੇਰਵਾ
app_nameਸਟ੍ਰਿੰਗ, ਵੱਧ ਤੋਂ ਵੱਧ 60 ਅੱਖਰMy Websiteਤੁਹਾਡੀ ਵੈੱਬਸਾਈਟ ਜਾਂ ਐਪ ਦਾ ਨਾਮ, ਜੋ manifest.json ਅਤੇ ਉਦਾਹਰਨ ਪੰਨੇ ਵਿੱਚ ਵਰਤਿਆ ਜਾਂਦਾ ਹੈ।
short_nameਸਟ੍ਰਿੰਗ, ਵੱਧ ਤੋਂ ਵੱਧ 24 ਅੱਖਰapp_name ਦੇ ਪਹਿਲੇ 12 ਅੱਖਰAndroid ਦੀਆਂ ਹੋਮ ਸਕ੍ਰੀਨਾਂ ਉੱਤੇ ਆਈਕਨ ਹੇਠਾਂ ਦਿਖਾਇਆ ਜਾਣ ਵਾਲਾ ਛੋਟਾ ਨਾਮ।
theme_color#rrggbb#ffffffਬ੍ਰਾਊਜ਼ਰ UI ਦਾ ਰੰਗ (theme-color ਮੈਟਾ ਟੈਗ ਅਤੇ manifest)।
tile_color#rrggbbtheme_color ਵਾਂਗWindows ਸਟਾਰਟ ਟਾਈਲਾਂ ਦਾ ਬੈਕਗ੍ਰਾਊਂਡ ਰੰਗ।
backgroundtransparent | #rrggbbtransparentਬ੍ਰਾਊਜ਼ਰ, Android ਅਤੇ Windows ਆਈਕਨਾਂ ਦਾ ਬੈਕਗ੍ਰਾਊਂਡ।
apple_background#rrggbb#ffffffApple touch ਆਈਕਨਾਂ ਅਤੇ maskable ਆਈਕਨ ਦਾ ਬੈਕਗ੍ਰਾਊਂਡ (iOS ਪਾਰਦਰਸ਼ਤਾ ਨੂੰ ਸਮਰਥਨ ਨਹੀਂ ਦਿੰਦਾ)। ਜੇ background ਕੋਈ ਰੰਗ ਹੈ ਤਾਂ ਇਸਨੂੰ ਅਣਡਿੱਠਾ ਕੀਤਾ ਜਾਂਦਾ ਹੈ – ਉਸ ਰੰਗ ਨੂੰ ਹੀ ਵਰਤਿਆ ਜਾਂਦਾ ਹੈ।
paddingਪੂਰਨ ਅੰਕ, 0–40 (%)0ਚਿੱਤਰ ਦੁਆਲੇ ਖਾਲੀ ਥਾਂ, ਆਈਕਨ ਦੇ ਆਕਾਰ ਦੀ ਪ੍ਰਤੀਸ਼ਤ ਵਜੋਂ।
radiusਪੂਰਨ ਅੰਕ, 0–50 (%)0ਗੋਲ ਕੋਨੇ। 50 ਨਾਲ ਗੋਲਾ ਬਣਦਾ ਹੈ। Apple ਆਈਕਨਾਂ ਉੱਤੇ ਲਾਗੂ ਨਹੀਂ ਹੁੰਦਾ, ਕਿਉਂਕਿ iOS ਉਹਨਾਂ ਨੂੰ ਆਪ ਗੋਲ ਕਰਦਾ ਹੈ।
zoomਪੂਰਨ ਅੰਕ, 50–400 (%)100ਆਈਕਨ ਦੇ ਅੰਦਰ ਚਿੱਤਰ ਦਾ ਪੈਮਾਨਾ। 100 ਤੋਂ ਵੱਧ ਮੁੱਲ ਚਿੱਤਰ ਨੂੰ ਕੱਟ ਦਿੰਦੇ ਹਨ।
offset_x, offset_yਸੰਖਿਆ, -1 ਤੋਂ 10ਚਿੱਤਰ ਨੂੰ ਖੜ੍ਹਵੇਂ / ਲੇਟਵੇਂ ਰੂਪ ਵਿੱਚ ਹਿਲਾਉਂਦਾ ਹੈ, ਆਈਕਨ ਦੇ ਆਕਾਰ ਦੇ ਅੰਸ਼ ਵਜੋਂ।
pathਸਟ੍ਰਿੰਗ/ਤੁਹਾਡੇ ਸਰਵਰ ਉੱਤੇ ਉਹ ਫੋਲਡਰ ਜਿੱਥੇ ਆਈਕਨ ਰੱਖੇ ਜਾਣਗੇ। HTML ਸਨਿੱਪਟ, manifest ਅਤੇ browserconfig ਵਿੱਚ ਵਰਤਿਆ ਜਾਂਦਾ ਹੈ।
displaystandalone | fullscreen | minimal-ui | browserstandalonemanifest ਵਿੱਚ ਲਿਖਿਆ ਜਾਣ ਵਾਲਾ PWA ਡਿਸਪਲੇ ਮੋਡ।
pixelatedauto | 1 | 0autoਪਿਕਸਲ ਆਰਟ ਲਈ ਤਿੱਖੀ nearest-neighbour ਸਕੇਲਿੰਗ। auto 64 px ਜਾਂ ਇਸ ਤੋਂ ਛੋਟੇ ਸਰੋਤਾਂ ਲਈ ਇਸਨੂੰ ਚਾਲੂ ਕਰਦਾ ਹੈ।
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 touch ਆਈਕਨ, 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 ਕੁੰਜੀ ਹੈ ਅਤੇ ਮੌਜੂਦਾ rate-limit ਸਥਿਤੀ ਵਾਪਸ ਕਰਦਾ ਹੈ। ਕੁੰਜੀ ਦੀ ਜਾਂਚ ਲਈ ਲਾਭਦਾਇਕ। ਪ੍ਰਮਾਣਿਕਤਾ ਲੋੜੀਂਦੀ ਹੈ; ਕੋਈ ਪੈਰਾਮੀਟਰ ਨਹੀਂ।

ਉਦਾਹਰਨ ਬੇਨਤੀ

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 ਵਿੱਚ ਇੰਪੋਰਟ ਕਰੋ, ਜਾਂ ਆਪਣੀ ਭਾਸ਼ਾ ਲਈ typed client ਬਣਾਉਣ ਵਿੱਚ ਵਰਤੋ।

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ਚਿੱਤਰ 10 MB ਤੋਂ ਵੱਡਾ ਹੈ।
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 ਲਈ ਵੈੱਬ ਐਪ manifest (ਦੋ ਇੱਕੋ ਜਿਹੀਆਂ ਕਾਪੀਆਂ)।
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 ਸਥਿਰ ਹੈ: ਅਸੀਂ ਸਿਰਫ਼ ਵਿਕਲਪਿਕ ਪੈਰਾਮੀਟਰ ਅਤੇ ਖੇਤਰ ਜੋੜਾਂਗੇ। ਅਸੰਗਤ ਬਦਲਾਅ ਪਹਿਲਾਂ ਸੂਚਨਾ ਦੇ ਕੇ ਨਵੇਂ ਵਰਜਨ ਵਜੋਂ ਜਾਰੀ ਕੀਤੇ ਜਾਣਗੇ।

ਸਹਾਇਤਾ

ਸਵਾਲ, ਬੱਗ ਰਿਪੋਰਟ ਜਾਂ ਉੱਚੀ rate limit ਦੀ ਲੋੜ ਹੈ? ਅਸੀਂ ਮਦਦ ਕਰਨ ਲਈ ਖੁਸ਼ ਹਾਂ। ਕਿਰਪਾ ਕਰਕੇ ਆਪਣੇ ਸੁਨੇਹੇ ਵਿੱਚ ਬੇਨਤੀ ਦਾ ਸਮਾਂ ਅਤੇ ਗਲਤੀ ਕੋਡ ਲਿਖੋ – ਆਪਣੀ API ਕੁੰਜੀ ਕਦੇ ਨਾ ਲਿਖੋ।