Model returned an empty response

Sometimes chat models may technically return a successful response, but the response is empty. In most cases, this happens because the max_tokens (output length) parameter is set too low.

This occurs because some models perform internal 'thinking' before responding; if this thinking exceeds the token limit, no tokens remain for the actual response, and they may exceed the limit during this internal processing, leaving no remaining tokens for the actual response.

To resolve the issue, try this:

  • If it's a Playground request, increase the Output length value on the right side of the screen
  • If you're making an API request, increase the max_tokens   value. If you are not currently setting it in your request, add it with a value higher than the default (512), for example:

"max_tokens": 3000  


If the issue persists, please contact our technical support team.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us