---
title: "Entity links in a text (format=html: the text linked)"
method: POST
path: "/annotate"
---

# Entity links in a text (format=html: the text linked)

`POST /annotate`

## Request

- Base URL: `https://www.edgechat.ai/api/v1`
- URL: `https://www.edgechat.ai/api/v1/annotate`
- Auth: none declared

## Query parameters

- `format` 'json' | 'html'
- `fields` string

## Request body

- object
  - `text` string, required

## Response `200`

The entities

- AnnotateResponse
  - `html` string
  - `entities` Mention[]
    - `id` string
    - `slug` string
    - `title` string
    - `url` string
    - `api_url` string
    - `importance` number
    - `rank` integer
    - `start` integer: Offset of the first character in UTF-16 code units (JavaScript string indices), as `end`. In Python, slice text.encode("utf-16-le")[2*start:2*end] and decode, or count code points yourself when the text has characters outside the Basic Multilingual Plane (emoji).
    - `end` integer: Offset just past the last character, in UTF-16 code units.
    - `surface` string
    - `confidence` number
  - `credit` string
  - `license` object
    - `name` string, required
    - `url` string, required
    - `summary` string, required

## Other responses

- `400`: Bad request
- `413`: More than 20,000 characters
- `429`: Rate limited
- `503`: The derived data this route reads is not published yet

---

[API](https://skmtc.dev/edgechat/apis/edgepedia-api.md) · [All operations](https://skmtc.dev/edgechat/apis/edgepedia-api/llms.txt) · [OpenAPI document](https://skmtc.dev/edgechat/apis/edgepedia-api/revisions/cd4eb5972d56?raw)
