Python
import os
from meibel import MeibelClient
client = MeibelClient(api_key=os.environ["MEIBEL_API_KEY"])
status = client.documents.get_status(job_id="doc_job_7f3a9c2e")
print(f"Status: {status.status}")
if status.status == "completed":
print(f"Pages: {status.pages}, Tables: {status.tables}, Confidence: {status.confidence}")
elif status.status == "failed":
print(f"Error: {status.error}")import { MeibelClient } from "meibel";
const client = new MeibelClient({ apiKey: process.env.MEIBEL_API_KEY });
const status = await client.documents.getStatus("job_8f3d2a91");
console.log(`Status: ${status.status}`);
if (status.status === "completed") {
console.log(`Parsed ${status.pages} pages, ${status.tables} tables (confidence: ${status.confidence})`);
} else if (status.status === "failed") {
console.log(`Job failed: ${status.error}`);
}package main
import (
"context"
"fmt"
"os"
v2 "github.com/meibel-ai/meibel-go/v2"
)
func main() {
client := v2.NewClient(v2.WithAPIKey(os.Getenv("MEIBEL_API_KEY")))
status, err := client.Documents.GetStatus(context.Background(), "job_9f3c2a1b8e")
if err != nil {
panic(err)
}
fmt.Printf("Status: %s (pages: %v, tables: %v)\n", status.Status, status.Pages, status.Tables)
}curl --request GET \
--url https://api.meibel.ai/v2/documents/{job_id} \
--header 'Meibel-API-Key: <api-key>'const options = {method: 'GET', headers: {'Meibel-API-Key': '<api-key>'}};
fetch('https://api.meibel.ai/v2/documents/{job_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.meibel.ai/v2/documents/{job_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Meibel-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.meibel.ai/v2/documents/{job_id}")
.header("Meibel-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meibel.ai/v2/documents/{job_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Meibel-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"status": "<string>",
"format": "<string>",
"pages": 123,
"elements": 123,
"tables": 123,
"confidence": 123,
"processing_time_ms": 123,
"error": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Documents
Get document parsing status
Check the status of a document parsing job, including progress statistics.
GET
/
documents
/
{job_id}
Python
import os
from meibel import MeibelClient
client = MeibelClient(api_key=os.environ["MEIBEL_API_KEY"])
status = client.documents.get_status(job_id="doc_job_7f3a9c2e")
print(f"Status: {status.status}")
if status.status == "completed":
print(f"Pages: {status.pages}, Tables: {status.tables}, Confidence: {status.confidence}")
elif status.status == "failed":
print(f"Error: {status.error}")import { MeibelClient } from "meibel";
const client = new MeibelClient({ apiKey: process.env.MEIBEL_API_KEY });
const status = await client.documents.getStatus("job_8f3d2a91");
console.log(`Status: ${status.status}`);
if (status.status === "completed") {
console.log(`Parsed ${status.pages} pages, ${status.tables} tables (confidence: ${status.confidence})`);
} else if (status.status === "failed") {
console.log(`Job failed: ${status.error}`);
}package main
import (
"context"
"fmt"
"os"
v2 "github.com/meibel-ai/meibel-go/v2"
)
func main() {
client := v2.NewClient(v2.WithAPIKey(os.Getenv("MEIBEL_API_KEY")))
status, err := client.Documents.GetStatus(context.Background(), "job_9f3c2a1b8e")
if err != nil {
panic(err)
}
fmt.Printf("Status: %s (pages: %v, tables: %v)\n", status.Status, status.Pages, status.Tables)
}curl --request GET \
--url https://api.meibel.ai/v2/documents/{job_id} \
--header 'Meibel-API-Key: <api-key>'const options = {method: 'GET', headers: {'Meibel-API-Key': '<api-key>'}};
fetch('https://api.meibel.ai/v2/documents/{job_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.meibel.ai/v2/documents/{job_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Meibel-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.meibel.ai/v2/documents/{job_id}")
.header("Meibel-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meibel.ai/v2/documents/{job_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Meibel-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"status": "<string>",
"format": "<string>",
"pages": 123,
"elements": 123,
"tables": 123,
"confidence": 123,
"processing_time_ms": 123,
"error": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Path Parameters
Response
Successful Response
Returned from GET /documents/{job_id}.
Was this page helpful?
⌘I