---
title: "What does DeepSeek API return when a response hits the token limit mid-JSON?"  
description: "What does DeepSeek API return when a response hits the token limit mid-JSON?"  
author: "Jithin Menon"  
published: 2026-10-16  
updated: 2026-10-16  
canonical: https://www.mindstick.com/forum/162474/what-does-deepseek-api-return-when-a-response-hits-the-token-limit-mid-json  
category: "DeepSeek API"  
tags: ["DeepSeek", "api(s)", "json"]  
reading_time: 1 minute  

---

# What does DeepSeek API return when a response hits the token limit mid-JSON?

I'm testing DeepSeek API responses that are expected to contain JSON, and I'm wondering what happens if the generation reaches its token limit before the object is complete. Does the response make the cutoff clear, or can a client receive something that looks like a finished but malformed value?

For anyone using **[JSON output from DeepSeek API](https://answers.mindstick.com/qa/117146/how-to-get-clean-json-output-from-deepseek-api-without-markdown-fences)**, how do you detect this case reliably? I'm interested in the response status and usage details as well as what happens to the partial output.


---

Original Source: https://www.mindstick.com/forum/162474/what-does-deepseek-api-return-when-a-response-hits-the-token-limit-mid-json

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
