隨著 GPT-5 推出,我們新增了一些檢查,以識別危險資訊並阻止使用者取得這類資訊。部分使用者日後可能會嘗試透過你的應用程式從事違反 OpenAI 政策的活動,尤其是用途廣泛的應用程式。
我們依據風險門檻,對傳送至 GPT-5 的請求進行分類。
如果你的組織反覆觸及高風險門檻,OpenAI 會回傳錯誤並寄送警告電子郵件。
如果這類請求在指定期限(通常為七天)過後仍持續出現,我們會停止你的組織對 GPT-5 的存取。屆時請求將無法再正常運作。
如果你的組織從事違反我們安全政策的可疑活動,我們可能會回傳錯誤、限制模型存取,甚至封鎖你的帳戶。以下安全措施有助於我們識別高風險請求的來源,並封鎖個別終端使用者,而非封鎖整個組織。
如果產品讓個別使用者與模型互動,請實作安全識別碼 。我們建議使用安全識別碼,但這不是強制要求。
如果你的使用案例需要存取限制較少的服務版本,才能在生命科學領域開展有益的應用,請參閱我們的特殊存取計畫 ,確認是否符合資格。
Responses API 和較舊的 Chat Completions API 都提供 safety_identifier 參數。Realtime API 則透過 OpenAI-Safety-Identifier 標頭支援相同概念。若要使用安全識別碼,請在每次請求中提供終端使用者的固定 ID。請對使用者的電子郵件地址或內部使用者 ID 進行雜湊處理,避免傳送任何個人資訊。
安全識別碼不會自動沿用至其他 API 或工作階段。如果你的應用程式已在 Responses API 請求中傳送 safety_identifier,請在建立或連線至每個 Realtime 工作階段時,另外傳入相同的固定值。
Responses API Chat Completions API Realtime API Responses API
1
2
3
4
5
6
7
8
9
10
11 import OpenAI from "openai" ;
const client = new OpenAI ();
const response = await client.responses. create ({
model: "gpt-5.6-terra" ,
input: "This is a test" ,
safety_identifier: "user_123456" ,
});
console. log (response.output_text); 1
2
3
4
5
6
7
8
9 from openai import OpenAI
client = OpenAI()
response = client.responses.create(
model="gpt-5.6-terra",
input="This is a test",
safety_identifier="user_123456",
) 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package main
import (
"context"
"fmt"
"github.com/openai/openai-go/v3"
"github.com/openai/openai-go/v3/responses"
)
func main() {
client := openai.NewClient()
response, err := client.Responses.New(context.Background(), responses.ResponseNewParams{
Model: "gpt-5.6-terra",
Input: responses.ResponseNewParamsInputUnion{OfString: openai.String("This is a test")},
SafetyIdentifier: openai.String("user_123456"),
})
if err != nil {
panic(err)
}
fmt.Println(response.OutputText())
} 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.responses.ResponseCreateParams;
ResponseCreateParams params =
ResponseCreateParams.builder()
.model("gpt-5.6-terra")
.input("Help me plan a study schedule.")
.safetyIdentifier("user_1234")
.build();
client.responses().create(params).output().stream()
.flatMap(item -> item.message().stream())
.flatMap(message -> message.content().stream())
.flatMap(content -> content.outputText().stream())
.forEach(text -> System.out.println(text.text())); 1
2
3
4
5
6
7
8
9
10 require "openai"
client = OpenAI::Client.new
response = client.responses.create(
model: "gpt-5.6-terra",
input: "Help me plan a study schedule.",
safety_identifier: "user_1234"
)
puts(response.output_text) 1
2
3
4
5
6
7
8 curl https://api.openai.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "gpt-5.6-terra",
"input": "This is a test",
"safety_identifier": "user_123456"
}' Chat Completions API
1
2
3
4
5
6
7
8
9
10
11 import OpenAI from "openai" ;
const client = new OpenAI ();
const response = await client.chat.completions. create ({
model: "gpt-5.6-terra" ,
messages: [{ role: "user" , content: "This is a test" }],
safety_identifier: "user_123456" ,
});
console. log (response.choices[ 0 ].message.content); 1
2
3
4
5
6
7
8
9 from openai import OpenAI
client = OpenAI()
response = client.chat.completions.create(
model="gpt-5.6-terra",
messages=[{"role": "user", "content": "This is a test"}],
safety_identifier="user_123456",
) 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package main
import (
"context"
"fmt"
"github.com/openai/openai-go/v3"
)
func main() {
client := openai.NewClient()
response, err := client.Chat.Completions.New(context.Background(), openai.ChatCompletionNewParams{
Model: "gpt-5.6-terra",
Messages: []openai.ChatCompletionMessageParamUnion{openai.UserMessage("This is a test")},
SafetyIdentifier: openai.String("user_123456"),
})
if err != nil {
panic(err)
}
fmt.Println(response.Choices[0].Message.Content)
} 1
2
3
4
5
6
7
8
9
10
11
12
13
14 import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.chat.completions.ChatCompletionCreateParams;
ChatCompletionCreateParams params =
ChatCompletionCreateParams.builder()
.model("gpt-5.6-terra")
.addUserMessage("Help me plan a study schedule.")
.safetyIdentifier("user_1234")
.build();
client.chat().completions().create(params).choices().stream()
.flatMap(choice -> choice.message().content().stream())
.forEach(System.out::println); 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 require "openai"
client = OpenAI::Client.new
completion = client.chat.completions.create(
model: "gpt-5.6-terra",
messages: [
{
role: :user,
content: "Help me plan a study schedule."
}
],
safety_identifier: "user_1234"
)
puts(completion.choices.fetch(0).message.content) 1
2
3
4
5
6
7
8
9
10 curl https://api.openai.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "gpt-5.6-terra",
"messages": [
{"role": "user", "content": "This is a test"}
],
"safety_identifier": "user_123456"
}' Realtime API
1
2
3
4
5
6
7
8
9
10 curl https://api.openai.com/v1/realtime/client_secrets \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY " \
-H "OpenAI-Safety-Identifier: user_123456" \
-d '{
"session": {
"type": "realtime",
"model": "gpt-realtime-2.1"
}
}'
如果 OpenAI 監控系統識別出潛在濫用,我們可能會採取不同程度的措施:
延遲串流回應
對於可能違反政策的使用者,OpenAI 可能會先採取影響較小的介入措施:延遲串流回應,在向該使用者回傳完整回應前執行額外檢查。
如果檢查通過,就會開始串流。如果檢查未通過,請求就會停止,不會顯示任何 Token,也不會開始串流回應。
為了改善終端使用者體驗,可考慮在串流延遲時顯示載入中的旋轉圖示。
封鎖個別使用者的模型存取
如果我們高度確信有違反政策的情況,相關的 safety_identifier 就會遭到全面封鎖,無法存取 OpenAI 模型。
之後所有使用相同安全識別碼的 GPT-5 請求,都會收到 identifier blocked 錯誤。OpenAI 目前無法解除個別識別碼的封鎖。
為使這些封鎖措施有效,請確保已設置管控措施,防止遭封鎖的使用者開設新帳戶。提醒你,如果組織反覆違反政策,可能會導致整個組織失去存取權。
具體的執行標準可能會隨著實際使用情況的變化或新模型的推出而調整。目前,對於涉及高風險或可疑生物學或化學活動的安全識別碼,OpenAI 可能會限制或封鎖其存取權。若要進一步瞭解我們如何因應 AI 在生物學領域日益提升的能力,請參閱這篇部落格文章 。
若要瞭解針對工具與模型自訂的安全防護措施,請參閱電腦功能的確認與同意 和微調安全性 。OpenAI 也會在模型評估中心 發布結果。