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

safety.cases.retrieve(id) -> SafetyCase
GET
/safety/cases/{id}

Get a safety case by ID.

Parameters
id: str

Safety case ID

maxLength128
Returns
class SafetyCase: …
id: str
created_at: int
formatunixtime
entity_identifier: str
notice: Notice
object: Literal["safety.case"]
reason: Optional[str]

Get safety case

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ.get("OPENAI_API_KEY"),  # This is the default and can be omitted
)
safety_case = client.safety.cases.retrieve(
    "id",
)
print(safety_case.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"}
}