Quote image generation · Reimagined

The original Quote API, reimagined.

Generate Telegram-style quote images, test requests, and read the API documentation from one focused interface.

Current origin detecting…

Playground

Build a request with the common fields, then generate the image directly from this page.

Request

/quote/generate
Advanced JSON

Result

—
No quote generated yetSubmit a request to preview the generated image here.

Endpoints

These are the image-generation routes exposed by the current application.

Documentation

A compact reference for the request shape and responses implemented by this API.

Quick start

Send a POST request to /quote/generate with a JSON body containing at least one message.

POST /quote/generate
Content-Type: application/json

{
  "messages": [
    {
      "from": {"id": 1, "name": "Test User", "photo": {}},
      "text": "Hello world!"
    }
  ]
}

Request

The request is a JSON object. Query-string and body properties are merged by the API middleware.

FieldTypeDescription
messagesarrayRequired list of quote messages.
backgroundColorstringBackground color for the generated quote.
typestringquote, image, or stories. Omit for raw canvas.
width / heightnumberOutput dimensions.
scalenumberRendering scale.
emojiBrandstringEmoji rendering brand.
formatstringpng or webp for the generated image format.

Message object

Each entry in messages describes sender information and message text. Optional reply and media data are supported by the renderer.

FieldTypeDescription
fromobjectSender information, including id, first_name, last_name, name, username, and photo data.
textstringMessage text.
avatarbooleanWhether the avatar is rendered.
replyMessageobjectOptional replied-to message information.
mediaobjectOptional media information.
entitiesarrayOptional Telegram-style message entities.

Response

Without an extension, the API returns a JSON envelope containing the generated image. With .png or .webp, it returns image bytes directly.

{
  "ok": true,
  "result": {
    "image": "<base64 image data>"
  }
}

Direct image responses also expose quote metadata through response headers.

Errors

Invalid or missing requests return an error envelope with HTTP 400. Known generator errors include query_empty, messages_empty, and empty_messages. Unknown API methods return method not found.

The current server limits requests to 20 per IP over a 55-second window. A configured bot token is whitelisted by the rate-limit middleware.