---
title: "How does the OpenAI API represent a refusal in a strict JSON response?"  
description: "How does the OpenAI API represent a refusal in a strict JSON response?"  
author: "Magdalena Michalska"  
published: 2026-10-16  
updated: 2026-10-16  
canonical: https://www.mindstick.com/forum/162440/how-does-the-openai-api-represent-a-refusal-in-a-strict-json-response  
category: "OpenAI API"  
tags: ["OpenAI", "API Development", "JSON schema"]  
reading_time: 1 minute  

---

# How does the OpenAI API represent a refusal in a strict JSON response?

I’m using strict JSON Schema output in an OpenAI API request and wondering what happens when the model needs to refuse. Does the response still contain a schema-shaped object, or is the refusal surfaced outside the requested structure?

I’m especially interested in how people handle this in clients that expect to parse every successful response as JSON. Is there a reliable way to distinguish a refusal from a schema or parsing failure?


---

Original Source: https://www.mindstick.com/forum/162440/how-does-the-openai-api-represent-a-refusal-in-a-strict-json-response

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
