Get Classify Job
client.Classify.Get(ctx, jobID, query) (*ClassifyGetResponse, error)
GET/api/v2/classify/{job_id}
Get a classify job by ID.
Returns the job status, configuration, and classify result when complete. The result includes the matched document type, confidence score, and reasoning.
Get Classify Job
package main
import (
"context"
"fmt"
"github.com/stainless-sdks/llamacloud-prod-go"
"github.com/stainless-sdks/llamacloud-prod-go/option"
)
func main() {
client := llamacloudprod.NewClient(
option.WithAPIKey("My API Key"),
)
classify, err := client.Classify.Get(
context.TODO(),
"job_id",
llamacloudprod.ClassifyGetParams{
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", classify.ID)
}
{
"id": "id",
"configuration": {
"rules": [
{
"description": "contains invoice number, line items, and total amount",
"type": "invoice"
}
],
"mode": "FAST",
"parsing_configuration": {
"lang": "en",
"max_pages": 10,
"target_pages": "1,3,5-7"
}
},
"document_input_type": "url",
"file_input": "file_input",
"project_id": "project_id",
"status": "PENDING",
"user_id": "user_id",
"configuration_id": "configuration_id",
"created_at": "2019-12-27T18:11:19.117Z",
"error_message": "error_message",
"parse_job_id": "parse_job_id",
"result": {
"confidence": 0,
"reasoning": "reasoning",
"type": "type"
},
"transaction_id": "transaction_id",
"updated_at": "2019-12-27T18:11:19.117Z"
}Returns Examples
{
"id": "id",
"configuration": {
"rules": [
{
"description": "contains invoice number, line items, and total amount",
"type": "invoice"
}
],
"mode": "FAST",
"parsing_configuration": {
"lang": "en",
"max_pages": 10,
"target_pages": "1,3,5-7"
}
},
"document_input_type": "url",
"file_input": "file_input",
"project_id": "project_id",
"status": "PENDING",
"user_id": "user_id",
"configuration_id": "configuration_id",
"created_at": "2019-12-27T18:11:19.117Z",
"error_message": "error_message",
"parse_job_id": "parse_job_id",
"result": {
"confidence": 0,
"reasoning": "reasoning",
"type": "type"
},
"transaction_id": "transaction_id",
"updated_at": "2019-12-27T18:11:19.117Z"
}