#Moderation Tokenizer
1 messages · Page 1 of 1 (latest)
Hi @honest mural. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
The Moderation API from OpenAI is designed to check whether content complies with OpenAI's usage policies. It provides classification capabilities that look for content in various categories. The models take in an arbitrary sized input that is automatically broken up into chunks of 4,096 tokens. If the input is more than 32,768 tokens, truncation is used which may omit a small number of tokens from the moderation check source (https://platform.openai.com/docs/models).
As for images, they are metered and charged in tokens, just like text inputs. The token cost of a given image is determined by its size and the detail option on each image_url block. All images with detail: low cost 85 tokens each. detail: high images are first scaled to fit within a 2048 x 2048 square, maintaining their aspect ratio. Then, they are scaled such that the shortest side of the image is 768px long. Finally, the number of 512px squares the image consists of is counted. Each of those squares costs 170 tokens. An additional 85 tokens are always added to the final total source (https://platform.openai.com/docs/guides/vision).