---
title: "Detect the text in an image (free; use with the replace_text edit)"
method: POST
path: "/images/text-detections"
---

# Detect the text in an image (free; use with the replace_text edit)

`POST /images/text-detections`

## Request

- Base URL: `https://scifig.ai/api/v1`
- URL: `https://scifig.ai/api/v1/images/text-detections`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://scifig.ai/api/auth/oauth2/authorize`, token URL `https://scifig.ai/api/auth/oauth2/token`, scopes: `images:edit`)

## Headers

- `Idempotency-Key` string, required

## Request body

- object
  - `image` string, uuid, required

## Response `200`

Detected text, in reading order

- TextDetection
  - `id` string, uuid, required
  - `object` 'text_detection', required
  - `width` integer, required
  - `height` integer, required
  - `texts` object[], required
    - `index` integer
    - `text` string
    - `corners` object[]
      - `x` number
      - `y` number

## Other responses

- `413`: The request body or an uploaded file is over the limit (details.max_bytes).
- `429`: RATE_LIMITED (per-minute window, or a daily limit named in details.reason, e.g. DAILY_CONVERSION_LIMIT) or CONCURRENCY_LIMITED (too many running tasks). Wait Retry-After seconds and retry with the same Idempotency-Key.
- `default`: Error. Branch on error.code; never parse message. 503 responses carry Retry-After.

---

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