Some of your code is outside the code block, makes it hard to cut and paste into the IDE, but I think I understand.  Could you write a small example of a front-end that might use this POST API?
spam lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor creativity violence