deepfates
/
openai-moderation
Runs the OpenAI moderation endpoint over a batch of images
- Public
- 993 runs
- GitHub
Run deepfates/openai-moderation with an API
Use one of our client libraries to get started quickly. Clicking on a library will take you to the Playground tab where you can tweak different inputs, see the results, and copy the corresponding code to use in your own project.
Input schema
The fields you can use to run this model with an API. If you don't give a value for a field its default value will be used.
Field | Type | Default value | Description |
---|---|---|---|
images_zip |
string
|
Optional ZIP file containing images to run safety checks on
|
|
inputs |
string
|
Optional JSON file of inputs, each can have 'text', 'image_url', or both
|
|
api_key |
string
|
OpenAI API key
|
{
"type": "object",
"title": "Input",
"required": [
"api_key"
],
"properties": {
"inputs": {
"type": "string",
"title": "Inputs",
"format": "uri",
"x-order": 1,
"description": "Optional JSON file of inputs, each can have 'text', 'image_url', or both"
},
"api_key": {
"type": "string",
"title": "Api Key",
"format": "password",
"x-order": 2,
"description": "OpenAI API key",
"x-cog-secret": true
},
"images_zip": {
"type": "string",
"title": "Images Zip",
"format": "uri",
"x-order": 0,
"description": "Optional ZIP file containing images to run safety checks on"
}
}
}
Output schema
The shape of the response you’ll get when you run this model with an API.
Schema
{
"type": "object",
"title": "Output",
"required": [
"total_inputs",
"total_time_taken",
"average_time_per_input",
"unsafe_inputs",
"errors"
],
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"title": "ErrorResult",
"required": [
"input_reference",
"error",
"time_taken"
],
"properties": {
"error": {
"type": "string",
"title": "Error"
},
"time_taken": {
"type": "number",
"title": "Time Taken"
},
"input_reference": {
"type": "string",
"title": "Input Reference"
}
}
},
"title": "Errors"
},
"total_inputs": {
"type": "integer",
"title": "Total Inputs"
},
"unsafe_inputs": {
"type": "array",
"items": {
"type": "object",
"title": "UnsafeInput",
"required": [
"input_reference",
"input_type",
"categories",
"time_taken"
],
"properties": {
"categories": {
"type": "array",
"items": {
"type": "object",
"title": "CategoryResult",
"required": [
"category",
"score"
],
"properties": {
"score": {
"type": "number",
"title": "Score"
},
"category": {
"type": "string",
"title": "Category"
}
}
},
"title": "Categories"
},
"input_type": {
"type": "string",
"title": "Input Type"
},
"time_taken": {
"type": "number",
"title": "Time Taken"
},
"input_reference": {
"type": "string",
"title": "Input Reference"
}
}
},
"title": "Unsafe Inputs"
},
"total_time_taken": {
"type": "number",
"title": "Total Time Taken"
},
"average_time_per_input": {
"type": "number",
"title": "Average Time Per Input"
}
}
}