The biggest trade off is you sometimes get invalid JSON. So I try repairing the JSON with some regex and also just retry a few times if it returns invalid JSON that can't be repaired.
https://github.com/juanignaciomolina/GPTyped
Really cool project! I want to make something similar I think if time and skills allow me to