import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.batches.get({
batchId: "batch_aa87e2b1112a455b8deabed784372198",
});
console.log(result);
}
run();{
"id": "batch_aa87e2b1112a455b8deabed784372198",
"object": "batch",
"endpoint": "/v1/chat/completions",
"errors": null,
"input_file_id": "file_abc123",
"completion_window": "24h",
"status": "completed",
"output_file_id": "file_def456",
"error_file_id": null,
"created_at": 1704067200,
"in_progress_at": 1704067260,
"expires_at": 1704153600,
"finalizing_at": 1704070800,
"completed_at": 1704070860,
"failed_at": null,
"expired_at": null,
"cancelling_at": null,
"cancelled_at": null,
"request_counts": {
"total": 3,
"completed": 3,
"failed": 0
},
"metadata": {
"description": "evaluation job"
}
}Retrieves a batch by its ID.
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.batches.get({
batchId: "batch_aa87e2b1112a455b8deabed784372198",
});
console.log(result);
}
run();{
"id": "batch_aa87e2b1112a455b8deabed784372198",
"object": "batch",
"endpoint": "/v1/chat/completions",
"errors": null,
"input_file_id": "file_abc123",
"completion_window": "24h",
"status": "completed",
"output_file_id": "file_def456",
"error_file_id": null,
"created_at": 1704067200,
"in_progress_at": 1704067260,
"expires_at": 1704153600,
"finalizing_at": 1704070800,
"completed_at": 1704070860,
"failed_at": null,
"expired_at": null,
"cancelling_at": null,
"cancelled_at": null,
"request_counts": {
"total": 3,
"completed": 3,
"failed": 0
},
"metadata": {
"description": "evaluation job"
}
}Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.
OK
validating, failed, in_progress, finalizing, completed, expired, cancelling, cancelled -9007199254740991 <= x <= 9007199254740991Show child attributes
Show child attributes
-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991Show child attributes
Was this page helpful?