POST
/
v1
/
batches
/
{batch_id}
/
analyze
curl --request POST \
  --url https://api.bland.ai/v1/batches/{batch_id}/analyze \
  --header 'Content-Type: application/json' \
  --header 'authorization: <authorization>' \
  --data '{
  "goal": "<string>",
  "questions": [
    {}
  ]
}'
{
    "status": "success",
    "message": "Successfully analyzed batch",
    "answers": {
        "123e4567-e89b-12d3-a456-426614174000": [
            "human",
            "Customer found the product sturdy and reliable",
            "A bit heavy",
            true
        ],
        "123e4567-e89b-12d3-a456-426614174001": [
            "voicemail",
            null,
            null,
            false
        ]
    }
}

Headers

authorization
string
required

Your API key for authentication.

Path Parameters

batch_id
string
required

The unique identifier for the batch of calls to be analyzed.

Request Body

goal
string
required

This is the overall purpose of the batch of calls. Provides context for the analysis to guide how the questions/transcripts are interpreted.

questions
array
required

An array of questions to be analyzed for each call in the batch.

Each question should be an array with two elements: the question text and the expected answer type (e.g., “string”, “boolean”).

Fairly flexible in terms of the expected answer type, and unanswerable questions will default to null.

Examples:

"questions": [
      ["Who answered the call?", "human or voicemail"],
      ["Positive feedback about the product: ", "string"],
      ["Negative feedback about the product: ", "string"],
      ["Customer confirmed they were satisfied", "boolean"]
  ]

Response

status
object

Will be success if the request was successful.

message
string

Confirms the request was successful, or provides an error message if the request failed.

answers
object

Contains the analyzed answers for each call in the batch.

The keys are call_ids from the batch, and the array values are the analysis results for each question in the batch.

credits_used
number

Token-based price for the analysis request.

As a rough estimate, the base cost is 0.003 credits with an additional 0.0015 credits per call in the batch.

Longer call transcripts and higher numbers of questions can increase the cost, however the cost scales very effectively with batches vs. individual calls.