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

Get safety case

safety.cases.retrieve(id) -> SafetyCase { id, created_at, entity_identifier, 3 more }
GET/safety/cases/{id}

Get a safety case by ID.

ParametersExpand Collapse
id: String

Safety case ID

maxLength128
ReturnsExpand Collapse
class SafetyCase { id, created_at, entity_identifier, 3 more }
id: String
created_at: Integer
formatunixtime
entity_identifier: String
notice: Notice{ type}
object: :"safety.case"
reason: String

Get safety case

require "openai"

openai = OpenAI::Client.new(api_key: "My API Key")

safety_case = openai.safety.cases.retrieve("id")

puts(safety_case)
{
  "id": "C-abc123",
  "object": "safety.case",
  "created_at": 1787659200,
  "entity_identifier": "safety-id-123",
  "reason": "cyber_abuse",
  "notice": {"type": "warning"}
}
Returns Examples
{
  "id": "C-abc123",
  "object": "safety.case",
  "created_at": 1787659200,
  "entity_identifier": "safety-id-123",
  "reason": "cyber_abuse",
  "notice": {"type": "warning"}
}