> ## Documentation Index
> Fetch the complete documentation index at: https://www.mixfont.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Font recognition

> Identify close open-source font matches from an image

Font recognition analyzes a public image URL, detects the largest readable word, and returns ranked open-source font matches.

Use font recognition when you want to identify type from screenshots, logos, posters, packaging, and other flattened design references.

## Request

Send a public `http://` or `https://` image URL to the font recognition endpoint. The image response must be an image file and no larger than 10 MB.

```bash theme={null}
curl https://api.mixfont.com/v1/api/lens \
  -H "Content-Type: application/json" \
  -H "x-api-key: $MIXFONT_API_KEY" \
  -d '{
    "image_url": "https://images.example.com/wordmark.png",
    "top_k": 3
  }'
```

`top_k` is optional. It defaults to `3` and must be an integer from `1` to `10`.

## Response

The response includes the detected word, its bounding box, the analyzed image dimensions, ranked font matches, and a request id when available.

```json theme={null}
{
  "word": "Mixfont",
  "word_box": {
    "left": 140,
    "top": 96,
    "width": 412,
    "height": 104
  },
  "input_image": {
    "width": 1600,
    "height": 900,
    "image_url": "https://images.example.com/wordmark.png"
  },
  "font_matches": [
    {
      "name": "Inter",
      "score": 0.83,
      "fonts": [
        {
          "full_name": "Inter Regular",
          "style": "normal",
          "weight": 400,
          "url": "https://static.mixfont.com/fonts/inter/Inter-Regular.ttf"
        }
      ]
    }
  ],
  "requestId": "7d58a66d-f129-4f9a-bf9a-4f2c6d0c3e4d"
}
```

<Card title="Font recognition API reference" icon="scan-search" href="/docs/api-reference/font-recognition" horizontal>
  Review request parameters, response fields, authentication, and errors.
</Card>
