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

client.Safety.Cases.Get(ctx, id) (*SafetyCase, error)
GET
/safety/cases/{id}

Get a safety case by ID.

Parameters
id string

Safety case ID

maxLength128
Returns
type SafetyCase struct{…}
ID string
CreatedAt int64
formatunixtime
EntityIdentifier string
Notice SafetyCaseNotice
Object SafetyCase
Reason string

Get safety case

package main

import (
  "context"
  "fmt"

  "github.com/openai/openai-go"
  "github.com/openai/openai-go/option"
)

func main() {
  client := openai.NewClient(
    option.WithAPIKey("My API Key"),
  )
  safetyCase, err := client.Safety.Cases.Get(context.TODO(), "id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", safetyCase.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"}
}