> ## Documentation Index
> Fetch the complete documentation index at: https://docs.levanto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Extraction response

> Values, where each was found, and how likely it is.

## Values

`values` has the shape of your `extract`: every field in request order, `null` when a value is absent or undecided, a list for every-mention fields.

```json theme={"theme":"github-light"}
{
  "values": {
    "vendor": "Nordlicht GmbH",
    "total": {"amount": 540.0, "currency": "EUR"},
    "due_date": "2026-11-21",
    "products": ["Espresso machine service", "Descaling kit"]
  },
  "results": { ... },
  "meta": { ... }
}
```

## Results

`results` has the same keys. Each says where the value was found (`text`, and `start`/`end` as character offsets into `content`) and how likely it is:

```json theme={"theme":"github-light"}
"total": {
  "value": {"amount": 540.0, "currency": "EUR"},
  "text": "540.00 EUR",
  "start": 157,
  "end": 167,
  "probability": 0.9863,
  "probabilities": [
    {"value": {"amount": 540.0, "currency": "EUR"}, "text": "540.00 EUR", "start": 157, "end": 167, "probability": 0.9863},
    {"value": null, "probability": 0.0137}
  ]
}
```

`probabilities` lists every candidate, then `null` (not in the text). They sum to 1, so you can set your own bar.

## Not found, not sure

| Case | `value` | `probability` |
| - | - | - |
| Found | the value | how likely it is |
| Not in the text | `null` | how likely it is absent |
| Too close to call | `null` | `null` |

When the text has candidates but none reads as the type, the result also carries `parse_error`, saying what it found.

## Every mention

A list field returns every mention in document order, each with its own offsets and probability. With a bare question, `values` is the answer itself:

```bash theme={"theme":"github-light"}
curl -s https://api.levanto.ai/v1/extract \
  -H "Authorization: Bearer $LEVANTO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "content": "Book a table for four at eight tonight. My partner is vegetarian and I cannot eat nuts.",
  "extract": ["What dietary needs are mentioned?"]
}'
```

```json theme={"theme":"github-light"}
{
  "values": ["vegetarian", "cannot eat nuts"],
  "results": {
    "values": [
      {"value": "vegetarian", "text": "vegetarian", "start": 54, "end": 64, "probability": 0.983},
      {"value": "cannot eat nuts", "text": "cannot eat nuts", "start": 71, "end": 86, "probability": 0.8496}
    ]
  },
  "meta": { ... }
}
```

When there is no mention, the list is empty.

## Usage

`meta.usage.input_tokens` counts what Sage reads for each document: your content, field names and definitions. `output_tokens` is the size of the response.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.