Skip to main content
POST
/
api
/
v1
/
llm
/
vector_stores
/
{vector_store_id}
/
file_batches
/
{batch_id}
/
cancel
Typescript (SDK)
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.llm.vectorStores.cancelFileBatch({
    vectorStoreId: "vs_abc123",
    batchId: "vsfb_abc123",
  });

  console.log(result);
}

run();
{
  "id": "vsfb_abc123",
  "object": "vector_store.file_batch",
  "created_at": 1704067200,
  "vector_store_id": "vs_abc123",
  "status": "cancelled",
  "file_counts": {
    "in_progress": 0,
    "completed": 0,
    "failed": 0,
    "cancelled": 3,
    "total": 3
  }
}

Authorizations

Authorization
string
header
required

Authenticate with your MKA1 API key at the API gateway: Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, also send X-On-Behalf-Of to identify the end user making the request.

Headers

X-On-Behalf-Of
string

Optional external user identifier for multi-user server-side integrations. Use this when acting on behalf of one of your end users.

Path Parameters

vector_store_id
string
required

The ID of the vector store that the file batch belongs to.

batch_id
string
required

The ID of the file batch to cancel.

Response

200 - application/json

OK

A batch of files attached to a vector store.

id
string
required

The identifier, which can be referenced in API endpoints.

object
any
required

The object type, which is always 'vector_store.file_batch'.

created_at
integer
required

The Unix timestamp (in seconds) for when the vector store files batch was created.

Required range: -9007199254740991 <= x <= 9007199254740991
vector_store_id
string
required

The ID of the vector store that the File is attached to.

status
enum<string>
required

The status of the vector store files batch. 'in_progress' means files are being processed, 'completed' means all files have been processed, 'cancelled' means the batch was cancelled, 'failed' means the batch failed.

Available options:
in_progress,
completed,
cancelled,
failed
file_counts
object
required

File processing status counts.