# Identify a font

Send one word from an artwork and the text it reads. Whet answers with a decision, a single match and a shortlist of the closest open font families.

Status: Beta.

```http
POST https://whet.design/api/v1/fonts/identify
```

Scope `fonts:identify`. Each answer takes 9 to 14 seconds: set a client timeout of at least 70 seconds, and send several words at once (up to the in-flight limit) rather than one after another.

## Request

Send the image as `multipart/form-data`, or as base64 in `application/json`. One word or one line per request; crop to it, or pass its `box`.

| Field | Type | Description |
| --- | --- | --- |
| `image` (required) | file · base64 | PNG, JPEG or WebP, at most 10 MB. Transparency reads as white. No image URLs. |
| `text` (required) | string | The word exactly as it reads, case and punctuation included, 1 to 64 characters. A misread word fits no font: expect `none`. |
| `box` | `x,y,w,h` · `[x, y, w, h]` | The word's box in image pixels. Default: the whole image. |
| `color` | `#rrggbb` | The letters' ink. Default: the colour least like the box's border. |

```bash
curl https://whet.design/api/v1/fonts/identify \
  -H "Authorization: Bearer $WHET_API_KEY" \
  -F image=@logo.png \
  -F text="MOTORS" \
  -F box="12,40,380,96"
```

```json
{
  "image": "iVBORw0KGgo…",
  "text": "MOTORS",
  "box": [12, 40, 380, 96]
}
```

## Decisions

Read `decision` first. It says how far `match` may be trusted.

| decision | Means | Tell your customer |
| --- | --- | --- |
| `same` | The outline fits the word closely (IoU at least 0.93, and at least 0.90 before letters are moved to fit), beats the best font of every other family by at least 0.03, and the word is at least 30 px tall. | “Set in Rubik ExtraBold.” |
| `closest` | A good fit that is not provably the font: usually a commercial typeface such as Futura or Impact, a lookalike family, or a word too small or blurred to tell. | “Closest open font: Jost Medium.” Never “this is”. |
| `none` | No font fits. There is no `match`; the shortlist is still ranked. | “No match yet. A person will look at it.” |

## Response

```json
{
  "text": "MOTORS",
  "decision": "closest",
  "match": {
    "font": "Mona Sans",
    "file": "MonaSans[wdth,wght]",
    "weight": 900,
    "iou": 0.903,
    "edge_px": 1.12,
    "margin": 0.013,
    "licence": "OFL (Google Fonts)"
  },
  "shortlist": [
    { "font": "Mona Sans", "file": "MonaSans[wdth,wght]", "weight": 900, "iou": 0.903,
      "licence": "OFL (Google Fonts)", "category": "Sans Serif" },
    { "font": "Archivo Black", "file": "ArchivoBlack-Regular", "weight": 400, "iou": 0.89,
      "licence": "OFL (Google Fonts)", "category": "Sans Serif", "also_in": ["Archivo"] }
  ],
  "request_id": "req_…"
}
```

| Field | Description |
| --- | --- |
| `decision` | `same`, `closest` or `none`, as above. |
| `match` | The single font, unless `decision` is `none`: `font`, `file`, `weight` (400 to 900), `iou`, `edge_px`, `margin`, `licence`. |
| `match.iou` | How much of the word the font's outline covers, 0 to 1. Above 0.95 is a close fit. |
| `match.margin` | How far the font beats the best font of any other family. A small margin means lookalikes. |
| `match.edge_px` | Mean distance between the two outlines, in source pixels. |
| `shortlist` | Up to 5 families, best first, each with `font`, `file`, `weight`, `iou`, `licence`, `category`. `also_in` lists families that share these exact letters (another script's family built on it). |
| `reason` | Present when Whet found something worth knowing, such as ink beside the word that the text leaves out (a missing apostrophe). |
| `request_id` | The request's id, also in `X-Request-Id`. |

## The font catalogue

1,478 Latin font families from Google Fonts, regular to black, uprights and italics, all under open licences (OFL, Apache 2.0, UFL): free to set, stitch and print. Commercial fonts such as Futura, Helvetica, Impact and Avenir are not in it. They come back as `closest`, with their nearest open substitute.

## How well it works

Benchmark, October 2026: 1,032 words, 888 set in catalogue fonts and 144 in commercial fonts that are not. Whet answered `same` for 86% of clean words, 59% of JPEG and 19% of 32 px ones, and those answers named the right family 98 to 99% of the time. No word set in a commercial font was called `same`. The right family is in the shortlist for 94 to 99% of words.

Not yet measured on photos of stitched garments, scans, or rotated and arched text. Rotated text is not handled yet: straighten the word first, or expect `none`.

---
This page as HTML: https://whet.design/docs/fonts/identify. All docs for agents: https://whet.design/llms.txt
