For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Logo
AI Hub
OverviewApp editorFlow editorAdminAPI & SDK
AI Hub
OverviewApp editorFlow editorAdminAPI & SDK
  • Overview
    • Using the API and SDK
    • Authorization
    • Response statuses
  • API & SDK guides
    • Run automation apps by SDK
  • API reference
      • POSTCreate batch
      • GETList batches
      • GETGet batch information
      • DELDelete batch
      • PUTUpload file to batch
      • GETList files in a batch
      • DELDelete file from batch
      • GETPoll batches job
      • POSTStart multipart upload session
      • PUTUpload part to multipart session
      • POSTCommit or abort multipart session
  • Legacy APIs
    • Job status
    • Run apps
    • Run results
    • Mount
API referenceBatches

Create batch

POST
https://aihub.instabase.com/api/v2/batches
POST
/api/v2/batches
$curl "${API_ROOT}/v2/batches" \
> -H "Authorization: Bearer ${API_TOKEN}" \
> -H "IB-Context: ${IB_CONTEXT}" \
> -H "Content-Type: application/json" \
> -d '{"name": "test"}'
200Successful
1{
2 "id": 1024
3}
Create a new batch. <Note>[Upload files to the batch](/api-sdk/api-reference/batches/add-file-to-batch) in a separate request.</Note>
Was this page helpful?
Previous

List batches

Next
Built with

Create a new batch.

Upload files to the batch in a separate request.

Authentication

AuthorizationBearer
Bearer HTTP authentication.

Headers

IB-ContextstringOptional

Typically your organization ID. See Authorization and context identification for details.

Request

This endpoint expects an object.
namestringRequired
Name of the batch. Maximum length is 255 characters.
workspacestringOptional

The name of the workspace in which to add the batch. If not specified, the default location is your personal workspace.

When making this call from a service account, you must specify a workspace.

For organization members, if the default drive changes but is still connected, you can still use the batch as input for running an app. However, you can’t upload any additional files to the batch. If the default drive is disconnected, you can’t use batches stored on that drive as input for any app run.

Response

Batch created successfully.
idinteger
Unique identifier for the batch.