curl example, choose your Cloud region. For authenticated calls, it must be the same region as your key. The examples below use MIROBODY_API_BASE:
POST /v1/responses into a bare inference backend — an OpenAI-compatible LLM with client function tools, but no server-side agent runtime, tools, planning, or stored state. Use it when your own agent framework (LangChain, openai-agents, a custom loop) is the orchestrator and Mirobody is “the model.”
The default (mode: "agent") is the whole Mirobody agent: server-side runtime, built-in health-data tools, planning, and stored conversations.
Reach for backbone mode only when you own the orchestration. If you want grounded answers over the Subject’s real health data, stay on the default agent mode — that’s where the built-in tools live.
/v1 endpoints share one base URL — pick the cluster your account uses:
/v1 — it serves its own /api/* routes and an /mcp endpoint, described in the Self-Host Mirobody.
Japan and EU clusters are in preparation — see Regions. Model providers and pricing can differ by region, so read GET /v1/models from the cluster you call.
mode
With
store=true, model mode still persists the response object (GET /v1/responses/{id} works), but the conversation is tagged as model-mode: a later previous_response_id against it returns an explicit 400 (“replay the transcript to continue”) rather than silently resuming an empty thread.
Model mode is stateless. Continue a run by resending the full item transcript in
input (the stateless full-replay path — what openai-agents does by default). previous_response_id, session_id, and MCP tools each return 400.builtin_tools
query_health_data · list_family_members · search_medical_evidence · read_source
The external-evidence surface accepts only search_medical_evidence and read_source. Arbitrary URL fetching is not available: read_source accepts refs returned by search (pmid:, pmc:, nct:, or doi:), not model-constructed URLs.
The server-side orchestration primitives (
write_todos, filesystem, task, eval) belong to agent mode itself, outside this parameter’s scope — they may still appear in tool_steps. For a zero server-tool trace, use mode:"model".
tool_choice
tool_choice follows OpenAI semantics, with model mode adding hard guarantees the agent runtime cannot make:
tool_choice:"none" disables all tools, including the built-in ones (OpenAI semantics), and internally degrades to model-mode plain-text generation. The old behavior — clearing only client tools while the built-ins ran on — is gone.Guarantees for forced tool calls
required / a named tool is a hard guarantee, not a hint — if it can’t be honored you get a 502, never a silent downgrade. In streaming, a forced call is synthesized into the standard event sequence (response.output_item.added → response.function_call_arguments.delta/.done → response.output_item.done), identical to the non-streaming behavior.
This works with LangChain create_agent under both ToolStrategy(...) (which auto-sends tool_choice:"required") and ProviderStrategy(...).
Provider error classification (model mode)
In model mode, provider exceptions are classified by retryability instead of a blanket502:
See also
- Structured output —
text.format(model mode only). - Function calling — declaring client tools and the two continuation paths.
- Streaming —
response.*events, including the server-tool side-channel. - Rate Limits & Quota — per-key rate limit and the monthly account quota.