messages.composeMessageWithAI #

Invokes telegram's AI Editor that can translate, transform, fixup and/or emojify your message in a number of different ways, privately powered by Cocoon, see here » for more info!

All of the modes specified below can be combined.

Layer 223

Method schema is available as of layer 225. Switch »

Parameters #

NameTypeDescription
flags#Flags, see TL conditional fields
proofreadflags.0?trueIf set, proofreads and fixes mistakes in the message
emojifyflags.3?trueIf set, adds emojis to the message
textTextWithEntitiesThe message
translate_to_langflags.1?stringIf set, translates the message to the specified language
toneflags.2?InputAiComposeToneIf set, rephrases the message using the specified AI composer tone »

Result #

messages.ComposedMessageWithAI

Only users can use this method #

Possible errors #

CodeTypeDescription
400AICOMPOSE_FLOOD_PREMIUMYou've reached the daily limit of AI text transformations, upgrade to Telegram Premium to get 50x times more AI text transformations per day!
500AICOMPOSE_TIMEOUTA timeout occurred while composing the message.
400AI_COMPOSE_TASK_MISSINGNo AI task was specified. The caller must provide at least one of: proofread, translate (with a target language), tone, or emojify.
400MESSAGE_EMPTYThe provided message is empty.

AI features #

Telegram offers many AI features powered by Cocoon — a decentralized network designed to maximize privacy.

Telegram Premium #

Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.