Skip to main content

🌌 LuxurAI Python SDK (v3.0.0)

Welcome to the official Python SDK for LuxurAI — India's premier, state-of-the-art AI platform. High-performance neural voice synthesis (322 models across 140+ languages), real-time LLM token streaming with client-side punctuation chunking, unified generation history, smart chat, and bleeding-edge code synthesis directly in Python.


🚀 Quick Installation

Install locally in editable mode or from source:

cd luxurai-sdk
pip install -e .

✨ Features & Usage

The SDK supports both an elegant dynamic global configuration (perfect for quick scripts) and a structured object-oriented Client instance (best for concurrent multi-tenant production).

1. Global Setup

import luxurai

# Set your API Key globally (lxr_v1_...)
luxurai.LuxurKey = "lxr_v1_your_api_key_here"
luxurai.Model    = "auto"

2. Neural Voice Synthesis (luxurai.voice)

Powered by 322 Microsoft Azure Neural Voices with sub-second latency and zero GPU expense:

# 🎙️ Generate high-fidelity neural speech
audio = luxurai.voice.speak(
    text="नमस्ते! लक्ज़र एआई में आपका स्वागत है।",
    gender="female",      # "female" | "male"
    lang="hi",            # "hi", "en", "es", "ja", or "auto"
    speed=1.0,            # 0.5 to 2.0
    save_to="welcome.mp3" # Save directly to file
)

print(f"Model used: {audio.model_used}")
print(f"Permanent Hugging Face URL: {audio.audio_url}")

Direct Speaker Playback (.play)

Play audio through your speakers with zero external audio dependencies:

# Plays directly through the speaker
luxurai.voice.play("Hello world! Welcome to LuxurAI voice engine.", gender="female")

3. Real-Time LLM Token Streaming (type="chunk")

When generating text with an LLM token-by-token, use type="chunk" to stream speech without waiting for the full response:

  • Buffers words on your local device until punctuation (., !, ?, ,, ;, \n).
  • Sends each sentence chunk to the server immediately.
  • Auto-plays the returned audio chunk through the speakers on arrival while continuing the LLM generation loop!
# ⚡ Instant voice playback from an LLM token stream
def get_llm_stream():
    words = ["Hello", " there!", " Welcome", " to", " the", " future", " of", " voice", " AI."]
    for w in words:
        yield w

# Auto-chunks by punctuation and plays each sentence chunk seamlessly:
luxurai.voice.play(
    stream=get_llm_stream(),
    type="chunk",
    gender="female",
    lang="auto"
)

4. Browse the 322 Neural Voice Models

Search and inspect all available neural voice models across 140+ language locales:

# Filter by language or gender
hindi_voices = luxurai.voice.list_voices(lang="hi", gender="female")
for v in hindi_voices:
    print(v["ShortName"], v["Gender"], v["LocaleName"])

5. Unified Generation History (luxurai.history)

Inspect past voice generations, chat sessions, and code generations:

# List recent generations
history = luxurai.history.list(type="voice", limit=20)

for item in history.get("history", []):
    print(item["id"], item["created_at"], item["text"], item.get("audio_url"))

# Get specific generation details
item = luxurai.history.get("gen_123456")

6. Privacy & Ghost Mode (store_voice=False)

By default, voice generations made with an API key are safely backed up to the Hugging Face 8.3 TB dataset and your user history. To opt out for complete privacy:

# Does NOT save to Hugging Face or history
audio = luxurai.voice.speak(
    text="Confidential audio synthesis",
    gender="male",
    store_voice=False
)

7. Smart Chat & Orchestration

Communicate with Luxur, the senior-dev brain of the platform:

# 🧠 Smart chatbot routing & orchestration
reply = luxurai.chat.orchestrate(
    message="Write a clean binary search in Python",
    complexity="low"
)

print(reply["response_to_user"])

8. Code Generation

Direct structural code synthesis:

# 💻 Code synthesis
code = luxurai.code.generate(
    prompt="A FastAPI middleware to validate JWT session tokens",
    language="python"
)
print(code["code"])

9. Rate Limits

All developer API keys are protected by multi-tier rate limiting:

  • Daily Quota: 300 requests / day (Free tier)
  • Minute Limit: 13 requests / minute
  • Burst Limit: 2 requests / second

Release files for luxur-ai 3.0.0

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

Source distribution (sdist)

Source distribution for luxur-ai 3.0.0
File Size Uploaded
luxur_ai-3.0.0.tar.gz 17.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for luxur-ai 3.0.0
File Interpreter ABI Platform
luxur_ai-3.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 38.7 kB

Release files / luxur_ai-3.0.0.tar.gz

Download URL luxur_ai-3.0.0.tar.gz
Size 17.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6846bca3b402e524cf2d2aaf70b19723f7ee2318302d87e93b0fd654a0e78fb2
BLAKE2b-256 checksum
How to use checksums
526d75fba06d4f160ea3938c2141d6e262c0174dfb723a57a7166394e90eefb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / luxur_ai-3.0.0-py3-none-any.whl

Download URL luxur_ai-3.0.0-py3-none-any.whl
Size 21.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3b947f0de4c41b593cf37ed4b73e5fb0fc45c973c63d2559d072998cc23a2cf7
BLAKE2b-256 checksum
How to use checksums
335c4498505db75c7a8ebd603ac7215d8a098dff998aab8535699f1f97d92435
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

3.1.1

2 release files

3.1.0

2 release files

This release

3.0.0 This release

2 release files

2.1.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

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