{"openapi":"3.1.0","info":{"title":"Whet API","version":"1.0.0","summary":"Print-production tools from Whet, as an HTTP API.","description":"Whet's public API. Whet is an agentic design tool for print (an editor, and an agent that carries out jobs in the file, at the Whet app); this API offers its print tools over HTTP. It has font identification and jobs: send a file and Whet makes it print-ready with nobody at the screen. More will follow under `/api/v1`. The editor and Create have no public API yet.\n\n**Authentication.** Every request sends an API key: `Authorization: Bearer whet_sk_…`. Keys belong to an organisation and are created in the Whet app under Developers (`/dashboard/developers`, owners and admins). A key is shown once, at creation; store it in a secrets manager and never ship it to a browser or app bundle. Each key carries scopes (`fonts:identify` for font identification, `jobs:run` for jobs).\n\n**Limits per key.** 30 requests per rolling minute, 4 in flight at once, and 1000 successful identifications per rolling 24 hours. Over a limit the API answers 429 with a `Retry-After` header in seconds. Responses carry `X-RateLimit-Limit` and `X-RateLimit-Remaining` for the per-minute window.\n\n**Errors** are JSON: `{\"error\": {\"code\", \"message\", \"docs_url\"}, \"request_id\"}`. Branch on `code` (stable); show `message` to people. Retry only the codes marked retryable: `rate_limited`, `daily_limit_exceeded` (after `Retry-After`), `upstream_timeout`, `upstream_error`, `service_unavailable`, `internal_error` (exponential backoff, at most 3 tries). Never retry 4xx codes without changing the request.\n\nEvery response has an `X-Request-Id` header (also `request_id` in the body); quote it when you contact Whet."},"servers":[{"url":"https://whet.design/api/v1","description":"Whet"}],"security":[{"apiKey":[]}],"tags":[{"name":"Fonts","description":"Font identification over 1,478 open-licence Google Fonts families."},{"name":"Jobs","description":"Files Whet makes print-ready with nobody at the screen. Each job becomes a Whet document a person can open."}],"paths":{"/fonts/identify":{"post":{"operationId":"identifyFont","tags":["Fonts"],"summary":"Identify the font of a word in an image","description":"Tells which font a word in an image is set in. Send the image (PNG, JPEG or WebP, at most 10 MB) and the word as it reads. Whet sets the word in candidate fonts and compares the outlines with the pixels.\n\nOnly open-licence fonts are matched (1,478 Google Fonts families). The `decision` says how far to trust the answer:\n- `same`: confident identification. `match` is the typeface, as far as an open catalogue can say. If the original is a commercial font with an open look-alike, this can still be the look-alike: check `margin` and the shortlist when it matters.\n- `closest`: no open font is the same, but `match` is the nearest one (usually small or degraded lettering). It is a substitute, not the font itself; say so to the user.\n- `none`: no font fits well enough. `match` is absent; `reason` may say why, and `shortlist` still lists the nearest families.\n\nTakes about 9 to 14 seconds per word (CPU-bound); set your client timeout to at least 70 s. The same image and text give the same answer: do not retry a successful answer hoping for another one.\n\nTips: crop or pass `box` tightly around one word (a few pixels of margin); give `text` exactly as printed, including case and punctuation; pass `color` when the ink is not the colour least like the border (for example light text on a busy background). Several words: one request per word.\n\nImage URLs are not accepted: send the bytes.","security":[{"apiKey":["fonts:identify"]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["image","text"],"properties":{"image":{"type":"string","format":"binary","contentMediaType":"application/octet-stream","description":"The image: PNG, JPEG or WebP, at most 10 MB. The type is read from the bytes."},"text":{"type":"string","minLength":1,"maxLength":64,"description":"The word as it reads in the image, exactly as printed."},"box":{"type":"string","pattern":"^\\d+,\\d+,\\d+,\\d+$","description":"Optional: the word's box in image pixels as `x,y,w,h` (w and h at least 4). Default: the whole image.","examples":["120,40,380,96"]},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$","description":"Optional: the letters' colour as #rrggbb. Default: the colour least like the box's border.","examples":["#1a1a1a"]}}},"encoding":{"image":{"contentType":"image/png, image/jpeg, image/webp"}}},"application/json":{"schema":{"type":"object","required":["image","text"],"additionalProperties":false,"properties":{"image":{"type":"string","contentEncoding":"base64","description":"The image bytes as base64 (a `data:image/…;base64,` prefix is accepted). PNG, JPEG or WebP, at most 10 MB decoded. URLs are refused."},"text":{"type":"string","minLength":1,"maxLength":64,"description":"The word as it reads in the image, exactly as printed."},"box":{"type":"array","items":{"type":"integer","minimum":0},"minItems":4,"maxItems":4,"description":"Optional: [x, y, w, h] of the word in image pixels (w and h at least 4). Default: the whole image."},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$","description":"Optional: the letters' colour as #rrggbb."}}},"example":{"image":"iVBORw0KGgoAAAANSUhEUgAA…","text":"Drukbaas","box":[120,40,380,96],"color":"#1a1a1a"}}}},"responses":{"200":{"description":"The identification. `decision` is always present; `match` unless the decision is `none`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per rolling minute for this key."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current minute."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Identification"},"examples":{"same":{"summary":"Confident identification","value":{"text":"Drukbaas","decision":"same","match":{"font":"Montserrat","file":"Montserrat[wght]","weight":700,"iou":0.9612,"edge_px":0.41,"margin":0.0718,"licence":"OFL (Google Fonts)"},"shortlist":[{"font":"Montserrat","file":"Montserrat[wght]","weight":700,"iou":0.9431,"licence":"OFL (Google Fonts)","category":"Sans Serif"},{"font":"Raleway","file":"Raleway[wght]","weight":700,"iou":0.8713,"licence":"OFL (Google Fonts)","category":"Sans Serif"}],"request_id":"req_4Jk2mP9qRs7TvWx1Yz3a"}},"none":{"summary":"No font fits","value":{"text":"Kevin","decision":"none","shortlist":[],"reason":"no candidate font has these characters","request_id":"req_8Lm3nQ0rSt1UvWx2Yz4b"}}}}}},"400":{"description":"The request is invalid; `message` names the field. Fix it before retrying. Codes: `invalid_request`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"invalid_request","message":"`text` is required: the word as it reads in the image.","docs_url":"https://whet.design/docs/api/errors#invalid_request"},"request_id":"req_4Jk2mP9qRs7TvWx1Yz3a"}}}},"401":{"description":"No key, or the key is malformed, unknown or revoked. Do not retry; get a valid key. Codes: `missing_api_key`, `invalid_api_key`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"invalid_api_key","message":"This key was revoked. Create a new one in Developers.","docs_url":"https://whet.design/docs/api/errors#invalid_api_key"},"request_id":"req_4Jk2mP9qRs7TvWx1Yz3a"}}}},"403":{"description":"The key lacks the `fonts:identify` scope. Codes: `insufficient_scope`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"insufficient_scope","message":"This key does not have the `fonts:identify` scope.","docs_url":"https://whet.design/docs/api/errors#insufficient_scope"},"request_id":"req_4Jk2mP9qRs7TvWx1Yz3a"}}}},"413":{"description":"The image is larger than 10 MB. Downscale or crop to the word. Codes: `payload_too_large`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"payload_too_large","message":"The image must be at most 10 MB.","docs_url":"https://whet.design/docs/api/errors#payload_too_large"},"request_id":"req_4Jk2mP9qRs7TvWx1Yz3a"}}}},"415":{"description":"Wrong body type, or an image Whet cannot read. Codes: `unsupported_media_type`, `unsupported_image`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"unsupported_image","message":"`image` must be a PNG, JPEG or WebP file.","docs_url":"https://whet.design/docs/api/errors#unsupported_image"},"request_id":"req_4Jk2mP9qRs7TvWx1Yz3a"}}}},"429":{"description":"A limit for this key is reached. Wait `Retry-After` seconds, then retry. Codes: `rate_limited`, `daily_limit_exceeded`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"rate_limited","message":"More than 30 requests in a minute for this key.","docs_url":"https://whet.design/docs/api/errors#rate_limited"},"request_id":"req_4Jk2mP9qRs7TvWx1Yz3a"}}}},"500":{"description":"A fault in the gateway. Retry with exponential backoff. Codes: `internal_error`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"internal_error","message":"Something failed inside the API gateway. Retry with backoff.","docs_url":"https://whet.design/docs/api/errors#internal_error"},"request_id":"req_4Jk2mP9qRs7TvWx1Yz3a"}}}},"502":{"description":"The identification service failed. Retry with exponential backoff. Codes: `upstream_error`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"upstream_error","message":"Whet’s identification service failed. Retry with backoff.","docs_url":"https://whet.design/docs/api/errors#upstream_error"},"request_id":"req_4Jk2mP9qRs7TvWx1Yz3a"}}}},"503":{"description":"The identification service is not reachable. Retry with exponential backoff. Codes: `service_unavailable`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"service_unavailable","message":"Whet’s identification service is not reachable. Retry with backoff.","docs_url":"https://whet.design/docs/api/errors#service_unavailable"},"request_id":"req_4Jk2mP9qRs7TvWx1Yz3a"}}}},"504":{"description":"Identification took longer than 60 s. Retry once; if it repeats, send a tighter `box`. Codes: `upstream_timeout`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"upstream_timeout","message":"Identification took longer than 60 s. Retry once; if it repeats, send a tighter `box` around the word.","docs_url":"https://whet.design/docs/api/errors#upstream_timeout"},"request_id":"req_4Jk2mP9qRs7TvWx1Yz3a"}}}}}}},"/jobs":{"post":{"operationId":"createJob","tags":["Jobs"],"summary":"Queue a file for Whet to make print-ready","description":"Send one file (PDF, PNG, JPEG, WebP or SVG, at most 50 MB). Whet makes it a document of its own and runs a job on it, the way a person pressing a button in the editor would: by default `print_ready` for the `dtf` target. The answer comes at once (202) with the job queued; follow it with `GET /jobs/{id}`, every 5 to 10 s.\n\nStatuses: `queued`, `running`, then one of `done` (Whet calls the file print-ready), `needs_review` (a person has to look; `reasons` says why, `document_url` opens the document), `failed` (`error` says why). Whet never asks a question here: what it would have asked becomes a reason and the job ends at `needs_review`. A fault inside Whet is retried by Whet itself, up to 3 attempts; `attempts` counts them.\n\n`metadata` is yours (an order number, a customer reference): kept with the job and given back untouched.","security":[{"apiKey":["jobs:run"]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/JobRequestForm"}},"application/json":{"schema":{"$ref":"#/components/schemas/JobRequestJson"},"example":{"file":"JVBERi0xLjcK…","filename":"flyer.pdf","target":"dtf","instructions":"Keep the thin outline.","metadata":{"order":"1042"}}}}},"responses":{"202":{"description":"Queued.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"A field is invalid; `message` names it (an unknown `action` or `target` lists the ones there are). Codes: `invalid_request`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"invalid_request","message":"target: one of ['dtf', 'generic'], or none.","docs_url":"https://whet.design/docs/api/errors#invalid_request"},"request_id":"req_4Jk2mP9qRs7TvWx1Yz3a"}}}},"401":{"description":"No key, or the key is malformed, unknown or revoked. Codes: `missing_api_key`, `invalid_api_key`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"invalid_api_key","message":"This key was revoked. Create a new one in Developers.","docs_url":"https://whet.design/docs/api/errors#invalid_api_key"},"request_id":"req_4Jk2mP9qRs7TvWx1Yz3a"}}}},"403":{"description":"The key lacks the `jobs:run` scope. Codes: `insufficient_scope`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"insufficient_scope","message":"This key does not have the `jobs:run` scope.","docs_url":"https://whet.design/docs/api/errors#insufficient_scope"},"request_id":"req_4Jk2mP9qRs7TvWx1Yz3a"}}}},"413":{"description":"The file is too large. Codes: `payload_too_large`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"payload_too_large","message":"The file must be at most 50 MB.","docs_url":"https://whet.design/docs/api/errors#payload_too_large"},"request_id":"req_4Jk2mP9qRs7TvWx1Yz3a"}}}},"415":{"description":"Wrong body type, or a file Whet cannot open. Codes: `unsupported_media_type`, `unsupported_file`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"unsupported_file","message":"Whet opens PDF, PNG, JPEG, WebP and SVG files.","docs_url":"https://whet.design/docs/api/errors#unsupported_file"},"request_id":"req_4Jk2mP9qRs7TvWx1Yz3a"}}}},"429":{"description":"Too many requests for this key. Wait `Retry-After` seconds. Codes: `rate_limited`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"rate_limited","message":"More than 30 requests in a minute for this key.","docs_url":"https://whet.design/docs/api/errors#rate_limited"},"request_id":"req_4Jk2mP9qRs7TvWx1Yz3a"}}}},"502":{"description":"The Whet service failed. Retry with backoff. Codes: `upstream_error`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"upstream_error","message":"The Whet service failed. Retry with backoff.","docs_url":"https://whet.design/docs/api/errors#upstream_error"},"request_id":"req_4Jk2mP9qRs7TvWx1Yz3a"}}}},"503":{"description":"The Whet service is not reachable. Retry with backoff. Codes: `service_unavailable`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"service_unavailable","message":"The Whet service is not reachable. Retry with backoff.","docs_url":"https://whet.design/docs/api/errors#service_unavailable"},"request_id":"req_4Jk2mP9qRs7TvWx1Yz3a"}}}}}},"get":{"operationId":"listJobs","tags":["Jobs"],"summary":"List the organisation's jobs","description":"The newest first. `status` filters; `limit` is 1 to 200 (default 50).","security":[{"apiKey":["jobs:run"]}],"parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["queued","running","needs_review","done","failed"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"The jobs.","content":{"application/json":{"schema":{"type":"object","required":["object","data"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Job"}}}}}}}}}},"/jobs/{id}":{"get":{"operationId":"getJob","tags":["Jobs"],"summary":"Where a job stands and what came out","security":[{"apiKey":["jobs:run"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^job_[0-9a-f]{12}$"}}],"responses":{"200":{"description":"The job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"404":{"description":"No such job for this key's organisation. Codes: `not_found`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"not_found","message":"No such job for this key's organisation.","docs_url":"https://whet.design/docs/api/errors#not_found"},"request_id":"req_4Jk2mP9qRs7TvWx1Yz3a"}}}}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"whet_sk_<40 base62 characters>","description":"An organisation API key from the Whet app (Developers, `/dashboard/developers`). Scopes: `fonts:identify`, `jobs:run`."}},"headers":{"RequestId":{"schema":{"type":"string","pattern":"^req_[0-9A-Za-z]{20}$"},"description":"The id of this request; quote it when you contact Whet."},"RetryAfter":{"schema":{"type":"integer","minimum":1},"description":"Seconds to wait before retrying."}},"schemas":{"JobRequestForm":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"The artwork: PDF, PNG, JPEG, WebP or SVG. The type is read from the bytes."},"action":{"type":"string","default":"print_ready","description":"What Whet does: a Whet action that needs no selection (`print_ready`, `remove_background`, `vectorise`, `split`, `retype`, `garment_versions`, `upscale_to_frame`)."},"instructions":{"type":"string","maxLength":4000,"description":"Your own words, after the action's, as a person would type them in Whet's chat."},"target":{"type":"string","default":"dtf","description":"The output target Whet checks against, or `none` for a plain design (print actions need a target)."},"name":{"type":"string","maxLength":200,"description":"The document's name. Default: the file's."},"max_usd":{"type":"number","exclusiveMinimum":0,"description":"This job's model budget in USD. Capped by Whet."},"metadata":{"type":"string","description":"A JSON object of your own, at most 8 KB, given back untouched."}}},"JobRequestJson":{"type":"object","required":["file"],"properties":{"file":{"type":"string","contentEncoding":"base64","description":"The file's bytes as base64 (a `data:` prefix is accepted). No URLs."},"filename":{"type":"string"},"action":{"type":"string","default":"print_ready"},"instructions":{"type":"string","maxLength":4000},"target":{"type":"string","default":"dtf"},"name":{"type":"string","maxLength":200},"max_usd":{"type":"number","exclusiveMinimum":0},"metadata":{"type":"object","description":"Yours, at most 8 KB, given back untouched."}}},"Job":{"type":"object","required":["id","object","status","attempts","reasons"],"properties":{"id":{"type":"string","pattern":"^job_[0-9a-f]{12}$"},"object":{"const":"job"},"status":{"type":"string","enum":["queued","running","needs_review","done","failed"],"description":"`done`: Whet calls it print-ready. `needs_review`: a person has to look (see `reasons`). `failed`: see `error`."},"action":{"type":["string","null"]},"target":{"type":["string","null"]},"name":{"type":["string","null"]},"metadata":{"type":["object","null"]},"attempts":{"type":"integer","description":"Attempts so far (Whet retries its own faults, at most 3)."},"created_at":{"type":["string","null"],"format":"date-time"},"started_at":{"type":["string","null"],"format":"date-time"},"finished_at":{"type":["string","null"],"format":"date-time"},"document_id":{"type":["string","null"],"description":"The Whet document the job works on, once it exists."},"document_url":{"type":["string","null"],"format":"uri","description":"Opens that document in Whet (members of the organisation)."},"summary":{"type":["string","null"],"description":"What Whet did, in its words."},"reasons":{"type":"array","items":{"type":"string"},"description":"Why a person has to look: a question Whet would have asked, a check that does not pass, a requirement it could not measure."},"checks":{"type":["object","null"],"description":"Final print checks counted: `{pass, review, fail}`."},"error":{"type":["string","null"],"description":"Why it failed (only when `status` is `failed`)."}}},"Identification":{"type":"object","required":["text","decision","shortlist","request_id"],"properties":{"text":{"type":"string","description":"The text that was matched (trimmed)."},"decision":{"type":"string","enum":["same","closest","none"],"description":"`same`: confident identification (the typeface, as far as an open catalogue can say). `closest`: the nearest open font, a substitute, not the font itself. `none`: no font fits; `match` is absent."},"match":{"$ref":"#/components/schemas/Match"},"shortlist":{"type":"array","maxItems":5,"items":{"$ref":"#/components/schemas/ShortlistItem"},"description":"The best font of each of the closest families, best first (at most 5). Useful to offer alternatives or when the decision is `none`."},"reason":{"type":"string","description":"Why the decision is what it is, when Whet has something to say (for example a character no candidate font has)."},"request_id":{"type":"string","description":"Same as the `X-Request-Id` header."}}},"Match":{"type":"object","description":"The single font Whet names (absent when the decision is `none`).","required":["font","file","weight","iou","edge_px","margin","licence"],"properties":{"font":{"type":"string","description":"The family as people name it, \" Italic\" appended for italics (e.g. \"Montserrat\", \"Gelasio Italic\"). The weight is in `weight`."},"file":{"type":"string","description":"The font file's identifier in the Google Fonts catalogue (e.g. \"Montserrat[wght]\" for a variable font, \"Poppins-Bold\" for a static one)."},"weight":{"type":"integer","description":"The weight (100 to 900) the word is set in."},"iou":{"type":"number","minimum":0,"maximum":1,"description":"Overlap of the set word with the word in the image after fitting size, position and spacing (1 = identical)."},"edge_px":{"type":"number","minimum":0,"description":"Average distance between the outlines, in source pixels (lower is better; under about 1 px is a tight fit)."},"margin":{"type":"number","description":"How much better this family fits than the best font of any other family (IoU difference). Small margins (< 0.03) mean similar families are hard to tell apart."},"licence":{"type":"string","description":"The font's licence, e.g. \"OFL (Google Fonts)\". \"unknown: check before use\" when the catalogue has none."}}},"ShortlistItem":{"type":"object","required":["font","file","weight","iou","licence","category"],"properties":{"font":{"type":"string","description":"Family name (\" Italic\" appended for italics)."},"file":{"type":"string","description":"The font file's identifier in the Google Fonts catalogue."},"weight":{"type":"integer"},"iou":{"type":"number","minimum":0,"maximum":1,"description":"Overlap before fine fitting (comparable within one shortlist)."},"licence":{"type":"string"},"category":{"type":"string","description":"Google Fonts category: \"Sans Serif\", \"Serif\", \"Display\", \"Handwriting\", \"Monospace\", or empty when unknown."},"also_in":{"type":"array","items":{"type":"string"},"description":"Other families with these very letters (for example another script's family built on this one)."}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","docs_url"],"properties":{"code":{"type":"string","enum":["missing_api_key","invalid_api_key","insufficient_scope","invalid_request","unsupported_media_type","unsupported_image","unsupported_file","payload_too_large","not_found","invalid_signature","automation_paused","rate_limited","daily_limit_exceeded","upstream_timeout","upstream_error","service_unavailable","internal_error"],"description":"`missing_api_key` (401): No `Authorization: Bearer whet_sk_…` header.\n`invalid_api_key` (401): The key is malformed, unknown or revoked.\n`insufficient_scope` (403): The key does not carry the scope this endpoint needs.\n`invalid_request` (400): A field is missing or invalid; the message names it.\n`unsupported_media_type` (415): The body is not multipart/form-data or application/json.\n`unsupported_image` (415): The image is not a PNG, JPEG or WebP Whet can read.\n`unsupported_file` (415): The file is not a PDF, PNG, JPEG, WebP or SVG Whet can open.\n`payload_too_large` (413): The file is larger than the endpoint allows (10 MB for images to identify, 50 MB for jobs).\n`not_found` (404): No such object for this key's organisation.\n`invalid_signature` (401): The X-Whet-Signature does not match the body, or the timestamp is more than 5 minutes off.\n`automation_paused` (409): The automation is paused; resume it in the dashboard.\n`rate_limited` (429, retryable): Too many requests for this key right now; wait `Retry-After` seconds.\n`daily_limit_exceeded` (429, retryable): The key's 24-hour quota is used up; `Retry-After` says when a slot frees.\n`upstream_timeout` (504, retryable): Identification took longer than 60 s. Retry once; crop to the word if it repeats.\n`upstream_error` (502, retryable): Whet's identification service failed. Retry with backoff.\n`service_unavailable` (503, retryable): Whet's identification service is not reachable. Retry with backoff.\n`internal_error` (500, retryable): Something failed inside the API gateway. Retry with backoff."},"message":{"type":"string","description":"What went wrong, for people. Do not parse it; branch on `code`."},"docs_url":{"type":"string","format":"uri"}}},"request_id":{"type":"string"}}}}}}