Skip to content

andrewtryder/python-craiyon-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DeepSourceDeepSource

python-craiyon-api

python-craiyon-api is a Python Library for interacting with the unofficial Craiyon API.

Installation

Grab this library and build.

Usage

Here's an example of how to use the module to generate a drawing:

import requests
from craiyonapi import CraiyonAPI

http_client = requests.Session()
api = CraiyonAPI()

prompt = "Draw a cat playing the piano"
negative_prompt = "Don't draw a dog playing the guitar"
result = api.draw(http_client, negative_prompt, prompt)

for image in result.images:
    print(image)

print(f"Next prompt: {result.next_prompt}")
print(f"Generation duration: {result.duration} seconds")

Contributing

Submit a PR

Licence

This module is released under the MIT License.

About

Python wrapper for the Craiyon API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages