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="US_LogOn",
target={"user": "you@example.com"},
vx={"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. "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.AP_Chatvx,target,access,cmd(optional objects)- Service-specific fields can be passed as extra keyword args.
resp = client.tps.call(
service="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="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="US_LogOn",
target={"user": "you@example.com"},
vx={"passcode": "1234"},
)
Agent: chat
resp = client.tps.call(
service="AP_Chat",
content="Hello",
rule=False,
)
MCP tools (list / install / invoke)
# List tools/templates visible to your account
resp = client.mcp.list_tools()
tools = resp.get("tools", []) if isinstance(resp, dict) else []
print("tools:", len(tools))
# Install (claim) a template by id
# client.mcp.install(template_id="tpl_123")
# 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)
resp = client.skills.list()
print(resp)
# Install (enable) a published skill by name
# client.skills.install(skill_name="json_pretty")
Documents (ingest)
# Queue a URL for ingestion
out = client.documents.ingest_url(url="https://example.com")
print(out)
# Or send raw text
out = client.documents.ingest_text(text="Hello from TitanVX")
print(out)
OpenAPI discovery (programmatic)
# List TPS services from the OpenAPI spec
services = client.openapi.tps_services()
print("tps services:", len(services))
Operational tips
- Use /apidocs to discover services and payload shapes.
- OpenAPI JSON: /api/openapi.json
- 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.