Skip to main content

The SplitticAPI Library provides a convenient Python interface for interacting with the Splittic API, enabling users to seamlessly integrate Splittic’s AI functionality into their applications. The library is designed to be user-friendly and versatile, supporting both asynchronous and synchronous programming.

Installation

To install the SplitticAPI Library, use the following command:

pip install SplitticAPI

Getting Started

  1. Obtain API Key:

  2. Initialize ChatModule:

    • Import the ChatModule class from SplitticAPI.meowgpt.

    • Set the global API key using ChatModule.initialize(api_key).

  3. Create a Chat Instance:

    • Create a new chat instance using ChatModule.create_chat(api_key).

    • Each instance automatically generates a unique chat ID.

  4. Send Messages:

    • Use the reply(message) method to send a synchronous message and receive a reply.

    • Optionally, use the async_reply(message) method for asynchronous interactions.

  5. Generate Images with DiffusionModule:

    • Import the DiffusionModule class from SplitticAPI.interdiffusion.

    • Initialize DiffusionModule with your API key.

    • Use the generate() method for synchronous image generation.

    • Alternatively, use async_generate() for asynchronous image generation.

    • The generated image is saved as “output.png” by default.

Example

from SplitticAPI.meowgpt import ChatModule
from SplitticAPI.interdiffusion import DiffusionModule

# Set the global API key
api_key = "your_api_key_here"
ChatModule.initialize(api_key)

# Create a ChatModule instance with a unique chat ID
chat_instance = ChatModule.create_chat(api_key)

# Send a synchronous message and get a reply
def main():
    reply = chat_instance.reply("Hi")
    print(reply)

    # Generate an image synchronously
    diffusion_module = DiffusionModule(api_key)
    diffusion_module.generate("cat")

# Run the program
if __name__ == "__main__":
    main()

For more detailed information, refer to the official Splittic API documentation.

License

This library is released under the MIT License. Feel free to use, modify, and distribute it according to your needs.

Metadata

Release files for SplitticAPI 1.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for SplitticAPI 1.4.2
File Size Uploaded
SplitticAPI-1.4.2.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for SplitticAPI 1.4.2
File Interpreter ABI Platform
SplitticAPI-1.4.2-py3-none-any.whl Python 3 none any Details

Total release size: 9.5 kB

Release files / SplitticAPI-1.4.2.tar.gz

Download URL SplitticAPI-1.4.2.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4917049c04e47f71765aaae75e3e19a911a3af5983dfc307cc989e10bee780fb
BLAKE2b-256 checksum
How to use checksums
cc560993764bb7e9ba9935497d30b4cc09fa0f237f618c7a9b473db3de1e35ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.0

Release files / SplitticAPI-1.4.2-py3-none-any.whl

Download URL SplitticAPI-1.4.2-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef20b01402e74101474201b53d7df1aa8acdf8d0d5cecced47940e46a51b1ded
BLAKE2b-256 checksum
How to use checksums
e13adef3df7734b3fe3df3dd5eb1b2a75a22d40dd098209fc3ecddfc57957a82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.0

Release history Release notifications | RSS feed

This release

1.4.2 This release

2 release files

1.4.1

2 release files

1.4

2 release files

1.3.1

2 release files

1.2

1 release file

1.1

1 release file

1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page