const options = {
method: "GET",
headers: {
"x-api-key": "<your-api-key>",
"Content-Type": "application/json",
},
};
fetch("https://api.getomni.ai/classification/<classification-id>", options)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));
{
"classification": {
"id": "62faa34f-1229-4d20-8008-ce1e7830397b",
"name": "Financial Document Classification",
"options": [
{
"id": "4e3598e3-3ee2-423b-820e-176f4547ac4b",
"name": "BANK_STATEMENT",
"examples": [
{
"id": "646c7c86-1fa4-433a-a224-7ea552653f9e",
"name": "bank-statement.pdf",
"type": "application/pdf",
"url": "https://example.com/bank-statement.pdf"
}
]
}
]
}
}
Retrieves a classification and its associated options and examples
const options = {
method: "GET",
headers: {
"x-api-key": "<your-api-key>",
"Content-Type": "application/json",
},
};
fetch("https://api.getomni.ai/classification/<classification-id>", options)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));
{
"classification": {
"id": "62faa34f-1229-4d20-8008-ce1e7830397b",
"name": "Financial Document Classification",
"options": [
{
"id": "4e3598e3-3ee2-423b-820e-176f4547ac4b",
"name": "BANK_STATEMENT",
"examples": [
{
"id": "646c7c86-1fa4-433a-a224-7ea552653f9e",
"name": "bank-statement.pdf",
"type": "application/pdf",
"url": "https://example.com/bank-statement.pdf"
}
]
}
]
}
}
This API endpoint retrieves a classification by ID, including its classification options and associated examples.
Unique identifier of the classification to retrieve.
The classification object, including options and examples.
Show classification
Unique identifier for the classification.
Name of the classification.
List of classification options, each containing examples.
const options = {
method: "GET",
headers: {
"x-api-key": "<your-api-key>",
"Content-Type": "application/json",
},
};
fetch("https://api.getomni.ai/classification/<classification-id>", options)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));
{
"classification": {
"id": "62faa34f-1229-4d20-8008-ce1e7830397b",
"name": "Financial Document Classification",
"options": [
{
"id": "4e3598e3-3ee2-423b-820e-176f4547ac4b",
"name": "BANK_STATEMENT",
"examples": [
{
"id": "646c7c86-1fa4-433a-a224-7ea552653f9e",
"name": "bank-statement.pdf",
"type": "application/pdf",
"url": "https://example.com/bank-statement.pdf"
}
]
}
]
}
}