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

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

Get a safety case by ID.

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");
    }
}
Response example
{
  "id": "C-abc123",
  "object": "safety.case",
  "created_at": 1787659200,
  "entity_identifier": "safety-id-123",
  "reason": "cyber_abuse",
  "notice": {"type": "warning"}
}
Parameters
CaseRetrieveParams params
Optional<String> id

Safety case ID

maxLength128
Returns
class SafetyCase:
String id
long createdAt
formatunixtime
String entityIdentifier
Notice notice
JsonValue; object_
constant
constant
Optional<String> reason
Returns Examples
Response example
{
  "id": "C-abc123",
  "object": "safety.case",
  "created_at": 1787659200,
  "entity_identifier": "safety-id-123",
  "reason": "cyber_abuse",
  "notice": {"type": "warning"}
}