Summarize the contents of a message with AI, see here » for more info.
Clients should use message.summary_from_language as a hint for showing a summarization button; its absence does not forbid invoking this method.
textWithEntities#751f3146 text:string entities:Vector<MessageEntity> = TextWithEntities;
---functions---
messages.summarizeText#9d4104e2 flags:# peer:InputPeer id:int to_lang:flags.0?string = TextWithEntities;
| Name | Type | Description |
|---|---|---|
| flags | # | Flags, see TL conditional fields |
| peer | InputPeer | The peer where the message is located. |
| id | int | Message ID. |
| to_lang | flags.0?string | If set, generates the summary in the specified target language (two-letter ISO 639-1 language code) instead of the message's language. |
| tone | flags.2?string | If set, rephrases the summary using the specified AI composer tone » (pass the tone identifier) |
| Code | Type | Description |
|---|---|---|
| 400 | INPUT_TEXT_TOO_LONG | The specified text is too long. |
| 400 | MSG_ID_INVALID | Invalid message ID provided. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
Telegram offers many AI features powered by Cocoon — a decentralized network designed to maximize privacy.
A message