OpenAI 获取安全个案
2026-11-11 09:54 更新
获取安全个案
get /safety/cases/{id}
按 ID 获取安全个案。
路径参数
id: string
安全个案 ID。
maxLength: 128
返回值
SafetyCase object { id, created_at, entity_identifier, 3 more }
id: string
created_at: integer
format: unixtime
entity_identifier: string
notice: object { type }
type: "warning" or "deactivation"
"warning"
"deactivation"
object: "safety.case" (default: "safety.case")
"safety.case"
reason: string or null
请求示例
## 先设置 OPENAI_API_KEY,并替换文件路径或资源 ID 后再运行。
curl https://api.openai.com/v1/safety/cases/$ID \
-H "Authorization: Bearer $OPENAI_API_KEY"
200 响应示例
{
"id": "id",
"created_at": 0,
"entity_identifier": "entity_identifier",
"notice": {
"type": "warning"
},
"object": "safety.case",
"reason": "reason"
}
请求示例
## 先设置 OPENAI_API_KEY,并替换文件路径或资源 ID 后再运行。
curl https://api.openai.com/v1/safety/cases/C-abc123 \
-H "Authorization: Bearer $OPENAI_API_KEY"
响应示例
{
"id": "C-abc123",
"object": "safety.case",
"created_at": 1787659200,
"entity_identifier": "safety-id-123",
"reason": "cyber_abuse",
"notice": {"type": "warning"}
}以上内容是否对您有帮助:

TRAE-AI编程


更多建议: