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

# Trainieren

Trainieren Sie ein Modell zur Datenerfassung.

<div id="http-request">
  ## HTTP-Anfrage
</div>

```http theme={null}
POST https://api-{location-id}.flexicapture.com/v2/training
```

Ersetzen Sie `{location-id}` durch Ihre [unterstützte Region](/de/flexi-capture/cloud/cloud-f-cfor-invoices-api#icaas-supported-countries).

<div id="request-body">
  ## Request-Body
</div>

Der Request-Body enthält Daten mit der folgenden Struktur:

```json theme={null}
{
  "task_id": "string",
  "file_id": "string",
  "fields": [
    {
      "name": "string",
      "rectangles": [
        {
          "page_id": 0,
          "x1": 0,
          "y1": 0,
          "x2": 0,
          "y2": 0
        }
      ]
    }
  ]
}
```

<div id="fields">
  ### Felder
</div>

| Feld    | Typ                                    | Beschreibung                                       |
| ------- | -------------------------------------- | -------------------------------------------------- |
| `model` | body, object(TrainingCommandViewModel) | Erforderlich. Für das Training verwendetes Modell. |

<div id="trainingcommandviewmodel">
  ### TrainingCommandViewModel
</div>

| Feld       | Typ                           | Beschreibung                             |
| ---------- | ----------------------------- | ---------------------------------------- |
| `task_id`  | string                        | Erforderlich. Task-ID.                   |
| `file_id`  | string                        | Erforderlich. Datei-ID.                  |
| `fields[]` | object(FieldCommandViewModel) | Erforderlich. Feldsatz für das Training. |

<div id="fieldcommandviewmodel">
  ### FieldCommandViewModel
</div>

| Feld           | Typ                        | Beschreibung                       |
| -------------- | -------------------------- | ---------------------------------- |
| `name`         | string                     | Erforderlich. Feldname.            |
| `rectangles[]` | object(RectangleViewModel) | Erforderlich. Rechtecke des Felds. |

<div id="rectangleviewmodel">
  ### RectangleViewModel
</div>

| Feld      | Typ              | Beschreibung                     |
| --------- | ---------------- | -------------------------------- |
| `page_id` | integer(\$int32) | Erforderlich. Interne Seiten-ID. |
| `x1`      | integer(\$int32) | Erforderlich. Koordinate für x1. |
| `y1`      | integer(\$int32) | Erforderlich. Koordinate für y1. |
| `x2`      | integer(\$int32) | Erforderlich. Koordinate für x2. |
| `y2`      | integer(\$int32) | Erforderlich. Koordinate für y2. |

<div id="response">
  ## Antwort
</div>

Im Erfolgsfall gibt der Server den HTTP-Status `204 No Content` zurück.
