Skip to main content
{"type": "json_object"} asks for any JSON object without a schema. Mention JSON in the prompt when you use it. The SDK helper client.chat.completions.parse() with a Pydantic or Zod model builds the same response_format, and it works against NagaAI too. On models without schema support NagaAI falls back to JSON mode plus the schema in the prompt, so validate the result. See Structured outputs.