Written by @Flowese
ideogram_wrapper
is a Python package that allows you to generate images from Ideogram's API using textual prompts. This package is based on reverse engineering of Ideogram's API and is not officially endorsed by Ideogram.
Unlike other generative models like DALL-E 2 or MidJourney, Ideogram has the unique advantage of generating images that faithfully respect the text prompts you provide. This makes it a superior choice when you need accurate correlation between the input text and the generated image.
This package is created for educational and research purposes. By using this package, you agree to do so at your own risk. This package is not affiliated, endorsed, or sponsored by Ideogram in any way.
To install the package from PyPI, run the following command:
pip install ideogram_wrapper
To install the package directly from the GitHub repository, run:
pip install git+https://github.com/flowese/IdeogramWrapper.git
Ctrl+Shift+I
or F12
on Windows, Cmd+Option+I
on Mac.Application
tab.Cookies
, then select the Ideogram website.session_cookie
.session_cookie
and copy the value in the Value
field.To use ideogram_wrapper
, import the IdeogramWrapper
class and provide the necessary parameters.
from ideogram_wrapper import IdeogramWrapper
ideogram = IdeogramWrapper(
session_cookie_token="your_token_here", # The value you copied from the session cookie
prompt="a picture of a dog with a sign saying 'Hello World'",
aspect_ratio="landscape", # Can be "landscape", "portrait", or "square"
output_dir="images",
enable_logging=True
)
ideogram.inference()
session_cookie_token
: (Required) The session token you obtained from the cookie.prompt
: (Required) The textual prompt for generating the image.aspect_ratio
: (Optional) The aspect ratio of the image. Can be "landscape", "portrait", or "square". Default is "square".output_dir
: (Optional) The directory where the generated images will be saved. Defaults to a folder named "images".enable_logging
: (Optional) Whether to enable logging. Default is False
.This project is licensed under the MIT License.
If you'd like to contribute to this project, feel free to fork the repository and send a pull request, or open an issue to discuss what you'd like to change. All contributions are welcome!