> This is a page from the ElevenLabs documentation. For a complete page index, fetch https://elevenlabs.io/docs/llms.txt. For the full documentation in a single file, fetch https://elevenlabs.io/docs/llms-full.txt.

# 会話の概要を取得

GET https://api.elevenlabs.io/v1/convai/conversations/{conversation_id}/summary

会話の軽量なサマリーを取得します。タイトル、生成された文字起こしのサマリー、通話が成功したかどうか、および会話が短い場合に限りプレーンなチャットメッセージが含まれます。レスポンスを小さく保つため、ツール呼び出し、ツール結果、コンテキスト更新は省略されます。要点だけが必要な場合（例：エージェントが多数の会話を読む場合）は、完全な会話エンドポイントの代わりにこちらを使用してください。ツール呼び出しとコンテキスト更新を含む完全な文字起こしが必要な場合は、GET /v1/convai/conversations/\{conversation\_id}を使用してください。

Reference: https://elevenlabs.io/docs/api-reference/conversations/get-summary

## Servers

- `https://api.elevenlabs.io` (Production, default)
- `https://api.us.elevenlabs.io` (Production US)
- `https://api.eu.residency.elevenlabs.io` (Production EU)
- `https://api.in.residency.elevenlabs.io` (Production India)
- `https://api.sg.residency.elevenlabs.io` (Production Singapore)

## Request

### Path parameters

- `conversation_id` (string, required) — 操作対象の会話のID。

### Query parameters

- `max_messages` (integer, optional, default: 40) — インラインに含めるチャットメッセージターンの最大数。会話がこの数を超える場合、メッセージは省略され、messages_omittedが設定されます。

## Response

### 200

成功レスポンス。

- `conversation_id` (string, required)
- `agent_id` (string, required)
- `status` (enum, required)
  - Allowed values: `initiated`, `in-progress`, `processing`, `done`, `failed`
- `message_count` (integer, required) — 会話内の通常のチャットメッセージのターン数です。
- `note` (string, required) — 完全な文字起こしを取得する方法をエージェントに指示するガイダンスです。
- `call_summary_title` (string, optional, nullable) — 会話用に生成された短いタイトルです。
- `transcript_summary` (string, optional, nullable) — 生成された通話の自然言語サマリー。
- `call_successful` (enum, optional, nullable)
  - Allowed values: `success`, `failure`, `unknown`
- `messages` (list of ConversationSummaryMessageModel, optional, nullable) — プレーンチャットメッセージ（ロールとテキストのみ）。message_countがリクエストされたmax_messagesを超えない場合にのみ含まれます。それ以外の場合はnullとなり、messages_omittedはtrueです。
- `messages_omitted` (boolean, optional, default: false) — 会話が長すぎるためにチャットメッセージが省略された場合はtrueです。メッセージについては完全な文字起こしを取得してください。

## Errors

### 422 Unprocessable Entity Error

検証エラー

- `detail` (list of ValidationError, optional)

## Types

### ConversationSummaryMessageModel

- `role` (enum, required)
  - Allowed values: `user`, `agent`
- `message` (string, required)

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### ValidationErrorLocItems

## Examples

**Response**

```json
{
  "conversation_id": "string",
  "agent_id": "string",
  "status": "initiated",
  "message_count": 1,
  "note": "string",
  "call_summary_title": "string",
  "transcript_summary": "string",
  "call_successful": "success",
  "messages": [
    {
      "role": "user",
      "message": "string"
    }
  ],
  "messages_omitted": false
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/convai/conversations/21m00Tcm4TlvDq8ikWAM/summary"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/convai/conversations/21m00Tcm4TlvDq8ikWAM/summary';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.elevenlabs.io/v1/convai/conversations/21m00Tcm4TlvDq8ikWAM/summary"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.elevenlabs.io/v1/convai/conversations/21m00Tcm4TlvDq8ikWAM/summary")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.elevenlabs.io/v1/convai/conversations/21m00Tcm4TlvDq8ikWAM/summary")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.elevenlabs.io/v1/convai/conversations/21m00Tcm4TlvDq8ikWAM/summary');

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.elevenlabs.io/v1/convai/conversations/21m00Tcm4TlvDq8ikWAM/summary");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.elevenlabs.io/v1/convai/conversations/21m00Tcm4TlvDq8ikWAM/summary")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```