Get safety case
client.safety.cases.retrieve(stringid , RequestOptionsoptions ?): SafetyCase { id, created_at, entity_identifier, 3 more }
GET
/safety/cases/{id}Get safety case
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted
});
const safetyCase = await client.safety.cases.retrieve('id');
console.log(safetyCase.id);Response example
{
"id": "C-abc123",
"object": "safety.case",
"created_at": 1787659200,
"entity_identifier": "safety-id-123",
"reason": "cyber_abuse",
"notice": {"type": "warning"}
}
Returns Examples
Response example
{
"id": "C-abc123",
"object": "safety.case",
"created_at": 1787659200,
"entity_identifier": "safety-id-123",
"reason": "cyber_abuse",
"notice": {"type": "warning"}
}