{
  "openapi": "3.1.0",
  "info": {
    "title": "Create Moderation",
    "version": "1.0.0",
    "description": "Check content with CometAPI's OpenAI-compatible moderation endpoint."
  },
  "servers": [
    {
      "url": "https://api.cometapi.com"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/v1/moderations": {
      "post": {
        "summary": "Create a moderation",
        "operationId": "createModeration",
        "description": "Checks text or multimodal input with a moderation model. The response is OpenAI-compatible and returns one `results` item for each moderated input.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "model",
                  "input"
                ],
                "properties": {
                  "model": {
                    "type": "string",
                    "description": "Required moderation model ID. Use `omni-moderation-latest` for text and image moderation unless you have a specific moderation model requirement.",
                    "example": "omni-moderation-latest"
                  },
                  "input": {
                    "description": "Content to check. Use a string for one text input, an array of strings for batch text checks, or OpenAI-style multimodal parts such as text plus `image_url` when the selected model supports it.",
                    "oneOf": [
                      {
                        "type": "string",
                        "description": "One text input to classify.",
                        "example": "...text to classify goes here..."
                      },
                      {
                        "type": "array",
                        "description": "Batch text inputs to classify in one request.",
                        "items": {
                          "type": "string"
                        },
                        "example": [
                          "First text to classify.",
                          "Second text to classify."
                        ]
                      },
                      {
                        "type": "array",
                        "description": "OpenAI-style multimodal input parts. Use a text part with an image_url part for image moderation. Public image URLs must be downloadable by CometAPI servers; use a base64 data URL for a self-contained image request.",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "required": [
                                "type",
                                "text"
                              ],
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text"
                                  ],
                                  "description": "Text input part."
                                },
                                "text": {
                                  "type": "string",
                                  "description": "Text to classify."
                                }
                              },
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "required": [
                                "type",
                                "image_url"
                              ],
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "image_url"
                                  ],
                                  "description": "Image input part."
                                },
                                "image_url": {
                                  "type": "object",
                                  "required": [
                                    "url"
                                  ],
                                  "properties": {
                                    "url": {
                                      "type": "string",
                                      "description": "Publicly downloadable image URL or base64 data URL."
                                    }
                                  },
                                  "additionalProperties": true,
                                  "description": "Image container for image input. Provide `url` with an HTTPS URL or a base64 data URL."
                                }
                              },
                              "additionalProperties": false
                            }
                          ]
                        },
                        "example": [
                          {
                            "type": "text",
                            "text": "...text to classify goes here..."
                          },
                          {
                            "type": "image_url",
                            "image_url": {
                              "url": "https://www.gstatic.com/webp/gallery/1.png"
                            }
                          }
                        ]
                      }
                    ],
                    "example": "I want to check this text before sending it to a model."
                  }
                }
              },
              "examples": {
                "Text": {
                  "summary": "Text input",
                  "value": {
                    "model": "omni-moderation-latest",
                    "input": "I want to bake cookies for my family."
                  }
                },
                "Batch text": {
                  "summary": "Batch text input",
                  "value": {
                    "model": "omni-moderation-latest",
                    "input": [
                      "I want to bake cookies.",
                      "Plan a birthday party for my friend."
                    ]
                  }
                },
                "Image URL": {
                  "summary": "Text plus image URL",
                  "description": "Use an image URL that CometAPI servers can download.",
                  "value": {
                    "model": "omni-moderation-latest",
                    "input": [
                      {
                        "type": "text",
                        "text": "...text to classify goes here..."
                      },
                      {
                        "type": "image_url",
                        "image_url": {
                          "url": "https://www.gstatic.com/webp/gallery/1.png"
                        }
                      }
                    ]
                  }
                },
                "Image data URL": {
                  "summary": "Text plus image data URL",
                  "description": "Use a base64 data URL for a self-contained image request.",
                  "value": {
                    "model": "omni-moderation-latest",
                    "input": [
                      {
                        "type": "text",
                        "text": "...text to classify goes here..."
                      },
                      {
                        "type": "image_url",
                        "image_url": {
                          "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAAAAAA6fptVAAAADElEQVR4nGP4//8/AAX+Av4N70a4AAAAAElFTkSuQmCC"
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Moderation decisions and token usage.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateModerationResponse"
                },
                "example": {
                  "id": "modr-1594",
                  "model": "omni-moderation-latest",
                  "results": [
                    {
                      "flagged": false,
                      "categories": {
                        "harassment": false,
                        "harassment/threatening": false,
                        "hate": false,
                        "hate/threatening": false,
                        "illicit": false,
                        "illicit/violent": false,
                        "self-harm": false,
                        "self-harm/intent": false,
                        "self-harm/instructions": false,
                        "sexual": false,
                        "sexual/minors": false,
                        "violence": false,
                        "violence/graphic": false
                      },
                      "category_scores": {
                        "harassment": 0.0001,
                        "harassment/threatening": 0.0001,
                        "hate": 0.0001,
                        "hate/threatening": 0.0001,
                        "illicit": 0.0001,
                        "illicit/violent": 0.0001,
                        "self-harm": 0.0001,
                        "self-harm/intent": 0.0001,
                        "self-harm/instructions": 0.0001,
                        "sexual": 0.0001,
                        "sexual/minors": 0.0001,
                        "violence": 0.0001,
                        "violence/graphic": 0.0001
                      },
                      "category_applied_input_types": {
                        "harassment": [
                          "text"
                        ],
                        "harassment/threatening": [
                          "text"
                        ],
                        "hate": [
                          "text"
                        ],
                        "hate/threatening": [
                          "text"
                        ],
                        "illicit": [
                          "text"
                        ],
                        "illicit/violent": [
                          "text"
                        ],
                        "self-harm": [
                          "text"
                        ],
                        "self-harm/intent": [
                          "text"
                        ],
                        "self-harm/instructions": [
                          "text"
                        ],
                        "sexual": [
                          "text"
                        ],
                        "sexual/minors": [
                          "text"
                        ],
                        "violence": [
                          "text"
                        ],
                        "violence/graphic": [
                          "text"
                        ]
                      }
                    }
                  ],
                  "usage": {
                    "prompt_tokens": 12,
                    "completion_tokens": 0,
                    "total_tokens": 12,
                    "input_tokens": 12,
                    "output_tokens": 0,
                    "prompt_tokens_details": {
                      "cached_tokens": 0
                    },
                    "completion_tokens_details": {
                      "reasoning_tokens": 0
                    },
                    "input_tokens_details": null,
                    "claude_cache_creation_1_h_tokens": 0,
                    "claude_cache_creation_5_m_tokens": 0
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body is invalid or missing required input."
          },
          "401": {
            "description": "The API key is missing or invalid."
          },
          "503": {
            "description": "The selected moderation model is unavailable for the current account."
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "Text",
            "source": "curl https://api.cometapi.com/v1/moderations \\\n  -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $COMETAPI_KEY\" \\\n  -d '{\n  \"model\": \"omni-moderation-latest\",\n  \"input\": \"I want to bake cookies for my family.\"\n}'\n"
          },
          {
            "lang": "Shell",
            "label": "Batch text",
            "source": "curl https://api.cometapi.com/v1/moderations \\\n  -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $COMETAPI_KEY\" \\\n  -d '{\n  \"model\": \"omni-moderation-latest\",\n  \"input\": [\n    \"I want to bake cookies.\",\n    \"I want to kill someone.\"\n  ]\n}'\n"
          },
          {
            "lang": "Shell",
            "label": "Image URL",
            "source": "curl https://api.cometapi.com/v1/moderations \\\n  -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $COMETAPI_KEY\" \\\n  -d '{\n  \"model\": \"omni-moderation-latest\",\n  \"input\": [\n    {\n      \"type\": \"text\",\n      \"text\": \"...text to classify goes here...\"\n    },\n    {\n      \"type\": \"image_url\",\n      \"image_url\": {\n        \"url\": \"https://www.gstatic.com/webp/gallery/1.png\"\n      }\n    }\n  ]\n}'\n"
          },
          {
            "lang": "Shell",
            "label": "Image data URL",
            "source": "curl https://api.cometapi.com/v1/moderations \\\n  -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $COMETAPI_KEY\" \\\n  -d '{\n  \"model\": \"omni-moderation-latest\",\n  \"input\": [\n    {\n      \"type\": \"text\",\n      \"text\": \"...text to classify goes here...\"\n    },\n    {\n      \"type\": \"image_url\",\n      \"image_url\": {\n        \"url\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAAAAAA6fptVAAAADElEQVR4nGP4//8/AAX+Av4N70a4AAAAAElFTkSuQmCC\"\n      }\n    }\n  ]\n}'\n"
          },
          {
            "lang": "Python",
            "label": "Text",
            "source": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n    base_url=\"https://api.cometapi.com/v1\",\n    api_key=os.environ[\"COMETAPI_KEY\"],\n)\n\nresponse = client.moderations.create(\n    model=\"omni-moderation-latest\",\n    input=\"I want to bake cookies for my family.\",\n)\n\nprint(response)\n"
          },
          {
            "lang": "Python",
            "label": "Image data URL",
            "source": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n    base_url=\"https://api.cometapi.com/v1\",\n    api_key=os.environ[\"COMETAPI_KEY\"],\n)\n\nresponse = client.moderations.create(\n    model=\"omni-moderation-latest\",\n    input=[\n        {\"type\": \"text\", \"text\": \"...text to classify goes here...\"},\n        {\n            \"type\": \"image_url\",\n            \"image_url\": {\n                \"url\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAAAAAA6fptVAAAADElEQVR4nGP4//8/AAX+Av4N70a4AAAAAElFTkSuQmCC\",\n            },\n        },\n    ],\n)\n\nprint(response)\n"
          },
          {
            "lang": "Python",
            "label": "Batch text",
            "source": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n    base_url=\"https://api.cometapi.com/v1\",\n    api_key=os.environ[\"COMETAPI_KEY\"],\n)\n\nresponse = client.moderations.create(\n    model=\"omni-moderation-latest\",\n    input=[\n        \"I want to bake cookies.\",\n        \"I want to kill someone.\",\n    ],\n)\n\nfor result in response.results:\n    print(result.flagged)\n"
          },
          {
            "lang": "Python",
            "label": "Image URL",
            "source": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n    base_url=\"https://api.cometapi.com/v1\",\n    api_key=os.environ[\"COMETAPI_KEY\"],\n)\n\nresponse = client.moderations.create(\n    model=\"omni-moderation-latest\",\n    input=[\n        {\"type\": \"text\", \"text\": \"...text to classify goes here...\"},\n        {\n            \"type\": \"image_url\",\n            \"image_url\": {\n                \"url\": \"https://www.gstatic.com/webp/gallery/1.png\",\n            },\n        },\n    ],\n)\n\nprint(response)\n"
          },
          {
            "lang": "JavaScript",
            "label": "Text",
            "source": "import OpenAI from \"openai\";\n\nconst client = new OpenAI({\n  baseURL: \"https://api.cometapi.com/v1\",\n  apiKey: process.env.COMETAPI_KEY,\n});\n\nconst response = await client.moderations.create({\n  model: \"omni-moderation-latest\",\n  input: \"I want to bake cookies for my family.\",\n});\n\nconsole.log(response);\n"
          },
          {
            "lang": "JavaScript",
            "label": "Image data URL",
            "source": "import OpenAI from \"openai\";\n\nconst client = new OpenAI({\n  baseURL: \"https://api.cometapi.com/v1\",\n  apiKey: process.env.COMETAPI_KEY,\n});\n\nconst response = await client.moderations.create({\n  model: \"omni-moderation-latest\",\n  input: [\n    { type: \"text\", text: \"...text to classify goes here...\" },\n    {\n      type: \"image_url\",\n      image_url: {\n        url: \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAAAAAA6fptVAAAADElEQVR4nGP4//8/AAX+Av4N70a4AAAAAElFTkSuQmCC\",\n      },\n    },\n  ],\n});\n\nconsole.log(response);\n"
          },
          {
            "lang": "JavaScript",
            "label": "Batch text",
            "source": "import OpenAI from \"openai\";\n\nconst client = new OpenAI({\n  baseURL: \"https://api.cometapi.com/v1\",\n  apiKey: process.env.COMETAPI_KEY,\n});\n\nconst response = await client.moderations.create({\n  model: \"omni-moderation-latest\",\n  input: [\n    \"I want to bake cookies.\",\n    \"I want to kill someone.\",\n  ],\n});\n\nfor (const result of response.results) {\n  console.log(result.flagged);\n}\n"
          },
          {
            "lang": "JavaScript",
            "label": "Image URL",
            "source": "import OpenAI from \"openai\";\n\nconst client = new OpenAI({\n  baseURL: \"https://api.cometapi.com/v1\",\n  apiKey: process.env.COMETAPI_KEY,\n});\n\nconst response = await client.moderations.create({\n  model: \"omni-moderation-latest\",\n  input: [\n    { type: \"text\", text: \"...text to classify goes here...\" },\n    {\n      type: \"image_url\",\n      image_url: {\n        url: \"https://www.gstatic.com/webp/gallery/1.png\",\n      },\n    },\n  ],\n});\n\nconsole.log(response);\n"
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "CometAPI API key",
        "description": "CometAPI API key used for model requests. Send it as `Authorization: Bearer $COMETAPI_KEY`."
      }
    },
    "schemas": {
      "ModerationCategories": {
        "type": "object",
        "description": "Boolean moderation category decisions for one input item.",
        "additionalProperties": false,
        "properties": {
          "harassment": {
            "type": "boolean",
            "description": "Whether the input matched the harassment moderation category.",
            "example": false
          },
          "harassment/threatening": {
            "type": "boolean",
            "description": "Whether the input matched the harassment/threatening moderation category.",
            "example": false
          },
          "hate": {
            "type": "boolean",
            "description": "Whether the input matched the hate moderation category.",
            "example": false
          },
          "hate/threatening": {
            "type": "boolean",
            "description": "Whether the input matched the hate/threatening moderation category.",
            "example": false
          },
          "illicit": {
            "type": "boolean",
            "description": "Whether the input matched the illicit moderation category.",
            "example": false
          },
          "illicit/violent": {
            "type": "boolean",
            "description": "Whether the input matched the illicit/violent moderation category.",
            "example": false
          },
          "self-harm": {
            "type": "boolean",
            "description": "Whether the input matched the self-harm moderation category.",
            "example": false
          },
          "self-harm/intent": {
            "type": "boolean",
            "description": "Whether the input matched the self-harm/intent moderation category.",
            "example": false
          },
          "self-harm/instructions": {
            "type": "boolean",
            "description": "Whether the input matched the self-harm/instructions moderation category.",
            "example": false
          },
          "sexual": {
            "type": "boolean",
            "description": "Whether the input matched the sexual moderation category.",
            "example": false
          },
          "sexual/minors": {
            "type": "boolean",
            "description": "Whether the input matched the sexual/minors moderation category.",
            "example": false
          },
          "violence": {
            "type": "boolean",
            "description": "Whether the input matched the violence moderation category.",
            "example": false
          },
          "violence/graphic": {
            "type": "boolean",
            "description": "Whether the input matched the violence/graphic moderation category.",
            "example": false
          }
        }
      },
      "ModerationCategoryScores": {
        "type": "object",
        "description": "Moderation category confidence scores for one input item.",
        "additionalProperties": false,
        "properties": {
          "harassment": {
            "type": "number",
            "format": "float",
            "description": "Confidence score for the harassment moderation category.",
            "example": 0.0001
          },
          "harassment/threatening": {
            "type": "number",
            "format": "float",
            "description": "Confidence score for the harassment/threatening moderation category.",
            "example": 0.0001
          },
          "hate": {
            "type": "number",
            "format": "float",
            "description": "Confidence score for the hate moderation category.",
            "example": 0.0001
          },
          "hate/threatening": {
            "type": "number",
            "format": "float",
            "description": "Confidence score for the hate/threatening moderation category.",
            "example": 0.0001
          },
          "illicit": {
            "type": "number",
            "format": "float",
            "description": "Confidence score for the illicit moderation category.",
            "example": 0.0001
          },
          "illicit/violent": {
            "type": "number",
            "format": "float",
            "description": "Confidence score for the illicit/violent moderation category.",
            "example": 0.0001
          },
          "self-harm": {
            "type": "number",
            "format": "float",
            "description": "Confidence score for the self-harm moderation category.",
            "example": 0.0001
          },
          "self-harm/intent": {
            "type": "number",
            "format": "float",
            "description": "Confidence score for the self-harm/intent moderation category.",
            "example": 0.0001
          },
          "self-harm/instructions": {
            "type": "number",
            "format": "float",
            "description": "Confidence score for the self-harm/instructions moderation category.",
            "example": 0.0001
          },
          "sexual": {
            "type": "number",
            "format": "float",
            "description": "Confidence score for the sexual moderation category.",
            "example": 0.0001
          },
          "sexual/minors": {
            "type": "number",
            "format": "float",
            "description": "Confidence score for the sexual/minors moderation category.",
            "example": 0.0001
          },
          "violence": {
            "type": "number",
            "format": "float",
            "description": "Confidence score for the violence moderation category.",
            "example": 0.0001
          },
          "violence/graphic": {
            "type": "number",
            "format": "float",
            "description": "Confidence score for the violence/graphic moderation category.",
            "example": 0.0001
          }
        }
      },
      "ModerationCategoryAppliedInputTypes": {
        "type": "object",
        "description": "Input part types considered for each moderation category.",
        "additionalProperties": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "properties": {
          "harassment": {
            "type": "array",
            "description": "Input part types that were evaluated for the harassment category.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "image"
              ]
            },
            "example": [
              "text"
            ]
          },
          "harassment/threatening": {
            "type": "array",
            "description": "Input part types that were evaluated for the harassment/threatening category.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "image"
              ]
            },
            "example": [
              "text"
            ]
          },
          "hate": {
            "type": "array",
            "description": "Input part types that were evaluated for the hate category.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "image"
              ]
            },
            "example": [
              "text"
            ]
          },
          "hate/threatening": {
            "type": "array",
            "description": "Input part types that were evaluated for the hate/threatening category.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "image"
              ]
            },
            "example": [
              "text"
            ]
          },
          "illicit": {
            "type": "array",
            "description": "Input part types that were evaluated for the illicit category.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "image"
              ]
            },
            "example": [
              "text"
            ]
          },
          "illicit/violent": {
            "type": "array",
            "description": "Input part types that were evaluated for the illicit/violent category.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "image"
              ]
            },
            "example": [
              "text"
            ]
          },
          "self-harm": {
            "type": "array",
            "description": "Input part types that were evaluated for the self-harm category.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "image"
              ]
            },
            "example": [
              "text"
            ]
          },
          "self-harm/intent": {
            "type": "array",
            "description": "Input part types that were evaluated for the self-harm/intent category.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "image"
              ]
            },
            "example": [
              "text"
            ]
          },
          "self-harm/instructions": {
            "type": "array",
            "description": "Input part types that were evaluated for the self-harm/instructions category.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "image"
              ]
            },
            "example": [
              "text"
            ]
          },
          "sexual": {
            "type": "array",
            "description": "Input part types that were evaluated for the sexual category.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "image"
              ]
            },
            "example": [
              "text"
            ]
          },
          "sexual/minors": {
            "type": "array",
            "description": "Input part types that were evaluated for the sexual/minors category.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "image"
              ]
            },
            "example": [
              "text"
            ]
          },
          "violence": {
            "type": "array",
            "description": "Input part types that were evaluated for the violence category.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "image"
              ]
            },
            "example": [
              "text"
            ]
          },
          "violence/graphic": {
            "type": "array",
            "description": "Input part types that were evaluated for the violence/graphic category.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "image"
              ]
            },
            "example": [
              "text"
            ]
          }
        }
      },
      "ModerationResult": {
        "type": "object",
        "required": [
          "flagged",
          "categories",
          "category_scores",
          "category_applied_input_types"
        ],
        "properties": {
          "flagged": {
            "type": "boolean",
            "description": "Whether this input item was flagged by any moderation category.",
            "example": false
          },
          "categories": {
            "$ref": "#/components/schemas/ModerationCategories",
            "description": "Per-category boolean decision flags."
          },
          "category_scores": {
            "$ref": "#/components/schemas/ModerationCategoryScores",
            "description": "Per-category confidence scores between 0 and 1."
          },
          "category_applied_input_types": {
            "$ref": "#/components/schemas/ModerationCategoryAppliedInputTypes",
            "description": "For each category, the input types (`text`, `image`) that contributed to the decision."
          }
        },
        "additionalProperties": true
      },
      "ModerationUsage": {
        "type": "object",
        "description": "Token usage for the moderation request. Additional provider accounting fields can be present.",
        "additionalProperties": true,
        "properties": {
          "prompt_tokens": {
            "type": "integer",
            "description": "Input tokens counted for the request.",
            "example": 12
          },
          "completion_tokens": {
            "type": "integer",
            "description": "Output tokens counted for the request.",
            "example": 0
          },
          "total_tokens": {
            "type": "integer",
            "description": "Total tokens counted for the request.",
            "example": 12
          },
          "input_tokens": {
            "type": "integer",
            "description": "Input token count when reported separately.",
            "example": 12
          },
          "output_tokens": {
            "type": "integer",
            "description": "Output token count when reported separately.",
            "example": 0
          },
          "prompt_tokens_details": {
            "type": [
              "object",
              "null"
            ],
            "description": "Detailed prompt token accounting when provided.",
            "additionalProperties": true
          },
          "completion_tokens_details": {
            "type": [
              "object",
              "null"
            ],
            "description": "Detailed completion token accounting when provided.",
            "additionalProperties": true
          },
          "input_tokens_details": {
            "type": [
              "object",
              "null"
            ],
            "description": "Detailed input token accounting when provided.",
            "additionalProperties": true
          },
          "claude_cache_creation_1_h_tokens": {
            "type": "integer",
            "description": "One-hour cache creation tokens when reported by the provider accounting layer.",
            "example": 0
          },
          "claude_cache_creation_5_m_tokens": {
            "type": "integer",
            "description": "Five-minute cache creation tokens when reported by the provider accounting layer.",
            "example": 0
          }
        }
      },
      "CreateModerationResponse": {
        "type": "object",
        "required": [
          "id",
          "model",
          "results",
          "usage"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Moderation request ID.",
            "example": "modr-1594"
          },
          "model": {
            "type": "string",
            "description": "Model used for moderation.",
            "example": "omni-moderation-latest"
          },
          "results": {
            "type": "array",
            "description": "Moderation decisions. For batch text input, this array contains one result per input string.",
            "items": {
              "$ref": "#/components/schemas/ModerationResult"
            }
          },
          "usage": {
            "$ref": "#/components/schemas/ModerationUsage",
            "description": "Token usage for the moderation request."
          }
        },
        "additionalProperties": true
      }
    }
  }
}
