POST
/
v2
/
batch
/
finalize
API_KEY='live_...'
BATCH_ID='batch_123'
curl --request POST \
--url "https://api.scale.com/v2/batch/finalize" \
--header "Authorization: Bearer $API_KEY" \
--header "Content-Type: application/json" \
--data '{"batch_id": "'$BATCH_ID'"}'
{
  "id": "batch_123",
  "name": "Batch Name Example",
  "project": "project_123",
  "created_at": "2022-07-25T07:32:34.318Z",
  "status": "completed",
  "callback": "https://example.com/callback",
  "metadata": {},
  "completed_at": "2022-07-26T07:32:34.318Z"
}

Batch Status Requirement

You can only finalize batches that are currently in staging status. Batches in other statuses (in_progress, completed, paused) cannot be finalized.

Once finalized, the batch status will change to in_progress and task processing will begin.

Required request parameters

You are expected to provide one of the following in the request body:

  • Batch ID (batch_id)
  • Batch Name (batch_name)

Authorizations

Authorization
string
header
required

Your API Key is the Bearer token. See the Authentication section to learn how to access your key.

Body

application/json

Response

200
application/json

Batch finalized successfully.

The response is of type object.