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.

 Method schema is available as of layer 225. Switch »

Parameters

Name Type Description
flags # Flags, see TL conditional fields
proofread flags.0?true If set, proofreads and fixes mistakes in the message
emojify flags.3?true If set, adds emojis to the message
text TextWithEntities The message
translate_to_lang flags.1?string If set, translates the message to the specified language
tone flags.2?InputAiComposeTone If set, rephrases the message using the specified AI composer tone »

Result

messages.ComposedMessageWithAI

Only users can use this method

Possible errors

Code Type Description
400 AICOMPOSE_FLOOD_PREMIUM You've reached the daily limit of AI text transformations, upgrade to Telegram Premium to get 50x times more AI text transformations per day!
500 AICOMPOSE_TIMEOUT A timeout occurred while composing the message.
400 AI_COMPOSE_TASK_MISSING No AI task was specified. The caller must provide at least one of: proofread, translate (with a target language), tone, or emojify.
400 MESSAGE_EMPTY The provided message is empty.

Related pages

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.