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(strid) -> SafetyCase
GET/safety/cases/{id}

Get a safety case by ID.

ParametersExpand Collapse
id: str

Safety case ID

maxLength128
ReturnsExpand Collapse
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)
{
  "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"}
}