Skip to main content

Summarize file content

POST 
/ai/summarize

Generate a summary of a file's contents.

Supports the following text formats:

  • PDF, HTML, txt, json, csv

Supports the following media formats (billed for both the transcription and summary):

  • flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm
  • Up to 100 MB

Request

Body

required

    bucket stringrequired

    The name of the bucket that contains the file to be summarized.

    filename stringrequired

    The name of the file to be summarized.

    system_prompt string

    A system prompt to guide the summary generation.

Responses

200: Successful Response

422: Validation Error

Request samples


curl -L 'https://api.telnyx.com/v2/ai/summarize' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"bucket": "string",
"filename": "string",
"system_prompt": "string"
}'

Response samples


{
"data": {
"summary": "string"
}
}