Skip to content

Instantly share code, notes, and snippets.

@motyar
Created March 2, 2022 07:04
Show Gist options
  • Save motyar/1936ce2d4bb9304377e3a84567161f14 to your computer and use it in GitHub Desktop.
Save motyar/1936ce2d4bb9304377e3a84567161f14 to your computer and use it in GitHub Desktop.
Generate images with Python and Bruzu API. Image generation API
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)
@motyar
Copy link
Author

motyar commented Mar 2, 2022

output.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment