Skip to main content

Official Python SDK for DarkSyntrix — A stealth AI gateway orchestrating 24 private model pipelines through a secure Same-Origin proxy architecture.

Project description

DarkSyntrix Python SDK

PyPI Version Python Versions License GitLab

Official Python SDK for the DarkSyntrix AI Gateway — a stealth Same-Origin proxy architecture orchestrating 24 private model pipelines (LLM + media) behind a unified OpenAI-compatible API.


Authentication Flow

DarkSyntrix uses a frontend-first authentication model. There are two credential types:

1. API Key (vr_live_...) — for Chat & Media APIs

API keys are admin-created and distributed to users. You get your API key from the DarkSyntrix dashboard:

  1. Open the DarkSyntrix dashboard in your browser
  2. Sign up or log in to your account
  3. Navigate to the API Keys section
  4. Request a key — an admin will provision one for you
  5. Copy the key and use it in the SDK
from darksyntrix_sdk import DarkSyntrixClient

client = DarkSyntrixClient(
    base_url="https://your-gateway.app",
    api_key="vr_live_..."      # <-- from dashboard
)

2. Session Token — for Admin Operations

Session tokens are obtained by logging in and are used for key management & telemetry:

client.auth.login("admin_user", "your_password")
# Now client.keys.list(), client.telemetry.get() etc. are available

Note: API key creation (client.keys.create()) is admin-only. Regular users get their keys from the dashboard.


Quick Start

Chat (Non-Streaming)

from darksyntrix_sdk import DarkSyntrixClient

client = DarkSyntrixClient(
    base_url="https://your-gateway.app",
    api_key="vr_live_..."
)

response = client.chat.create(
    model="pulse_conversational_1.5b",
    messages=[{"role": "user", "content": "Hello!"}],
    stream=False
)
print(response.choices[0].message.content)

Chat (Streaming)

stream = client.chat.create(
    model="hyperion_r1_reasoning_7b",
    messages=[{"role": "user", "content": "Tell me a story"}],
    stream=True
)
for chunk in stream:
    for choice in chunk.choices:
        print(choice.delta.content, end="", flush=True)

Async Client

import asyncio
from darksyntrix_sdk import AsyncDarkSyntrixClient

async def main():
    async with AsyncDarkSyntrixClient(
        base_url="https://your-gateway.app",
        api_key="vr_live_..."
    ) as client:
        stream = await client.chat.create(
            model="pulse_conversational_1.5b",
            messages=[{"role": "user", "content": "Hello!"}],
            stream=True
        )
        async for chunk in stream:
            for choice in chunk.choices:
                print(choice.delta.content, end="", flush=True)

asyncio.run(main())

Admin: Login & Manage Keys

from darksyntrix_sdk import DarkSyntrixClient

client = DarkSyntrixClient(base_url="https://your-gateway.app")

# Login (requires existing admin account)
client.auth.login("admin_user", "secure_pass123")

# List existing keys
for key in client.keys.list():
    print(f"{key.id}: {key.description} (active: {key.is_active})")

# Create a new key for a user (admin only)
new_key = client.keys.create("user_name", "Production API key")
print(f"New key: {new_key}")

Media Processing

client = DarkSyntrixClient(
    base_url="https://your-gateway.app",
    api_key="vr_live_..."
)

# Upload a video
url = client.media.upload("path/to/video.mp4", "video.mp4", "video/mp4")

# Process with RIFE frame interpolation
result = client.media.process(
    model="frame_interpolation_rife",
    cloudinary_url=url,
    parameters={"interpolation_factor": 4}
)
print(result)

API Namespaces

Namespace Auth Required Description
client.auth None Register & login to obtain API keys / session tokens
client.keys Session (admin) List, create, and revoke API keys
client.chat API Key Blocking & streaming chat completions
client.media API Key Upload files & trigger GPU media processing
client.telemetry Session (admin) Real-time host metrics & database statistics

Features

  • Zero bloat — Only depends on httpx. Uses native Python dataclasses.
  • Sync + Async — Full mirror API with DarkSyntrixClient and AsyncDarkSyntrixClient.
  • SSE Streaming — First-class Server-Sent Events parser for real-time token streaming.
  • Connection Pooling — Built-in httpx connection pool with 120s timeout.
  • Full IDE Autocomplete — Typed dataclass response models.
  • Context Manager Support — Use with / async with for automatic cleanup.

Installation

pip install darksyntrix-sdk

Or from source:

pip install git+https://gitlab.com/llm_model/darksyntrix-sdk.git

Supported Models (24 Engines)

Conversational / General Assistant

  • pulse_conversational_1.5baurora_core_gemma_1bapex_conversational_llama_3b
  • infinity_phi_instruct_4sentinel_pulse_qwen_0.5bnebula_core_llama_1b
  • genesis_smollm_1.7bnexus_quantum_instruct_mini

Reasoning / Chain-of-Thought

  • hyperion_r1_reasoning_7bsynapse_r1_reasoning_1.5b

Code Generation

  • cyber_forge_coder_1.5bmatrix_core_coder_3btitan_apex_coder_7b
  • nova_starcoder_3bvector_gemma_coder_2bsynapse_coder_deepseek_1.3b
  • granite_matrix_coder_3bmicro_pulse_coder_0.5b

Media Processing (GPU)

  • acoustic_suppression_deepfilterphotographic_restoration_gfpgan
  • avatar_lipsync_hyperlipsgenerative_cinematic_ltx
  • super_resolution_esrganframe_interpolation_rife

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

darksyntrix_sdk-1.1.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

darksyntrix_sdk-1.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file darksyntrix_sdk-1.1.0.tar.gz.

File metadata

  • Download URL: darksyntrix_sdk-1.1.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for darksyntrix_sdk-1.1.0.tar.gz
Algorithm Hash digest
SHA256 cb21ae606d5a5cd1861acf4fd2080efbb1e56ef3ab451fe9cb25b33bc0caa7f7
MD5 cff2bbd5b9374ae3c12e0c6d25db6f7d
BLAKE2b-256 85864a6a70bafb2365934556bb3634cbebbdf6ca6a8a5de2d6e647238511cdb4

See more details on using hashes here.

File details

Details for the file darksyntrix_sdk-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for darksyntrix_sdk-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7d15e2a130773abc805db6afa80cf486e196d793b06c674853a9dd3287df5afe
MD5 f0f4d36f74e22be58d451b4ca7bd5a86
BLAKE2b-256 aee80adedf837604c5a1dac6de115af0ec66f3d38c4052ea47eab9f58cb3d839

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page