Responses API (Reasoning)

View as Markdown

Responses API (Reasoning Models)

Use the responses API to query o-series and similar models that provide reasoning efforts.

1from meshapi import ResponsesParams
2
3reply = client.responses.create(
4 ResponsesParams(
5 model="openai/o4-mini",
6 input="Explain the halting problem in two sentences.",
7 reasoning={"effort": "medium"},
8 max_output_tokens=512,
9 )
10)
11
12print(reply.output)

Streaming works the same way via client.responses.stream(params).