> ## Documentation Index
> Fetch the complete documentation index at: https://docs.luly.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Analyze Batch with AI

> Analyzes a batch of calls based on using questions and goals..

### Headers

<ParamField header="authorization" type="string" required={true}>
  Your API key for authentication.
</ParamField>

### Path Parameters

<ParamField path="batch_id" type="string" required={true}>
  The unique identifier for the batch of calls to be analyzed.
</ParamField>

### Request Body

<ParamField body="goal" type="string[][]" required={true}>
  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"]
   ];
  ```
</ParamField>

### Response

<ResponseField name="status" type="object">
  Will be success if the request was successful.
</ResponseField>

<ResponseField name="message" type="string">
  Confirms the request was successful, or provides an error message if the request failed.
</ResponseField>

<ResponseField name="answers" type="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.
</ResponseField>

<ResponseField name="credits_used" type="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.
</ResponseField>

<ResponseExample>
  ```json Response
  {
    "status": "success",
    "pathway_id": "9d404c1b-6a23-4426-953a-a52c392ff8f1"
  }

  ```
</ResponseExample>
