o3-pro
codex-mini-latest
👉 Điều đó có nghĩa là bạn phải sử dụng API kiểu Response (thay vì Chat Completions API) khi làm việc với những mô hình này.
Nguồn: Tài liệu Responses API - Create
Authorization: Bearer ********************
{
"model": "gpt-4.1-2025-04-14",
"tools": [
{
"type": "web_search_preview"
}
],
"input": "what was a positive news story from today?"
}
curl --location --request POST 'https://api.key4u.shop/v1/responses' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "gpt-4.1-2025-04-14",
"tools": [
{
"type": "web_search_preview"
}
],
"input": "what was a positive news story from today?"
}'
{
"id": "string",
"object": "string",
"created": 0,
"choices": [
{
"index": 0,
"message": {
"role": "string",
"content": "string"
},
"finish_reason": "string"
}
],
"usage": {
"prompt_tokens": 0,
"completion_tokens": 0,
"total_tokens": 0
}
}