Back to Home

API Documentation

The complete reference for integrating Telegraph into your applications. Fast, scalable, and decentralized.

Getting Started

Telegraph provides a high-performance REST API for uploading and managing images, GIFs, and videos via our Telegram-backed edge storage. Our storage is 100% free, decentralized, and infinitely scalable.

Quick Start

All API responses are in JSON format. Use the endpoints below to start building immediately.

POST

/api/v1/upload

Upload images, videos, or GIFs. Returns a direct CDN link.

Parameters (multipart/form-data)

  • file REQUIRED
    The file buffer or payload to upload.
  • customId OPTIONAL
    A custom slug for your URL instead of a random string.
  • password OPTIONAL
    Encrypt the link with a password. Only users with the password can decrypt and view it.
  • expiration OPTIONAL
    Self-destruct timer. Valid values: 1h, 12h, 24h, 3d, 1w, 1m, never.
curl -X POST https://telegraph.vortexcore.org/api/v1/upload \
  -F "file=@/path/to/image.jpg" \
  -F "customId=my-slug" \
  -F "password=secret123" \
  -F "expiration=24h"
POST

/api/v1/upload

Upload text, code snippets, or configuration files. The server detects text documents using their file extensions.

CRITICAL: When uploading plain text directly from strings/buffers instead of physical files, you MUST provide a dummy file name ending in .txt or similar (e.g. snippet.txt) so the API server handles the extension correctly.

Parameters (multipart/form-data)

  • file REQUIRED
    The text file buffer. Must end in .txt, .js, .md, etc.
  • customId OPTIONAL
    A custom slug for your URL.
  • password OPTIONAL
    Encrypt the text snippet with a password.
  • expiration OPTIONAL
    Valid values: 1h, 12h, 24h, 3d, 1w, 1m, never.
curl -X POST https://telegraph.vortexcore.org/api/v1/upload \
  -F "file=@/path/to/my_script.py" \
  -F "customId=my-script" \
  -F "password=secret123" \
  -F "expiration=24h"