API reference¶
Cached, budget-capped calls to Meta’s Muse Spark.
- class Client(cap_usd, workdir, model='muse-spark-1.3-contributor', rates=None, transport=None, key=None, ledger=None)[source]¶
Structured Muse Spark completions under a hard spending cap.
- Parameters:
- property key¶
The API key, looked up on first use.
- payload(messages, schema, name, max_completion_tokens, reasoning_effort)[source]¶
The chat-completions request body for a structured answer.
- complete(messages, schema, name='result', max_completion_tokens=8000, reasoning_effort='low', key_extra=None, with_call=False)[source]¶
The parsed, schema-valid JSON answer to
messages; cached by request.key_extrais folded into the cache key and recorded, but not sent: use it for deliberate repeats of an identical request (a replicate, an explicit retry). Withwith_call=Truethe call’s folder is returned too, so a caller can keep its own derived files beside the request.
- exception UnknownOutcomeError[source]¶
The call was sent but no response arrived; it may have been charged.