Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation
Theme

Get safety case

client.safety.cases.retrieve(id, options?): SafetyCase { id, created_at, entity_identifier, 3 more }
GET
/safety/cases/{id}

Get a safety case by ID.

Parameters
id: string

Safety case ID

maxLength128
Returns
SafetyCase { id, created_at, entity_identifier, 3 more }
id: string
created_at: number
formatunixtime
entity_identifier: string
notice: Notice { type }
object: "safety.case"
reason: string | null

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"}
}