Contents
Install
Install from this repo (editable) while developing:
cd sdk/python
python -m pip install -e .
Verify install:
python -c "from titanvx_sdk import TitanVxClient; print(TitanVxClient())"
Quickstart
from titanvx_sdk import TitanVxClient
client = TitanVxClient(
base_url="https://api.titanvx.com",
api_key="TITAN-REPLACE-ME",
)
resp = client.tps.call(
service="TPR_SRV_US_LOGON",
vx={"passcode": "1234", "confirm-passcode": "1234"},
)
print(resp)
Authentication
API key
Docs/testing & gateway keys.
client = TitanVxClient(
api_key="TITAN-REPLACE-ME",
)
Bearer
Titan session JWT.
client = TitanVxClient(
bearer_token="YOUR_JWT",
)
Optional: pass session_id to send a Session-Id header when the service expects it.
Client reference
TitanVxClient constructor
TitanVxClient(
base_url="https://api.titanvx.com",
api_key=None,
bearer_token=None,
session_id=None,
timeout_seconds=45.0,
)
tps.call()
client.tps.call(
service: str, # required, e.g. "TPR_SRV_AP_CHAT"
vx: dict | None = None, # optional
target: dict | None = None, # optional
access: dict | None = None, # optional
cmd: dict | None = None, # optional
**extra, # any other top-level fields for the service
) -> dict
Envelope fields
service(required): e.g.TPR_SRV_AP_CHATvx,target,access,cmd(optional objects)- Service-specific fields can be passed as extra keyword args.
resp = client.tps.call(
service="TPR_SRV_AP_CHAT",
content="Hello",
rule=False,
)
Errors
TitanVxHttpError: non-2xx response (includesstatus_codeand response text)TitanVxTransportError: network/timeout or request could not be made
from titanvx_sdk import TitanVxClient, TitanVxHttpError, TitanVxTransportError
client = TitanVxClient(api_key="TITAN-REPLACE-ME")
try:
client.tps.call(service="TPR_SRV_US_READ")
except TitanVxHttpError as e:
print("HTTP failed:", e.status_code, e.response_text[:300])
except TitanVxTransportError as e:
print("Transport failed:", str(e))
Examples
User: logon
resp = client.tps.call(
service="TPR_SRV_US_LOGON",
vx={"passcode": "1234", "confirm-passcode": "1234"},
target={"user": "your_user_name"},
)
Agent: chat
resp = client.tps.call(
service="TPR_SRV_AP_CHAT",
content="Hello",
rule=False,
)
MCP tools (list / install / invoke)
# List tools/templates visible to your account
tools = client.mcp.list_tools()
print("tools:", len(tools))
# Install (claim) a template by id
# client.mcp.install_tool(template_id="tpl_123", note="Enable for my project")
# Invoke a tool (gateway proxies to the tool runtime)
# out = client.mcp.invoke(tool_name="http_get_json", arguments={"url": "https://example.com"})
# print(out)
Skills (list / install)
skills = client.skills.list()
print("skills:", len(skills))
# Install (enable) a published skill by name
# client.skills.install(skill_name="json_pretty")
Operational tips
- Use /apidocs to discover services and payload shapes.
- If you need longer timeouts for large operations, increase
timeout_seconds. - Prefer a single shared
TitanVxClientinstance (it’s stateless).
Download as PDF: click Download PDF and choose “Save as PDF” in your browser print dialog.