原生OpenAI格式
检查文本内容是否违反使用政策
POST
https://api.xiexus.cn/v1/moderations
请求体:必填
接口信息
方法
POST路径
/v1/moderations完整地址
https://api.xiexus.cn/v1/moderations请求体
必填
标签
审查(Moderations)
响应码
200
静态文件
当前接口页内已嵌入 OpenAPI JSON;如果需要查看总文件,可直接打开固定静态文件
relay.json。当前 JSON
../../openapi/generated/ai-model/审查(Moderations)/post-v1-moderations-createmoderation-383826487.json总文件
../../openapi/relay.jsonOpenAPI JSON
已将服务地址固定为
https://api.xiexus.cn,其余结构保持和源文档一致。{
"openapi": "3.1.0",
"info": {
"title": "原生OpenAI格式",
"version": "1.0.0",
"description": "检查文本内容是否违反使用政策"
},
"tags": [
{
"name": "审查(Moderations)"
}
],
"components": {
"securitySchemes": {
"BearerAuth": {
"type": "http",
"scheme": "bearer",
"description": "使用 Bearer Token 认证。\n格式: `Authorization: Bearer sk-xxxxxx`\n"
}
}
},
"paths": {
"/v1/moderations": {
"post": {
"tags": [
"审查(Moderations)"
],
"summary": "原生OpenAI格式",
"description": "检查文本内容是否违反使用政策",
"operationId": "createmoderation",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"input"
],
"properties": {
"input": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"model": {
"type": "string",
"examples": [
"text-moderation-latest"
]
}
},
"x-apifox-orders": [
"input",
"model"
]
}
}
}
},
"security": [
{
"BearerAuth": []
}
],
"responses": {
"200": {
"description": "成功审核",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"model": {
"type": "string"
},
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"flagged": {
"type": "boolean"
},
"categories": {
"type": "object",
"properties": {},
"x-apifox-orders": []
},
"category_scores": {
"type": "object",
"properties": {},
"x-apifox-orders": []
}
},
"x-apifox-orders": [
"flagged",
"categories",
"category_scores"
]
}
}
},
"x-apifox-orders": [
"id",
"model",
"results"
]
}
}
}
}
}
}
}
},
"servers": [
{
"url": "https://api.xiexus.cn",
"description": "固定生产地址"
}
]
}