---
title: "Extract"
method: POST
path: "/extract"
---

# Extract

`POST /extract`

Extract named entities from text using a custom-defined schema.

## Request body

- object
  - `text` string, required — The input text to extract entities from.
  - `entities` object, required — A mapping of entity type names to their definition.
  - `threshold` number — Global confidence threshold (0–1).
  - `top_n` number — Global limit on results per entity type. 0 returns all above threshold.

## Response `200`

Successful extraction

- object
  - `entities` object[]
    - `text` string
    - `type` string
    - `confidence` number
    - `start` number
    - `end` number
    - `context` string

## Other responses

- `400` — Malformed request body or missing required fields.
- `401` — Missing or invalid x-api-key.
- `429` — Rate limit exceeded.
- `500` — Inference service unavailable.

---

[API](https://skmtc.dev/scaledown/apis/scaledown-api.md) · [All operations](https://skmtc.dev/scaledown/apis/scaledown-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/scaledown/scaledown-api/revisions/4289049c3ecd/schema)
