POST
/
extract_text_from_golden
/
{type-name}
curl --request POST \
  --url https://api.sensible.so/v0/extract_text_from_golden/{type-name} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "golden": "best_scan_doc_num_1234",
  "configuration": {
    "fields": []
  }
}'
{
  "pages": [
    {
      "width": 8.5,
      "height": 11,
      "rotation": 0,
      "transform": {
        "a": 1,
        "c": 0,
        "e": 0,
        "b": 0,
        "d": 1,
        "f": 0
      },
      "lines": [
        {
          "text": "Extract your first data",
          "boundingPolygon": [
            {
              "x": 1.111,
              "y": 0.472
            },
            {
              "x": 4.661,
              "y": 0.472
            },
            {
              "x": 4.661,
              "y": 0.806
            },
            {
              "x": 1.111,
              "y": 0.806
            }
          ]
        },
        {
          "text": "Hello world!",
          "boundingPolygon": [
            {
              "x": 0.444,
              "y": 1.792
            },
            {
              "x": 2.07,
              "y": 1.792
            },
            {
              "x": 2.07,
              "y": 2.083
            },
            {
              "x": 0.444,
              "y": 2.083
            }
          ]
        },
        {
          "text": "Inside documents,",
          "boundingPolygon": [
            {
              "x": 4.25,
              "y": 2.042
            },
            {
              "x": 5.982,
              "y": 2.042
            },
            {
              "x": 5.982,
              "y": 2.236
            },
            {
              "x": 4.25,
              "y": 2.236
            }
          ]
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

Sensible uses API keys to authenticate requests. Keep your API keys secure and do not share them publicly accessible areas such as GitHub, client-side code, etc. Authentication to the API is performed via Bearer Authentication. Provide your API key as the bearer auth value.

Path Parameters

type-name
string
required

User-friendly name for a document type

Body

application/json
golden
string

user-friendly name for the reference document

configuration
object

SenseML configuration as a JSON object, not stringified JSON, for example, "configuration": {"fields":[]}. If you leave out this parameter, then Sensible returns the best-scoring extraction from the configurations in the document type. If you specify it, Sensible ignores the environment parameter.

Response

200
application/json
All the text in the document

all the text in the document, standardized as an array of pages with lines and their metadata, including positioning