clustroai-sdk
Project description
ClustroAI SDK
ClustroAI SDK is a powerful toolkit designed to harness idle computing resources for AI applications. It provides a comprehensive platform for AI enthusiasts and developers to utilize and monetize computing power efficiently.
Key Features
- Resource Utilization: ClustroAI SDK helps in tapping into underutilized computing resources, turning them into valuable assets for AI computation.
- AI Platform Integration: Seamlessly integrates with AI platforms, enabling easy access to computational resources.
Common APIs
create_model
: Create a new AI model.list_models
: List all available AI models.get_model
: Retrieve details of a specific model.create_inference_job
: Set up a job for model inference.create_worker
: Initialize a worker for computation tasks.run
: Execute a predefined task or process.username_run
: Run a task under a specific user context.
Warning
In the clustroai-sdk, the 'create' API requires the 'admin' role for creation. Additionally, the call frequency for other APIs is limited to 10 times per minute.
Getting Started
To get started with ClustroAI SDK, install the package from PyPI:
pip install clustroai-sdk
from clustroai_sdk import ClustroAI
api_key = "Your Clustro API_Key"
clustroai = ClustroAI(api_key, timeout=180)
all_models = clustroai.list_models()
print(all_models)
single_model = clustroai.get_model("097d04a6-1b30-424d-bf55-675fbc405a40")
print(single_model)
#clustroai.create_inference_job(model_id="9d1a93eb-0c6e-46ff-9014-f265ab04c7bd", name="test_job", set_as_model_default=True)
result = clustroai.run(input="A majestic lion jumping from a big stone at night", job_id='4ece46f4-f06d-4962-96c8-91e5c1d08ad6', sync=True)
print(result)
More Information
For more information, detailed documentation, and API reference, visit ClustroAI.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for clustroai_sdk-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e4143fdcba6c552c6f3eb5a460a8ad33dad75f9edee160990e49c8a61eab55b |
|
MD5 | 41e9c68636efb4110133ae0a3f7e592d |
|
BLAKE2b-256 | 87f7cccb2b8b822ec4fe76b74cdf027e38665ec366dc6215c2247b9be4eb1595 |