For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DocsAPI ReferenceSDKs
DocsAPI ReferenceSDKs
      • Overview
      • Chat Completions
      • Prompt Templates
      • Files & Batches
      • Embeddings
      • Image Generation
      • Responses (Reasoning)
      • Compare (Multi-model)
      • Models
      • Error Handling
LogoLogo
On this page
  • Responses API (Reasoning Models)
Node.js SDK

Responses API (Reasoning)

||View as Markdown|
Was this page helpful?
Edit this page
Previous

Image Generation

Next

Compare (Multi-model)

Built with

Responses API (Reasoning Models)

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

1const response = await client.responses.create({
2 model: "openai/o4-mini",
3 input: "Explain the halting problem in two sentences.",
4 reasoning: { effort: "medium" },
5 max_output_tokens: 512,
6});
7
8console.log(response.output);

Streaming works the same way via client.responses.create({ ...stream: true }).