Get project safety alert
client.safety.alerts.retrieve(stringid, RequestOptionsoptions?): SafetyAlert { id, created_at, error_type, 7 more }
GET/safety/alerts/{id}
Get a safety alert belonging to the authenticated API project.
Get project safety alert
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted
});
const safetyAlert = await client.safety.alerts.retrieve('id');
console.log(safetyAlert.id);{
"id": "alert_0123456789abcdef0123456789abcdef",
"object": "safety.alert",
"created_at": 1787659200,
"request_id": "req_123",
"response_id": "resp_123",
"model": "gpt-6-astra",
"request_paused": true,
"error_type": "potentially_unintended_data_access",
"reason": "Potentially unintended data access."
}
Returns Examples
{
"id": "alert_0123456789abcdef0123456789abcdef",
"object": "safety.alert",
"created_at": 1787659200,
"request_id": "req_123",
"response_id": "resp_123",
"model": "gpt-6-astra",
"request_paused": true,
"error_type": "potentially_unintended_data_access",
"reason": "Potentially unintended data access."
}