Prompt Buddy logoPrompt Buddy

openai · OpenAI Platform Docs

Safety best practices | OpenAI API

Provides guidelines and implementation strategies for mitigating risks such as prompt injection, jailbreaking, and harmful content generation when using OpenAI models.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Safety best practices | OpenAI API

Provides guidelines and implementation strategies for mitigating risks such as prompt injection, jailbreaking, and harmful content generation when using OpenAI models.

When To Use

Use when designing application architectures to prevent prompt injection, mitigate model misuse, or implement content moderation layers.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/safety-best-practices-openai-api-workflow-guide.mdA guide outlining safety implementation strategies including the Moderation API, adversarial testing, human-in-the-loop processes, and prompt engineering for the OpenAI API.Questions about a guide outlining safety implementation strategies including the Moderation API, adversarial testing, human-in-the-lo...
examples/safety-best-practices-openai-api-openai-api-safety-best-practices-python.textA Python code example demonstrating the implementation of safety parameters and client configuration using the OpenAI library.Exact payloads, commands, or snippets shown in A Python code example demonstrating the implementation of safety parameters and client configuration using the OpenAI...
examples/safety-best-practices-openai-api-openai-api-safety-best-practices-curl-r.textA curl command demonstrating a chat completions request with safety-related parameters for the OpenAI API.Exact payloads, commands, or snippets shown in A curl command demonstrating a chat completions request with safety-related parameters for the OpenAI API.

What This Skill Covers

  • OpenAI’s Moderation API is free-to-use and can help reduce the frequency of unsafe content in your completions. Alternatively, you may wish to develop your o...
  • Main sections: Use our free Moderation API, Adversarial testing, Human in the loop (HITL), Prompt engineering, “Know your customer” (KYC).

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://developers.openai.com/api/docs/guides/safety-best-practices