A small Python helper for generating images using CoolText's PostChange API. This repository wraps CoolText form options in a simple data model, posts the configuration to CoolText, and returns the rendered image URL.
- Result with logo id -
4618063429:
- Result with logo id -
8:
- Result with logo id -
2975689126:
- Result with logo id -
829964308:
- Result with logo id -
732453157:
- Result with logo id -
1779834160:
Features
- Build payloads using a typed
pydanticmodel. - Merge user-provided options with a logo's defaults from
logo-id.json. - Manage HTTP requests and return the final render URL.
- Python 3.10+
- See
requirements.txtfor exact package versions.
Install dependencies with pip:
python -m pip install -r requirements.txtIf you prefer a virtual environment:
python -m venv .venv
.
\venv\Scripts\activate # Windows
python -m pip install -r requirements.txt- Ensure
logo-id.jsonis present in the repository root. This file mapsLogoIDvalues to their CoolText page links and default form values. The repository includes a generatedlogo-id.json(seelogo-id.pyfor the scraper used to produce it). - Edit
main.pyor create your own script using the library.
Example minimal usage (same logic as in main.py):
from modules import CoolText, PostChangeConfigOptions
config = PostChangeConfigOptions(LogoID="732440996", Text="Hello World")
print(CoolText(config).create())Running the example:
python main.pyThe script will print a URL where the rendered image can be downloaded.
PostChangeConfigOptions(defined inmodules.py) exposes the familiar CoolText form fields:LogoID,Text,FontSize,FileFormat,BackgroundColor_color, and many optional color/boolean/integer fields. The model uses sensible defaults fromconstants.DefaultValueswhen values are not provided.CoolText.create()workflow:- Loads the logo metadata and defaults from
logo-id.json. - Fetches the CoolText logo page (to satisfy referer/session expectations).
- Posts the combined payload to CoolText's
/PostChangeendpoint. - Parses and returns the render URL from the JSON response.
- Loads the logo metadata and defaults from
If the request fails or a response cannot be parsed, create() returns None and logs a message via the logging module.
Just hop on to https://cool-text-thehritu.vercel.app for list of logos and their ids and other configs.
- Run the example locally (
python main.py). - Add or modify
PostChangeConfigOptionsinmodules.pyif you need to support additional CoolText parameters. - Logging is used for error and debug messages; enable or configure the
loggingmodule in your own scripts as needed.
Contributions are welcome. Open an issue or submit a pull request with a clear description of the change.
This project does not include an explicit license file. Add a LICENSE if you wish to define reuse terms.





