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>"
}{
"error": "<string>",
"message": "<string>",
"statusCode": 123,
"details": {}
}{
"error": "<string>"
}{
"error": "<string>"
}Document
Document reasoning (async)
Initiates an asynchronous document reasoning process based on a task. Returns an ID for tracking.
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>"
}{
"error": "<string>",
"message": "<string>",
"statusCode": 123,
"details": {}
}{
"error": "<string>"
}{
"error": "<string>"
}Body
application/json
Response
Accepted. Legacy reasoning process initiated.
The ID to track the asynchronous reasoning task.