curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "openai/omni-moderation-latest",
"input": {
"prompt": "An elderly grandfather and his granddaughter sit in a quiet rural railway waiting room on a rainy autumn night while a station attendant offers tea.",
"image_urls": [
"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png"
]
}
}
'{
"code": 200,
"data": {
"task_id": "3K8RB0DB7SGSLQJG",
"status": "not_started",
"created_time": "2026-11-25T11:13:01"
}
}{
"detail": "prompt or image_urls is required"
}{
"detail": "prompt or image_urls is required"
}Tools
Omni Moderation
The Omni Moderation API checks text and one HTTPS image against OpenAI’s safety categories and returns flags, scores and input types per category.
POST
/
api
/
generate
/
submit
curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "openai/omni-moderation-latest",
"input": {
"prompt": "An elderly grandfather and his granddaughter sit in a quiet rural railway waiting room on a rainy autumn night while a station attendant offers tea.",
"image_urls": [
"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png"
]
}
}
'{
"code": 200,
"data": {
"task_id": "3K8RB0DB7SGSLQJG",
"status": "not_started",
"created_time": "2026-11-25T11:13:01"
}
}{
"detail": "prompt or image_urls is required"
}{
"detail": "prompt or image_urls is required"
}- After submission, a
task_idwill be returned. If you provided acallback_url, when the task status becomesfinishedorfailed, a POST request will be sent to thecallback_url. - Regardless of whether
callback_urlis provided, you can retrieve the result through the unified Query Task Status endpoint.
omni-moderation-latest on text, an image, or both, and returns whether the input is flagged together with per-category scores. Use it to screen user prompts and uploads before sending them to generation models.
The endpoint uses the same task flow as the generation models: submit to /api/generate/submit, then read the verdict from the output field of Query Task Status or the callback payload.
Models
- openai/omni-moderation-latest — Text and image moderation with OpenAI’s Omni Moderation model.
Features
- Classify text, one image, or both in one request.
- 13 categories, each with a boolean flag and a score between 0 and 1.
category_applied_input_typesshows whether each category was evaluated on text, image or both.- Works with
callback_urllike every Vidgo task.
Input modes
- Text: send
prompt. - Image: send one HTTPS URL in
image_urls. - Text and image: send both; categories that support images evaluate both inputs.
Required parameters
- At least one of
promptorimage_urls.
Optional parameters
prompt(string): Text to classify.image_urls(string[]): At most one public HTTPS image URL.
Output
The finished task has an emptyfiles array and the complete moderation result in output:
{
"id": "modr-4603",
"model": "omni-moderation-latest",
"results": [
{
"categories": {
"harassment": false,
"harassment/threatening": false,
"hate": false,
"hate/threatening": false,
"illicit": false,
"illicit/violent": false,
"self-harm": false,
"self-harm/instructions": false,
"self-harm/intent": false,
"sexual": false,
"sexual/minors": false,
"violence": false,
"violence/graphic": false
},
"category_applied_input_types": {
"harassment": [
"text"
],
"harassment/threatening": [
"text"
],
"hate": [
"text"
],
"hate/threatening": [
"text"
],
"illicit": [
"text"
],
"illicit/violent": [
"text"
],
"self-harm": [
"text"
],
"self-harm/instructions": [
"text"
],
"self-harm/intent": [
"text"
],
"sexual": [
"text"
],
"sexual/minors": [
"text"
],
"violence": [
"text"
],
"violence/graphic": [
"text"
]
},
"category_scores": {
"harassment": 1.5206840370677115e-06,
"harassment/threatening": 1.816222403812674e-07,
"hate": 1.0953122821495382e-06,
"hate/threatening": 8.851569304133282e-08,
"illicit": 8.530321297909616e-07,
"illicit/violent": 5.77192003016332e-07,
"self-harm": 4.53978687024344e-06,
"self-harm/instructions": 1.628051547091001e-07,
"self-harm/intent": 1.7231572752142392e-06,
"sexual": 3.3931448129766124e-07,
"sexual/minors": 8.059446204294678e-08,
"violence": 9.028039015031105e-06,
"violence/graphic": 3.535625074174432e-06
},
"flagged": false
}
]
}
results[0].flagged(boolean):truewhen the input is flagged in any category.results[0].categories(object): One boolean per category.results[0].category_scores(object): One score per category, from 0 to 1; higher means more likely.results[0].category_applied_input_types(object): The input types (text,image) evaluated for each category.
harassment, harassment/threatening, hate, hate/threatening, illicit, illicit/violent, self-harm, self-harm/instructions, self-harm/intent, sexual, sexual/minors, violence, violence/graphic.
Examples
- Text and image: a scene description plus the matching railway waiting-room image;
flagged: false. - Text only: a short story about a lighthouse keeper and a puffin;
flagged: false.
Notes
image_urlstakes one HTTPS URL; data URIs, Base64 strings and other schemes return 400.inputacceptspromptandimage_urls; other fields return 400. Putmodelandcallback_urlat the request root.- See the pricing page for current rates.
Body
application/json