IdeogramWrapper
IdeogramWrapper 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 (https://ideogram.ai/) and is not officially endorsed by Ideogram
Install / Use
/learn @flowese/IdeogramWrapperREADME
Ideogram Wrapper

Written by @Flowese
<a href="https://colab.research.google.com/drive/1tUtiY2GzVlbAVjR-j78pWeY9Ac53IJzz?usp=sharing" target="_blank"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open Demo In Colab"></a>
Description
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.
Advantages Over Other Models
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.
Legal Disclaimer
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.
Requirements
- Python 3.x
- pip
Installation
From PyPI
To install the package from PyPI, run the following command:
pip install ideogram_wrapper
From GitHub Repository
To install the package directly from the GitHub repository, run:
pip install git+https://github.com/flowese/IdeogramWrapper.git
Configuration
Obtaining the Session Token
- Sign up at Ideogram.
- Once registered, open your browser's inspector:
- In Chrome:
Ctrl+Shift+IorF12on Windows,Cmd+Option+Ion Mac.
- In Chrome:
- Go to the
Applicationtab. - On the left panel, locate and click on
Cookies, then select the Ideogram website. - Find the cookie named
session_cookie. - Click on
session_cookieand copy the value in theValuefield.

Usage
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()
Parameters
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 isFalse.
License
This project is licensed under the MIT License.
Contributing
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!
TODO
Pending Tasks and Features
- Implement n_images for parameterizing the number of images to be generated (currently defaults to 4).
- Implement auto-renewal of the session_cookie_token.
- Generate different images from a list of prompts.
- Implement an asynchronous version.
- Study the possibility of implementing a user interface DEMO via Streamlit or Gradio (to be decided).
Related Skills
node-connect
350.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
350.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
350.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
