curl --request GET \
--url http://localhost:8000/v1/jobs/{job_id}/results \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:8000/v1/jobs/{job_id}/results"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:8000/v1/jobs/{job_id}/results', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/v1/jobs/{job_id}/results",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:8000/v1/jobs/{job_id}/results"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:8000/v1/jobs/{job_id}/results")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/v1/jobs/{job_id}/results")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"classification": {
"citation": "INVOICE",
"citation_page": 1,
"confidence": 0.95,
"document_type": "invoice",
"reasoning": "Document is a vendor invoice with itemized charges."
},
"document_id": "6789def0-abcd-4567-ef01-23456789abcd",
"extraction": {
"data": {
"invoice_number": "INV-2024-0892"
},
"document_type": "invoice",
"field_metadata": {},
"page_count": 2,
"validation": {
"is_valid": true
}
},
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "completed"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Get job extraction results
Retrieve full extraction results for a completed job.
Returns classification and extraction data with field-level metadata including confidence scores, page numbers, and location hints.
Args: job_id: UUID of the extraction job to retrieve results for. session_and_auth: Database session and auth context (injected).
Returns: JobResultResponse: Classification and extraction results with metadata.
Raises: HTTPException 404: Job not found or not accessible by tenant. HTTPException 400: Job not completed (status must be ‘completed’).
Notes:
- Confidence scores are self-reported by LLM and directionally useful but not calibrated (90% confidence != 90% accuracy)
- Field metadata includes page numbers and location hints for provenance
- For unknown document types, extraction may be null
curl --request GET \
--url http://localhost:8000/v1/jobs/{job_id}/results \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:8000/v1/jobs/{job_id}/results"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:8000/v1/jobs/{job_id}/results', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/v1/jobs/{job_id}/results",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:8000/v1/jobs/{job_id}/results"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:8000/v1/jobs/{job_id}/results")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/v1/jobs/{job_id}/results")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"classification": {
"citation": "INVOICE",
"citation_page": 1,
"confidence": 0.95,
"document_type": "invoice",
"reasoning": "Document is a vendor invoice with itemized charges."
},
"document_id": "6789def0-abcd-4567-ef01-23456789abcd",
"extraction": {
"data": {
"invoice_number": "INV-2024-0892"
},
"document_type": "invoice",
"field_metadata": {},
"page_count": 2,
"validation": {
"is_valid": true
}
},
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "completed"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
API Key authentication. Format: dk_test_ or dk_live_
Path Parameters
UUID of the extraction job
Response
Full extraction results with classification and field metadata
Full job result with classification and extraction data.
Extraction job identifier
Source document identifier
Job status
"completed"Classification result with reasoning
Show child attributes
Show child attributes
{
"citation": "CAPITAL CALL NOTICE - Fund IV, L.P.",
"citation_page": 1,
"confidence": 0.95,
"document_type": "capital_call",
"reasoning": "Document is a capital call notice from a private equity fund."
}
Extraction result with field metadata
Show child attributes
Show child attributes
{
"data": {
"invoice_date": "2024-12-01",
"invoice_number": "INV-2024-0892",
"total_amount": 1234.56
},
"document_type": "invoice",
"extraction_model": "google-vertex:gemini-2.5-flash",
"field_metadata": {
"invoice_number": {
"confidence": 0.98,
"location_hint": "top right header",
"page_number": 1,
"raw_text": "INV-2024-0892"
}
},
"page_count": 2,
"processing_time_ms": 3500,
"validation": {
"hard_violations": [],
"is_valid": true,
"soft_violations": []
}
}