AI Studio SDK
Krutrim AI Studio SDK Guide (Python)
1. Overview
The Krutrim AI Studio / AI Cloud Python SDK (krutrim-cloud) is intended for model inference, image generation, speech/text APIs, fine-tuning and BYOM workflows. It supports synchronous and asynchronous workflows for AI applications. It does not provide Core Infrastructure or Sandbox APIs.
Need VPCs, VMs, storage, security groups, or Sandbox? Use the separate Core Infrastructure SDK: pip install krutrim-client and from krutrim_client import KrutrimClient. See Which Python SDK should I use? and the Core Infrastructure installation guide. These are distinct SDK scopes, not a deprecation or a replacement relationship.
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. Error Handling
API responses may raise exceptions for invalid input, network issues, or internal errors.
Basic handling:
6. Using Async Workflows
7. Examples & Sample Projects
Explore example notebooks and scripts:
[Fine-Tuning (Coming Soon)]
[CLI Wrapper (WIP)]
8. Versioning & Updates
To upgrade the SDK:
Check the GitHub repo for changelogs and release notes.
9. Support & Contribution
Last updated

