Skip to main content

DevShakti AI SDK

Python SDK for Shakti AI - An OpenAI-compatible LLM API.

🚀 Installation

pip install devshakti-ai

📚 Documentation

Full documentation, interactive playground, and API reference available at:

🔗 https://shakti-one.vercel.app

⚡ Quick Start

from shakti import ChatShakti
import json

# Initialize client
client = ChatShakti(api_key="sk-your-api-key")

# Simple completion
response = client.chat.completions.create(
    messages=[{"role": "user", "content": "Hello"}]
)
print(response['choices'][0]['message']['content'])

🎯 Streaming Example

from shakti import ChatShakti
import json

client = ChatShakti(api_key="sk-your-api-key")

# Streaming response
for chunk in client.chat.completions.create(
    messages=[{"role": "user", "content": "Tell me a story"}],
    stream=True
):
    chunk_dict = json.loads(chunk)
    content = chunk_dict['choices'][0]['delta'].get('content', '')
    if content:
        print(content, end='', flush=True)

🎨 Custom Configuration

from shakti import ChatShakti

# Custom base URL and parameters
client = ChatShakti(
    api_key="sk-your-api-key",
    base_url="https://devshakti.serveo.net"  # Optional
)

response = client.chat.completions.create(
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hello!"}
    ],
    model="shakti-01-chat",
    temperature=0.7,
    max_tokens=1024,
    stream=False
)

✨ Features

  • ✅ OpenAI-compatible API - Easy migration from OpenAI
  • ✅ Streaming support - Real-time token streaming
  • ✅ Simple Python interface - Clean, intuitive SDK
  • ✅ Free tier available - Get started at no cost
  • ✅ Fast responses - 2-3 second average latency
  • ✅ Rate limiting - 60 requests/min, 150k tokens/min

🔧 API Endpoints

  • Base URL: https://devshakti.serveo.net
  • Chat Completions: /v1/chat/completions
  • Models: /v1/models
  • Health Check: /health

📝 Basic Usage

Simple Request

response = client.chat.completions.create(
    messages=[{"role": "user", "content": "What is Python?"}]
)

With System Prompt

response = client.chat.completions.create(
    messages=[
        {"role": "system", "content": "You are a coding expert."},
        {"role": "user", "content": "Explain async/await"}
    ]
)

Streaming Tokens

for chunk in client.chat.completions.create(
    messages=[{"role": "user", "content": "Write a poem"}],
    stream=True
):
    # Process each token as it arrives
    chunk_dict = json.loads(chunk)
    content = chunk_dict['choices'][0]['delta'].get('content', '')
    if content:
        print(content, end='', flush=True)

🔑 Get Your API Key

Visit https://shakti-one.vercel.app to:

  • 🔐 Generate your free API key
  • 🎮 Try the interactive playground
  • 📖 Read full documentation
  • 💻 See more code examples

📊 Rate Limits

  • Requests: 60 per minute
  • Tokens: 150,000 per minute
  • Concurrent: 10 requests

🛠️ Requirements

  • Python 3.7+
  • requests library (installed automatically)

🤝 Support

📄 License

MIT License - See LICENSE file for details.

🌟 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


Made with ❤️ by Shivnath Tathe

Get Started →

Metadata

Release files for devshakti-ai 0.1.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 devshakti-ai 0.1.2
File Size Uploaded
devshakti_ai-0.1.2.tar.gz 5.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for devshakti-ai 0.1.2
File Interpreter ABI Platform
devshakti_ai-0.1.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 12.2 kB

Release files / devshakti_ai-0.1.2.tar.gz

Download URL devshakti_ai-0.1.2.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
04000b606c6730ada0eedfebf86869fa9ad9570ece9e9abbe5c0364eee4f1d98
BLAKE2b-256 checksum
How to use checksums
aa8f6b1e95e196c354a4e280575b4165b58e29e5290edc4c961a895f3af1b449
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.4

Release files / devshakti_ai-0.1.2-py2.py3-none-any.whl

Download URL devshakti_ai-0.1.2-py2.py3-none-any.whl
Size 6.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
04ce340c0dbd43121a502c69b7231760704dfc0fa0deb9e1ccbf452d9e058fa7
BLAKE2b-256 checksum
How to use checksums
ae9318a02bd734ed019dcaece2a3392e6e04e504604c7f9e61df506bc7915d63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.0

2 release files

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