High quality image generation by Microsoft Designer. Reverse engineered API.
Project description
Microsoft Designer API
Installation
$ pip3 install MicrosoftDesigner
Usage
$ python3 -m MicrosoftDesigner -h
options:
-h, --help show this help message and exit
--user_id USER_ID User ID
--auth_token AUTH_TOKEN
Auth Token
--prompt PROMPT Prompt
--save_path FILE_PATH
File Path to save the output (optional)
--file_name FILE_NAME
File Name to save the output (optional)
--resolution RESOLUTION
Resolution of the image (optional)
(default: 1024x1024, available: 1024x1792, 1792x1024)
Getting Started
- Create a new user account or login Microsoft Designer
- Open the developer tools and go to the network tab
- Create a new image using random text
- Find the request with post method and copy the request headers
- Copy the user id, auth token (Authorization: value) from the request headers
- Run the script with the copied values
- Note: auth_token will expire after 24 hours
- Note: Do not pass resolution other than 1024x1024, 1024x1792, 1792x1024
$ python3 -m MicrosoftDesigner --user_id <user_id> --auth_token <auth_token> --prompt <prompt> --resolution <resolution> --save_path <save_path>
Python Example
from msdesigner.gen_images import create_image
create_image(user_id, auth_token, prompt, resolution)
# Image wiil be saved in images folder
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
microsoftdesigner-0.0.9.tar.gz
(26.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file microsoftdesigner-0.0.9.tar.gz.
File metadata
- Download URL: microsoftdesigner-0.0.9.tar.gz
- Upload date:
- Size: 26.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.10.12 Linux/6.8.0-1019-oracle
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84c84a399012dee97902cb630b9c68f2ab196a57d3673ccca7cd0c4d702d9524
|
|
| MD5 |
30ec1f2b231503da5b51754c088940f6
|
|
| BLAKE2b-256 |
6d07c29b19550009c054181d2bcb189838701e618464f422597ea2686210dca1
|
File details
Details for the file microsoftdesigner-0.0.9-py2.py3-none-any.whl.
File metadata
- Download URL: microsoftdesigner-0.0.9-py2.py3-none-any.whl
- Upload date:
- Size: 17.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.10.12 Linux/6.8.0-1019-oracle
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee4158045352cc718eb2a1d5d6f849470e4b5c41f4e9541fc10961c3fd4cb1b3
|
|
| MD5 |
97fbe3dd9f4d047e0871981f914f0acd
|
|
| BLAKE2b-256 |
1888848f4d577c00ddd75c52f70d21e9b7b9c0d04cc1db325d2abf567f6ad2f8
|