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

Uploaded Source

Built Distribution

billionprompt-0.0.2-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file billionprompt-0.0.2.tar.gz.

File metadata

  • Download URL: billionprompt-0.0.2.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for billionprompt-0.0.2.tar.gz
Algorithm Hash digest
SHA256 167283f9a51017a106e2526e58e83a956762ec427dd5a04d635871889ea37b16
MD5 f78c05e9d7d33fd6cb93226fc0c5b0c9
BLAKE2b-256 2bbb6c485d5518e0e9cf95db94b5803a59acf544540d9d62a6ce335bad159df1

See more details on using hashes here.

File details

Details for the file billionprompt-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for billionprompt-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a9c1ea232cf5b1a4949b2e6fe26a00b73476fb4b8a0e8fe5cbe83c3099380704
MD5 57d967cc40e6bd053e872d178a789afe
BLAKE2b-256 9f520962c954cbf3dcc1a86f7290655317e6fdf73836b20879cbe2ce15207e76

See more details on using hashes here.

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