Skip to main content

BillionPrompt Python SDK

Project description

BillionPrompt Python SDK

BillionPrompt Python SDK can use python to call the functions of BillionPrompt products, including prompt writing, prompt retrieval and image creation.

Installing By PIP

$ pip install billionprompt

API secretkey

To generate an API secretkey, you need to go to our website: BillionPrompt

Example usage

Import the SDK and instantiate a new client with your authentication secrets:

from billionprompt import ImageClient,RetrivalClient,PromptClient

secretkey = {"Authorization":"PUT YOUR KEY HERE"}
promptclient = PromptClient(headers=secretkey)

Description continued:

text = "一个女孩穿着白色的衣服"
response = ""
for output in promptclient.fcDict(text=text):
    response += output
    print(response)

Convert Description to Prompt:

text = "一个女孩穿着白色的衣服"
response = promptclient.descToPrompt(prompt=text)
print(",".join(response))

Prompt continued:

text = "1girl,long hair,white clothes"
response = promptclient.promptContinu(text=text)
print(",".join(response))

More examples can be found in examples.py.

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

billionprompt-0.0.1.tar.gz (8.1 kB view hashes)

Uploaded Source

Built Distribution

billionprompt-0.0.1-py3-none-any.whl (9.8 kB view hashes)

Uploaded Python 3

Supported by

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