AI Studio SDK
Krutrim Cloud SDK Guide (Python)
1. Overview
The Krutrim Python SDK (krutrim-cloud) provides a simple and consistent interface to interact with various AI and infrastructure services offered by Krutrim Cloud. It supports synchronous and asynchronous workflows, allowing developers to integrate image generation, text completion, and speech services into their applications with ease.
Supported Python Versions: 3.10 – 3.12 Package: https://pypi.org/project/krutrim-cloud
2. Installation
Install the SDK via pip:
pip install krutrim-cloudSystem Dependencies
Some modules require ffmpeg and ffprobe to be available in your environment:
# macOS (with Homebrew)
brew install ffmpeg
# Ubuntu/Debian
sudo apt-get install ffmpeg3. Authentication
You need an API key to authenticate your requests. This can be provided as an environment variable or passed directly into the client.
Environment Variable (Recommended)
Manual Key Injection
4. Client Initialization
Synchronous Client
Asynchronous Client
5. Core Functionalities
5.1 Image Generation (Diffusion)
5.2 Text Completion
5.3 Speech APIs (DIS / Bhashik Speech)
6. Error Handling
API responses may raise exceptions for invalid input, network issues, or internal errors.
Basic handling:
7. Using Async Workflows
8. Examples & Sample Projects
Explore example notebooks and scripts:
[Fine-Tuning (Coming Soon)]
[CLI Wrapper (WIP)]
9. Versioning & Updates
To upgrade the SDK:
Check the GitHub repo for changelogs and release notes.
10. Support & Contribution
For issues, submit a GitHub Issue here
For API key access, contact the Krutrim team
For feedback or enhancements, reach out via your internal Slack or community portal
Last updated
Was this helpful?

