Python
job = client.batches.create(model="tacet-alpha", input_file="tickets.jsonl")
print(job.id, job.status)import fs from "node:fs";
const job = await client.batches.create({
model: "tacet-alpha",
inputFile: fs.createReadStream("tickets.jsonl"),
});
console.log(job.id, job.status);
curl https://api.tacetai.com/v1/batches \
-H "Authorization: Bearer $TACET_API_KEY" \
-F model=tacet-alpha \
-F file=@tickets.jsonl
{
"id": "batch_3k9x2m",
"model": "<string>",
"status": "queued",
"progress": {
"total": 123,
"completed": 123,
"failed": 123
},
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
}{
"code": "invalid_question",
"message": "<string>"
}{
"code": "invalid_question",
"message": "<string>"
}{
"code": "invalid_question",
"message": "<string>"
}{
"code": "invalid_question",
"message": "<string>"
}Batches
Create a batch
Start a job from a JSONL file with one record per line. See the batch guide for the file format.
POST
/
v1
/
batches
Python
job = client.batches.create(model="tacet-alpha", input_file="tickets.jsonl")
print(job.id, job.status)import fs from "node:fs";
const job = await client.batches.create({
model: "tacet-alpha",
inputFile: fs.createReadStream("tickets.jsonl"),
});
console.log(job.id, job.status);
curl https://api.tacetai.com/v1/batches \
-H "Authorization: Bearer $TACET_API_KEY" \
-F model=tacet-alpha \
-F file=@tickets.jsonl
{
"id": "batch_3k9x2m",
"model": "<string>",
"status": "queued",
"progress": {
"total": 123,
"completed": 123,
"failed": 123
},
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
}{
"code": "invalid_question",
"message": "<string>"
}{
"code": "invalid_question",
"message": "<string>"
}{
"code": "invalid_question",
"message": "<string>"
}{
"code": "invalid_question",
"message": "<string>"
}Authorizations
Create a key in the Tacet console. Keep it on your server; never ship it in a browser or app.
Body
multipart/form-data
Response
The new job.