# POST /v1/analyze

Part of the HebrewCore documentation. Web: https://hc.itsbaba.com/docs#analyze · Whole docs: https://hc.itsbaba.com/docs.md · Index: https://hc.itsbaba.com/llms.txt

`POST /v1/analyze`

Directionality only, with no language model. Pass exactly one of `text` (a single string) or `fields` (a map of name → string, ideal for annotating a whole record at once). Optional `base` is `auto` (default), `ltr`, or `rtl`.

Each analysis has two run lists. `runs` are exactly what the Unicode Bidirectional Algorithm resolves, including its known defects: in a Hebrew line, a range such as "10–20%" splits around the dash and "<5" can mirror. `display_runs` keep every left-to-right unit whole (a Latin term, a price, a number with its unit, a range, a date, a percentage, a comparison). Render `display_runs`, or use `/v1/wrap`.

## Single String

```bash
curl https://hc.itsbaba.com/v1/analyze \
  -H "Authorization: Bearer hc_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"שלום world"}'
```

## Field Map

```bash
curl https://hc.itsbaba.com/v1/analyze \
  -H "Authorization: Bearer hc_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "fields": {
      "title":    "מסמך Q3 ready",
      "subtitle": "Read the summary"
    }
  }'
```

```json
{
  "fields": {
    "title":    { "dir": "rtl", "mixed": true,  "lang": "he", "script": "Hebr",
                  "runs": [ {"text":"מסמך ","dir":"rtl",...}, {"text":"Q3 ready","dir":"ltr",...} ] },
    "subtitle": { "dir": "ltr", "mixed": false, "lang": "en", "script": "Latn", "runs": [ … ] }
  }
}
```
