Documentation Index Fetch the complete documentation index at: https://docs.splox.io/llms.txt
Use this file to discover all available pages before exploring further.
Splox provides official SDKs so you can integrate workflows, chats, and billing into your applications without hand-rolling HTTP requests.
Node.js / TypeScript npm install splox
Go go get github.com/splox-ai/go-sdk
Quick Start
Python
Node.js / TypeScript
Go
from splox import SploxClient
client = SploxClient( api_key = "YOUR_API_KEY" )
# List workflows
workflows = client.workflows.list()
for wf in workflows.workflows:
print (wf.id, wf.latest_version.name)
# Create a chat and run a workflow
chat = client.chats.create( name = "My Session" , resource_id = wf.id)
version = client.workflows.get_latest_version(wf.id)
entry_nodes = client.workflows.get_entry_nodes(version.id)
result = client.workflows.run(
workflow_version_id = version.id,
chat_id = chat.id,
entry_node_ids = [entry_nodes.nodes[ 0 ].id],
query = "Hello, world!" ,
)
# Stream real-time updates
for event in client.workflows.listen(result.workflow_request_id):
if event.node_execution:
print ( f "[ { event.node_execution.status } ] { event.node_execution.node_id } " )
# Check your balance
balance = client.billing.get_balance()
print ( f "Balance: $ { balance.balance_usd :.2f} " )
Available Services
Every SDK client exposes the same four service namespaces:
Service Description workflows List, get, run, listen, stop workflows and inspect execution trees chats Create, list, get, delete chat sessions and message history events Trigger workflows via webhooks billing Check balance, transaction history, activity stats, and daily usage
Authentication
All SDKs accept an API key directly or via the SPLOX_API_KEY environment variable:
# Explicit
client = SploxClient( api_key = "YOUR_API_KEY" )
# From environment variable SPLOX_API_KEY
client = SploxClient()
Generate API tokens from your account settings .
Async Support
The Python SDK includes a fully async client for use with asyncio:
from splox import AsyncSploxClient
async with AsyncSploxClient( api_key = "YOUR_API_KEY" ) as client:
balance = await client.billing.get_balance()
print ( f "Balance: $ { balance.balance_usd :.2f} " )
Error Handling
All SDKs raise typed errors you can catch individually:
from splox import SploxClient
from splox.exceptions import (
AuthenticationError,
NotFoundError,
RateLimitError,
)
try :
client.workflows.get( "nonexistent-id" )
except AuthenticationError:
print ( "Invalid API key" )
except NotFoundError:
print ( "Workflow not found" )
except RateLimitError as e:
print ( f "Rate limited — retry after { e.retry_after } s" )
Source Code
Python SDK GitHub Repository
Node.js SDK GitHub Repository