Training

Create training request

Changed on

Starts training on a field and returns the request id.

The start and end locations refer to the positions of the first and last characters of an example text span that the model should learn to extract. The character positions must be given in terms of Zuva's OCR representation of the document, which can be obtained from the GET OCR layouts endpoint.

post/fields/{field_id}/train

Request

Path parameters

field_idstring required

Field ID

Request body

file_idinteger[] required

Example request

[
  {
    "locations": [
      {
        "end": 456,
        "start": 123
      }
    ]
  }
]

Response

The status of the training request

field_idstring required
request_idstring required
status'queued' | 'processing' | 'complete' | 'failed' required

Example response

{
  "error": {
    "error": {
      "code": "http-error",
      "message": "Something went wrong, please try again later."
    }
  },
  "field_id": "12345678-1234-1234-1234-123456789012",
  "request_id": "c5e463f1qk154j5e3sjg",
  "status": "complete",
  "span_issues": [
    {
      "file_id": "cdcpbqd9j3v1l06vsds0",
      "span_problems": [
        {
          "issue_type": "Invalid Span"
        }
      ]
    }
  ]
}

Changes