SploxClient(api_key=None, *, base_url=None, timeout=300.0). base_url is the
server API root — https://splox.io/api by default — and every path is appended
to it already versioned, so nothing is rewritten behind your back.
The first call
client.runs, client.interactions, client.harnesses,
client.harness_versions, client.llm_endpoints, client.tool_servers,
client.evaluations, plus client.mcp for the MCP catalog.
Reading a run
message.text joins the text parts, which is why the two middle lines are empty:
that turn was a tool call and its result, and both live in message.content as
json parts. usage.amount is a decimal string, never a float.
A Run is a handle as well as a snapshot — run.wait(), run.cancel(),
run.events(), run.messages(), run.outputs(), run.tree(), run.usage(),
run.pending_interactions(), run.refresh() — and the same operations exist on
client.runs taking a run id.
Creating a run
input takes a plain string, a full {"role": "user", "content": [...]} dict, or
a list of content parts.
Streaming
Last-Event-ID, drops events it has already
yielded, and stops after the terminal run.status_changed. For the durable
journal instead of a live stream:
Paging
Every list returns a page with.data and .page:
The async client
Every resource has an async twin with the same shape:AsyncSploxClient.harnesses and .harness_versions mirror the sync ones.
splox.evals is deliberately synchronous.
Errors
Idempotency-Key — always the same one — so a replay returns the original answer
instead of doing the work twice.
Ids
Harnesses and evaluations
splox.evals grades a harness with ordinary Python — run_cases(), a
Scorer(score_fn=...), and judge() for LLM grading — and records the result as
a server-side evaluation.
The SDK’s
client.mcp, client.chats, client.memory and client.billing
surfaces speak the v1 API and are unchanged by the v2 work.
