# Whet API

Whet's print tools over HTTP, starting with font identification. One key per organisation, a scope per API, the same errors everywhere.

## Base URL

```text
https://whet.design/api/v1
```

## Authentication

Create a key in the Whet app under [Developers](https://whet.design/dashboard/developers). Keys belong to your organisation, not to a person, start with `whet_sk_` and are shown once. Keep them on a server, never in a browser or an app bundle.

```http
Authorization: Bearer whet_sk_…
```

## Quick start

1. Sign in and create a key under [Developers](https://whet.design/dashboard/developers).
2. Export it as `WHET_API_KEY` and send one request.
3. Read `decision` in the answer before anything else.

```bash
curl https://whet.design/api/v1/fonts/identify \
  -H "Authorization: Bearer $WHET_API_KEY" \
  -F image=@word.png \
  -F text="MOTORS"
```

## APIs

| API | Endpoint | Scope | Status |
| --- | --- | --- | --- |
| [Font identification](https://whet.design/docs/fonts/identify) | `POST /api/v1/fonts/identify` | `fonts:identify` | Beta · free |
| Logo vectorising | `POST /api/v1/logos/vectorise` | `logos:vectorise` | Not yet available |
| Background removal | `POST /api/v1/artwork/remove-background` | `artwork:remove-background` | Not yet available |
| Preflight | `POST /api/v1/artwork/preflight` | `artwork:preflight` | Not yet available |

## Rate limits

Free during beta. Per key: 30 requests per rolling minute, 4 in flight at once and 1,000 successful identifications per rolling 24 hours. Over a limit the API answers `429` with `Retry-After` in seconds.

## Request ids

Every response carries `X-Request-Id`, and JSON bodies a `request_id`. Log it; quote it when you ask about an answer.

## Errors

Errors are JSON with a stable `code`, a `message` for people and a `docs_url`. Branch on the code. The full list, with which ones to retry: [Errors](https://whet.design/docs/api/errors).

## Versioning

The version is in the path: `/api/v1`. Fields may be added to an answer at any time; within v1 none is removed or renamed, and the meaning of a field does not change.

## For agents and tools

- [/llms.txt](https://whet.design/llms.txt): every API on one page, for any model.
- [/api/v1/openapi.json](https://whet.design/api/v1/openapi.json): the OpenAPI 3.1 contract.
- Every docs page as Markdown: its address plus `.md`, such as [/docs.md](https://whet.design/docs.md).
- [Docs for agents](https://whet.design/docs/agents): how an agent should call Whet and what it may tell a customer.

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