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

SafetyCase safety().cases().retrieve(CaseRetrieveParamsparams = CaseRetrieveParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/safety/cases/{id}

Get a safety case by ID.

ParametersExpand Collapse
CaseRetrieveParams params
Optional<String> id

Safety case ID

maxLength128
ReturnsExpand Collapse
class SafetyCase:
String id
long createdAt
formatunixtime
String entityIdentifier
Notice notice
JsonValue; object_ "safety.case"constant"safety.case"constant
Optional<String> reason

Get safety case

package com.openai.example;

import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.safety.cases.CaseRetrieveParams;
import com.openai.models.safety.cases.SafetyCase;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        OpenAIClient client = OpenAIOkHttpClient.fromEnv();

        SafetyCase safetyCase = client.safety().cases().retrieve("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"}
}