{"id":16871405,"url":"https://github.com/itsluketwist/imageai-wizard","last_synced_at":"2025-07-28T16:04:52.582Z","repository":{"id":216382451,"uuid":"620463510","full_name":"itsluketwist/imageai-wizard","owner":"itsluketwist","description":"ImageAI Wizard is a Python library that provides various image utilities using the OpenAI API.","archived":false,"fork":false,"pushed_at":"2024-01-13T08:19:36.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T19:54:44.357Z","etag":null,"topics":["image-processing","openai-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itsluketwist.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-28T18:23:57.000Z","updated_at":"2024-02-05T21:32:57.000Z","dependencies_parsed_at":"2024-01-09T23:28:42.358Z","dependency_job_id":"b37357ea-1df7-4cfa-9ac4-6c934fddfb92","html_url":"https://github.com/itsluketwist/imageai-wizard","commit_stats":null,"previous_names":["itsluketwist/imageai-wizard"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/itsluketwist/imageai-wizard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsluketwist%2Fimageai-wizard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsluketwist%2Fimageai-wizard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsluketwist%2Fimageai-wizard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsluketwist%2Fimageai-wizard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itsluketwist","download_url":"https://codeload.github.com/itsluketwist/imageai-wizard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsluketwist%2Fimageai-wizard/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267543264,"owners_count":24104536,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["image-processing","openai-api"],"created_at":"2024-10-13T15:08:28.496Z","updated_at":"2025-07-28T16:04:52.542Z","avatar_url":"https://github.com/itsluketwist.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **imageai-wizard**\n\nImageAI Wizard is a Python library that provides an easy-to-use interface for generating \nvarious data about images using the OpenAI API.\n\n\u003cdiv\u003e\n    \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\n        \u003cimg alt=\"MIT License\" src=\"https://img.shields.io/badge/Licence-MIT-yellow?style=for-the-badge\u0026logo=docs\u0026logoColor=white\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://www.python.org/\"\u003e\n        \u003cimg alt=\"Python 3\" src=\"https://img.shields.io/badge/Python_3-37709F?style=for-the-badge\u0026logo=python\u0026logoColor=white\" /\u003e\n    \u003c/a\u003e\n\u003c/div\u003e\n\n## *installation*\n\nImageAI Wizard can be installed via pip:\n\n```shell\npip install git+https://github.com/itsluketwist/imageai-wizard\n```\n\n## *usage*\n\nFirst, you need to obtain an API key from OpenAI (use [this](https://platform.openai.com/account/api-keys) \ninterface, you must be [signed up](https://beta.openai.com/signup/)).\n\nThis key must be provided when initialising the `Wizard` class, or stored in the\n`IMAGEAI_WIZARD_OPEN_AI_KEY` environment variable. The code will error if no key is provided.\n\n```python\nfrom imageai_wizard import Wizard, Persona, Tone\n\nwiz = Wizard(api_key='YOUR_API_KEY')\n\nimage_url = \"https://upload.wikimedia.org/wikipedia/en/thumb/4/47/Iron_Man_%28circa_2018%29.png/220px-Iron_Man_%28circa_2018%29.png\"\n\n# generate text based responses about the image\ndescription = wiz.generate_description(\n    image=image_url,\n    persona=Persona.CHILD,\n    tone=Tone.CHEERFUL,\n)\nprint(f\"Description: {description}\")\n\ncaption = wiz.generate_caption(\n    image=image_url,\n    persona=Persona.ACADEMIC_PROFESSOR,\n    tone=Tone.ANGRY,\n)\nprint(f\"Caption: {caption}\")\n\ntitle = wiz.generate_title(\n    image=image_url,\n    persona=Persona.BUSINESS_PERSON,\n    tone=Tone.CONFUSED,\n)\nprint(f\"Title: {title}\")\n\n# generate a comparison to another image\nanother_image_url = \"https://e0.pxfuel.com/wallpapers/971/526/desktop-wallpaper-robot-and-cat-red-robot.jpg\"\ncomparison = wiz.compare_images(\n    image_1=image_url,\n    image_2=another_image_url,\n)\nprint(f\"Comparison: {comparison}\")\n```\n\n\n## *development*\n\nClone the repository code:\n\n```shell\ngit clone https://github.com/itsluketwist/imageai-wizard.git\n```\n\nOnce cloned, install the package locally in a virtual environment:\n\n```shell\npython -m venv venv\n\n. venv/bin/activate\n\npip install -e \".[dev]\"\n```\n\nInstall and use pre-commit to ensure code is in a good state:\n\n```shell\npre-commit install\n\npre-commit run --all-files\n```\n\n\n## *contributing*\n\nIf you'd like to contribute to ImageAI Wizard, please fork the repository and create a pull request. \nWe welcome contributions of all kinds, including bug fixes, new features, and documentation improvements.\n\n\n## *license*\n\nImageAI Wizard is licensed under the MIT License. See [LICENSE](LICENSE) for more information.\n\n## *inspiration*\n\nI wanted to get more familiar with ChatGPT, it's API and writing prompts in general. \nSo I did the only reasonable thing, and asked ChatGPT for a python library I could \nbuild that utilises the API! This was the suggestion, ChatGPT even helped me to \nwrite the code itself, and this readme.\n\nInitial prompt: `Can you suggest a simple python library that I can build? the library must use your own API and be useful.`\n\n\n## *todo*\n\n- Ask ChatGPT for more ideas... and implement them, I guess?\n- Add some image generation methods that utilise `openai.Image.create(...)`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsluketwist%2Fimageai-wizard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsluketwist%2Fimageai-wizard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsluketwist%2Fimageai-wizard/lists"}