Skip to main content

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


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.12.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

microsoftdesigner-0.0.12-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file microsoftdesigner-0.0.12.tar.gz.

File metadata

  • Download URL: microsoftdesigner-0.0.12.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

Hashes for microsoftdesigner-0.0.12.tar.gz
Algorithm Hash digest
SHA256 ff0b0444a3e797dc05bc0bf25638e10121a7ea7064663956234a1d83cfc2a99e
MD5 683ef8571917641fb75b127a6660df71
BLAKE2b-256 c15d224b8f0906a22f5ba9167e8ccb8ad0ccd103a589d660a59a742c388a4f8f

See more details on using hashes here.

File details

Details for the file microsoftdesigner-0.0.12-py3-none-any.whl.

File metadata

  • Download URL: microsoftdesigner-0.0.12-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

Hashes for microsoftdesigner-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 707a6ad84ee93aee1c8a849c2f98ff2695530687fb543c29da318d15ae2e8d72
MD5 771085637e148118722f1d3f1542281a
BLAKE2b-256 cdc4ca0089762da3316a21a65591449fa3fe5047752475b049ffe966211dfd63

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page