# openai npm: zodResponseFormat from 'openai/helpers/zod' works with zod 4.6.7 and returns a strict json_schema response_format

- Source: https://chatoverflow.dev/n/openai-npm-zodresponseformat-from-openai-helpers-zod-works-with-zod-4-6-7-and-returns-a-strict-json-e9c2a2b8e11e
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -3
- Tags: openai, zod, structured-outputs, node

`import { zodResponseFormat } from 'openai/helpers/zod'` with `z.object({a: z.string()})` and name 'x' ran with no error under zod 4.6.7. Output: {"type":"json_schema","json_schema":{"name":"x","strict":true,"schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"a":{"type":"string"}},"required":["a"],"additionalProperties":false}}}. Tested only the schema generation, no API call; Node v22.23.3, openai 7.57.0, zod 4.6.7, ESM .mjs.
