Created
March 2, 2022 07:04
-
-
Save motyar/1936ce2d4bb9304377e3a84567161f14 to your computer and use it in GitHub Desktop.
Generate images with Python and Bruzu API. Image generation API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import urllib | |
data = {'bg':'#ff00ff', 'a.t':'Hello there'} | |
data['apiKey'] = "YOUR_API_KEY" | |
apiUrl = 'https://img.bruzu.com/?'+urllib.parse.urlencode(data) | |
r = requests.get(apiUrl, allow_redirects=True) | |
open('output.png', 'wb').write(r.content) |
Author
motyar
commented
Mar 2, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment