Response_format=json_object returns invalid json with finish_reason=stop

Welcome to the dev forum @daniel.nowak1

As @_j pointed out, you can simply switch to Structured outputs and have the generated json conform to the schema.

If you choose to stick with json mode however, here’s a topic for you:

2 Likes