# Summary (AI)

If transcription was enabled in the session, you can request a summary through the **sessions/:id/summary** endpoint. The transcripts will be passed through an AI (Artificial Intelligence) and a few sentences summary describing what happened in the session will be generated.&#x20;

{% hint style="info" %}
We self-host our AI models, and your sensitive transcript data is **NOT** being transmitted to any third party AI services.
{% endhint %}

{% hint style="info" %}
Generation of summary is not an immediate operation, that's why the first response you receive will be with an "in progress" status.

{"id":"c9ea5206-a44a-4d36-b685-5bbed86e9c8e","status":"**IN\_PROGRESS**","summary":""}

\
You can keep polling the same endpoint every minute or so until you receive the summary:\
{"id":"c9ea5206-a44a-4d36-b685-5bbed86e9c8e","status":"**READY**","summary":"Starship is a two-stage super heavy lift launch vehicle developed by SpaceX to significantly lower launch costs through economies of scale. It has a primary objective of reusing both rocket stages, increasing payload mass to orbit, and adapting to various space missions. The rocket will perform a wide range of missions, including those to geosynchronous orbit, the Moon, and Mars. Starship relies on orbital refueling from its tanker variant and is designed to be fully reusable. It has two stages: the Super Heavy Booster and the Starship spacecraft, both equipped with Raptor engines that burn liquid methane and oxygen. The rocket's structure is made of stainless steel, and it will use mechanical arms attached to the launch tower for landing."}
{% endhint %}

#### Request

{% tabs %}
{% tab title="cURL" %}
{% code overflow="wrap" %}

```bash
curl --request GET \
  --url https://api.digitalsamba.com/api/v1/sessions/edb7a1cb-0627-44ed-9ae4-62a344d6e8a9/summary \
  --user YOUR_TEAM_ID:YOUR_DEVELOPER_KEY
```

{% endcode %}
{% endtab %}

{% tab title="Java" %}

```java
import com.fasterxml.jackson.databind.ObjectMapper;

import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.util.Base64;
import java.util.Map;

String TEAM_ID = "YOUR_TEAM_ID";
String DEVELOPER_KEY = "YOUR_DEVELOPER_KEY";
String authorizationHeader = "Bearer " + Base64.getEncoder().encodeToString((TEAM_ID + ":" + DEVELOPER_KEY).getBytes());

String sessionId = "edb7a1cb-0627-44ed-9ae4-62a344d6e8a9";

HttpRequest request = HttpRequest.newBuilder()
  .GET()
  .uri(new URI("https://api.digitalsamba.com/api/v1/sessions/" + sessionId + "/summary"))
  .header("Authorization", authorizationHeader)
  .build();

HttpClient client = HttpClient.newHttpClient();
HttpResponse<String> response = client.send(request, BodyHandlers.ofString());

System.out.println("Status code: " + response.statusCode());
System.out.println("Body: " + response.body());
```

{% endtab %}
{% endtabs %}

#### Response (200 OK). Initial response tells you the summary generation is in progress. Keep calling the same endpoint every minute or so until the summary is generated.

```json
{
  "id":"c9ea5206-a44a-4d36-b685-5bbed86e9c8e",
  "status":"IN_PROGRESS",
  "summary":""
}
```

After some time when summary is generated you will receive this:

{% code overflow="wrap" %}

```json
{
  "id":"c9ea5206-a44a-4d36-b685-5bbed86e9c8e",
  "summary": "Starship is a two-stage super heavy lift launch vehicle developed by SpaceX to significantly lower launch costs through economies of scale. It has a primary objective of reusing both rocket stages, increasing payload mass to orbit, and adapting to various space missions. The rocket will perform a wide range of missions, including those to geosynchronous orbit, the Moon, and Mars. Starship relies on orbital refueling from its tanker variant and is designed to be fully reusable. It has two stages: the Super Heavy Booster and the Starship spacecraft, both equipped with Raptor engines that burn liquid methane and oxygen. The rocket's structure is made of stainless steel, and it will use mechanical arms attached to the launch tower for landing."
}
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digitalsamba.com/reference/rest-api/sessions/summary-ai.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
