Send one agent Playground message
Send one message to a project’s MCP servers and get the model’s reply plus the telemetry a participant in the conversation could not see: which tools ran, with what arguments, what each returned, per-call latency, and token usage.
Spends model credits per call. idempotencyKey is required and must be STABLE for the triggering intent: a fresh key per HTTP attempt deduplicates nothing, so a timeout-and-retry would run and bill the turn twice. With a stable key, a retry replays the completed turn.
Omit sessionId to start a session; pass the one this returns to continue it. Configuration (modelId, target, systemPrompt, toolMode) pins on the FIRST turn: a continuation that resends any of it is refused with details.reason: "CONFIG_ON_CONTINUATION".
Only sessions created through this endpoint may be continued through it (CONTINUATION_NOT_ALLOWED): appending to a human’s live Playground session would interleave two writers on one transcript.
toolMode defaults to read_only, which advertises only tools the server annotated readOnlyHint: true. That hint is server-asserted, so read_only is a policy this host applies, not a guarantee it can verify. auto advertises everything and may cause real external side effects through arbitrary third-party tools.
Pass hostId (or target an environmentId, which pins its own host) to run the turn AS a saved host. That is what selects the ENGINE: a host declaring an agent harness runs the real runtime, and one that cannot run here is refused BEFORE it spends (422, details.reason: "HARNESS_UNAVAILABLE", with details.kind naming the rule that refused) rather than quietly downgraded to the emulated engine. Every response names what actually ran in engine. hostId is per-turn and cannot be pinned, so a continuation of a session that named ONLY a host must re-send it: omitting it is a 400 with details.reason: "HOST_TARGET_REQUIRED", never a quiet fall back to the emulated engine.
Authorizations
MCPJam API key (sk_…). Create one at Settings → API keys. Guest sessions cannot use the API, and API keys cannot manage other API keys.
Body
Provider-prefixed model id, e.g. anthropic/claude-sonnet-5. Optional on a first turn: defaults to the environment model, then the client model, and pins the resolved model for continuations. A BARE id is rejected with details.reason: "MODEL_AMBIGUOUS" rather than guessed: an unprefixed id is indistinguishable from a local Ollama model, and guessing would spend on the wrong rail.
The saved host (client) this turn executes AS: it decides which ENGINE runs. A host that declares an agent harness (Claude Code, Codex, Cursor CLI) runs the real runtime; without one the turn runs MCPJam's emulated engine. The server re-fetches that host's own runtime config, so harness and computer are NEVER read from the request body: a body carrying either is a 400. PER-TURN, not pinned to the session: re-send it on every turn, and read engine on the response to confirm what ran. A continuation of a session that named ONLY a host must re-send it: omitting it is refused with details.reason: "HOST_TARGET_REQUIRED" rather than run on the emulated engine. Alongside environmentId it is an assertion only: a host contradicting the environment's own is rejected with details.reason: "HOST_TARGET_CONFLICT". Alone, the turn connects the host's own selected servers. A harness turn additionally requires toolMode: "auto" with no allowedTools/maxToolCalls: a harness builds its own tool set inside its sandbox, so the narrowing could not be applied, and the combination is refused rather than run with it silently dropped. It also cannot be combined with serverIds, because hostId cannot be pinned beside them and a later turn that omitted it would run the emulated engine on a session established on the harness (422, details.kind: "surface-unpinnable-host"): target an environmentId, or send hostId alone and narrow per turn with allowedServerIds.
First turn only; it is pinned to the session and reused on every continuation. Reasoning effort for the turn; wins over the effort a hostId's saved selection carries, and is applied or refused by the rail the model runs on, never dropped. Which levels a model accepts is supportedReasoningEfforts on GET /v1/models. Mutually exclusive with temperature: an effort replaces the sampling temperature.
none, minimal, low, medium, high, xhigh, max Response
The turn ran. persisted.outcome reports whether the transcript landed: a turn that ran but failed to persist still spent, so this is a 200 with an honest persisted block rather than an error.
WHICH ENGINE RAN: emulated, or harness:<id> such as harness:claude-code. Present on every turn. Read it rather than infer it from model. hostId is per-turn: a continuation of a host-only session is refused without it, and one that pinned its own serverIds runs the emulated engine: this is the field that says which.

