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 microsoftdesigner.gen_images import create_img
create_img(user_id, auth_token, prompt, resolution)
# Image will 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.11.tar.gz
(16.2 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.11.tar.gz.
File metadata
- Download URL: microsoftdesigner-0.0.11.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.10.12 Linux/6.8.0-1018-oracle
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
781394c55b4a81adaa6d305e76489fac158f699d215885ca5e75f986872c0908
|
|
| MD5 |
0ee31c88801b861822124358d8e38f26
|
|
| BLAKE2b-256 |
27ee790cca6db6c4265589f3c39ae828020b3f1666a7e1f2e5a172be77a4a8d8
|
File details
Details for the file microsoftdesigner-0.0.11-py3-none-any.whl.
File metadata
- Download URL: microsoftdesigner-0.0.11-py3-none-any.whl
- Upload date:
- Size: 17.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.10.12 Linux/6.8.0-1018-oracle
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2222cd153fc64a697290fcc2491972f375593b86ce3e419f82fbc78e5108aa66
|
|
| MD5 |
d31d275b72c1c65a487b49662b394c4f
|
|
| BLAKE2b-256 |
931a661a26809ba3bce53edfbf522e37eb46132abda7d25d4eb63fd40a06aa44
|