Skip to main content
POST
/
api
/
v2
/
documents
/
legacy
/
reason
Python
import os
from samplehc import SampleHealthcare

client = SampleHealthcare(
    api_key=os.environ.get("SAMPLEHC_API_KEY"),  # This is the default and can be omitted
)
response = client.v2.documents.legacy.reason(
    documents=[{
        "id": "id",
        "file_name": "fileName",
    }],
    task={
        "id": "id",
        "description": "description",
        "label": "label",
        "type": "reasoning",
    },
)
print(response.async_result_id)
{
  "asyncResultId": "<string>"
}

Body

application/json
documents
object[]
required

An array of documents to apply reasoning to.

task
object
required

The task schema defining the reasoning process.

Response

Accepted. Legacy reasoning process initiated.

Accepted. Legacy reasoning process initiated.

asyncResultId
string
required

The ID to track the asynchronous reasoning task.