Media Library
Your own media storage with deduplication, premium access, and uploading via a Telegram chat.
On this page
For a bot to send images and files, they need to be stored somewhere. GetMyBot has its own media library: you upload a file once and the platform inserts it into messages automatically. The library deduplicates identical files and is a premium feature; for basic use there is a free upload path via a Telegram chat.
Your own storage
An uploaded file is saved to the platform's storage and receives a media identifier. In the "Photo" or "File" message block, you can reference this identifier: when sending, the platform substitutes the correct file automatically. Upload: POST /api/bots/{id}/media; preview: GET /api/bots/{id}/media/{mediaID}.
Content-based deduplication
Each file is identified by its sha256 content hash. If you upload the same file again, the platform does not create a duplicate: it returns a reference to the already-stored object. This way identical images do not take up space twice and the identifier remains stable.
Premium access
The media library is a premium feature (image_storage). It is available on a paid plan that includes it; without an active subscription, uploading to the library returns a 402 (payment required) error. Previewing already-stored files works without restrictions.
The maximum file size for library uploads is 2 MiB.
Uploading via Telegram chat (without premium)
If the premium library is not available, there is a free path: sink-upload: POST /api/bots/{id}/chats/{chatID}/sink-upload. The file is sent through the specified Telegram chat and the response returns a Telegram file_id that can be used in bot messages. This method is available to everyone without a premium gate; the size limit is the same 2 MiB.
Which to use
- If you regularly reuse the same images and want deduplication and preview: use the media library (premium).
- If you just need a
file_idquickly without a subscription: use sink-upload through a service chat.
What's next
- Messages and buttons: "Photo" and "File" blocks in bot responses.
- Payments and balance: plans and premium features.
- Import from SamBot: migrating media from a bundle.
- Chats and operators: service chats for sink-upload.