API quickstart
Quick start guide for the Sensible API
Introduction
In this quickstart, use an example SenseML configuration and example document to get a quick "hello world" API response.
- To get started with extracting from your custom documents, see Getting Started.
Extract example document data
To run an API call and return extracted, structured data from a downloaded example document:
-
Get an account at sensible.so.
NOTE In the Sensible app, don't rename the example doc type (layout_basics) or delete the 1_extract_your_first_data config, or this example fails.
-
Copy your API key from your account page.
-
Copy the following code example into a plain-text application and replace
*YOUR_API_KEY*with your API key:
curl -L https://raw.githubusercontent.com/sensible-hq/sensible-docs/v0/assets/pdfs/1_extract_your_first_data.pdf --output 1_extract_your_first_data.pdf && curl --request POST --url "https://api.sensible.so/v0/extract/layout_basics" --header "Authorization: Bearer YOUR_API_KEY" --header "Content-Type: application/pdf" --data-binary "@1_extract_your_first_data.pdf"
- Run the code sample in a command prompt. The code downloads an example document (
1_extract_your_first_data.pdf) and runs it against an example document type (layout_basics). The following excerpt of the API response shows the extracted document text in theparsed_documentobject:
{
"id": "ef23d619-9955-473e-b00f-df18377c222b",
"created": "2026-08-17T22:38:37.862Z",
"completed": "2026-08-17T22:38:38.055Z",
"status": "COMPLETE",
"type": "layout_basics",
"configuration": "hello_world",
"configuration_version": "ErBhdAGhknW_EBuOa1j0ZaxTpgyK_rfw",
"environment": "production",
"page_count": 1,
"parsed_document": {
"your_first_extracted_field": {
"type": "string",
"value": "Welcome to your first document"
}
},
"validations": [],
"validation_summary": {
"fields": 1,
"fields_present": 1,
"errors": 0,
"warnings": 0,
"skipped": 0
},
"classification_summary": [
{
"configuration": "hello_world",
"score": {
"value": 1,
"fields_present": 1,
"penalties": 0
}
}
],
"errors": [],
"content_type": "application/pdf",
"file_metadata": {
"info": {}
},
"coverage": 1,
"charged": 1,
"actor": "api_key: in ubuntu, probook 645",
"version_id": "haTpXTezsD4Fh7zY.WtZPfjP33T8KydB"
}(Optional) See how it works in the Sensible app
To see this example in the Sensible app:
-
Log into the Sensible app.
-
Navigate to the first tutorial config.
-
Visually examine the example document (middle pane), config (left pane), and extracted data (right pane) to better understand the API call you just ran:
Next
- See the API reference and example code
- If you're new to APIs, see API tutorials
- To get started with authoring extraction configurations, or configs, for your custom documents, see Getting Started.
Updated 3 days ago