> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.vapi.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.vapi.ai/_mcp/server.

# Call analysis

> Automatically summarize and evaluate every Vapi call after it ends, using an LLM to generate summaries, extract structured data, and score calls for quality.

## Overview

Call analysis automatically summarizes and evaluates every call for insights and quality control. As soon as a call ends, analysis is triggered in the background and typically completes within a few seconds. The system uses a large language model to:

* Summarize the call
* Extract structured data
* Evaluate call success

Results are attached to the call record and can be viewed in the call instance dashboard or retrieved via the API. You can customize the analysis using prompts and schemas in your assistant's `analysisPlan`.

## Recommended: use structured outputs

We recommend [structured outputs](/assistants/structured-outputs) over the `analysisPlan` for extracting data, summaries, and evaluations from your calls. They are more flexible and are where new development happens.

The `analysisPlan` configuration described later on this page still works and remains available for existing setups. If you're configuring call analysis for the first time, start with structured outputs.

## Extracting structured outputs

A structured output is a reusable definition you create once and attach to an assistant. After each call, Vapi runs it against the conversation and stores the result in `call.artifact.structuredOutputs`.

To extract structured outputs:

1. **Create a structured output** with a JSON schema describing what to extract.
2. **Link it to an assistant** through `artifactPlan.structuredOutputIds`.
3. **Read the results** from `call.artifact.structuredOutputs` after the call ends.

**`Create a structured output`**

```bash title="Create a structured output"
curl -X POST https://api.vapi.ai/structured-output \
  -H "Authorization: Bearer $VAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Customer Info",
    "type": "ai",
    "description": "Extract customer contact information",
    "schema": {
      "type": "object",
      "properties": {
        "firstName": { "type": "string", "description": "Customer'\''s first name" },
        "email": { "type": "string", "format": "email", "description": "Customer'\''s email address" }
      },
      "required": ["firstName"]
    }
  }'
```

**`Link it to an assistant`**

```json title="Link it to an assistant"
{
  "artifactPlan": {
    "structuredOutputIds": ["<structured-output-id>"]
  }
}
```

For the complete walkthrough, see the [structured outputs quickstart](/assistants/structured-outputs-quickstart). For every field and schema option, see the [structured outputs reference](/assistants/structured-outputs).

## Coming from analysisPlan?

Each part of the `analysisPlan` has a structured outputs equivalent:

| `analysisPlan` (stored in `call.analysis`)    | Structured outputs equivalent (stored in `call.artifact.structuredOutputs`)                        |
| --------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `summaryPlan` → `summary`                     | A structured output that summarizes the call                                                       |
| `structuredDataPlan` → `structuredData`       | A structured output with your JSON schema                                                          |
| `successEvaluationPlan` → `successEvaluation` | A structured output that evaluates the call, or a [scorecard](/observability/scorecard-quickstart) |

## Customization

You can customize the following properties in your assistant's `analysisPlan`:

### Summary prompt

* Used to create a concise summary of the call, stored in `call.analysis.summary`.
* **Default prompt:**
  ```text
  You are an expert note-taker. You will be given a transcript of a call. Summarize the call in 2-3 sentences, if applicable.
  ```
* **Customize:**
  ```json
  {
    "summaryPrompt": "Custom summary prompt text"
  }
  ```
* **Disable:**
  ```json
  {
    "summaryPrompt": ""
  }
  ```

### Structured data prompt

* Extracts specific data from the call, stored in `call.analysis.structuredData`.
* **Default prompt:**
  ```text
  You are an expert data extractor. You will be given a transcript of a call. Extract structured data per the JSON Schema.
  ```
* **Customize:**
  ```json
  {
    "structuredDataPrompt": "Custom structured data prompt text"
  }
  ```

### Structured data schema

* Defines the format of extracted data using JSON Schema.
* **Customize:**
  ```json
  {
    "structuredDataSchema": {
      "type": "object",
      "properties": {
        "field1": { "type": "string" },
        "field2": { "type": "number" }
      },
      "required": ["field1", "field2"]
    }
  }
  ```

### Success evaluation prompt

* Used to determine if the call was successful, stored in `call.analysis.successEvaluation`.
* **Default prompt:**
  ```text
  You are an expert call evaluator. You will be given a transcript of a call and the system prompt of the AI participant. Determine if the call was successful based on the objectives inferred from the system prompt.
  ```
* **Customize:**
  ```json
  {
    "successEvaluationPrompt": "Custom success evaluation prompt text"
  }
  ```
* **Disable:**
  ```json
  {
    "successEvaluationPrompt": ""
  }
  ```

### Success evaluation rubric

* Defines the criteria for evaluating call success. Options:
  * `NumericScale`: 1 to 10
  * `DescriptiveScale`: Excellent, Good, Fair, Poor
  * `Checklist`: List of criteria
  * `Matrix`: Grid of criteria and performance
  * `PercentageScale`: 0% to 100%
  * `LikertScale`: Strongly Agree to Strongly Disagree
  * `AutomaticRubric`: Auto breakdown by criteria
  * `PassFail`: true/false
* **Customize:**
  ```json
  {
    "successEvaluationRubric": "NumericScale"
  }
  ```

### Combine prompts and rubrics

* You can combine prompts and rubrics for detailed instructions:
  ```json
  {
    "successEvaluationPrompt": "Evaluate the call based on these criteria:...",
    "successEvaluationRubric": "Checklist"
  }
  ```

## Results

* Once analysis is complete, results are attached to the call record.
* View results in the call instance dashboard or retrieve them via the API.
* Results include:
  * Call summary
  * Structured data
  * Success evaluation and rubric

By customizing these properties, you can tailor call analysis to your needs and gain valuable insights from every call.