Skip to main content
POST
/
api
/
v2
/
documents
/
extract
Python
from samplehc import SampleHealthcare

client = SampleHealthcare(
    api_key="My API Key",
)
response = client.v2.documents.extract(
    documents=[{
        "id": "id",
        "file_name": "fileName",
    }],
    prompt="prompt",
    response_json_schema={
        "foo": "bar"
    },
)
print(response.async_result_id)
{
  "asyncResultId": "<string>"
}

Body

application/json
documents
object[]
required

An array of documents to extract data from.

responseJsonSchema
object
required

A JSON schema defining the structure of the desired extraction output.

prompt
string
required

A prompt guiding the extraction process.

reasoningEffort
enum<string>

Optional control over the reasoning effort for extraction.

Available options:
low,
medium,
high
model
enum<string>
default:reasoning-3-mini

The model to use for extraction.

Available options:
reasoning-3-mini,
reasoning-3,
base-5,
base-5-mini,
base-5-nano
priority
enum<string>
default:interactive

The priority of the extraction task. Non-interactive is lower priority.

Available options:
interactive,
non-interactive

Response

Accepted. Advanced extraction process initiated.

asyncResultId
string
required

The ID to track the asynchronous extraction task.

I