14,954
edits
| (4 intermediate revisions by the same user not shown) | |||
| Line 124: | Line 124: | ||
} | } | ||
</pre> | </pre> | ||
=== How to fix "API Error (HTTP 400): Encrypted content is not supported with this model" === | |||
Error message: API Error (HTTP 400): Encrypted content is not supported with this model. | |||
<pre> | |||
Error!: API Error (HTTP 400): { | |||
"error": { | |||
"message": "Encrypted content is not supported with this model.", | |||
"type": "invalid_request_error", | |||
"param": "include", | |||
"code": null | |||
} | |||
} | |||
</pre> | |||
Solution: | |||
# This error occurs when using the `include` parameter (e.g., for prompt caching or encrypted content) with a model that does not support it. GPT-4.1 does not support encrypted/included content in this way. | |||
# Remove or omit the `include` parameter from your API request payload. | |||
# Alternatively, switch to a model that supports this feature, such as reasoning models like GPT-5.2 or later. | |||
# See more details on OpenAI's model documentation: https://platform.openai.com/docs/models | |||
=== How to fix "Invalid parameter: 'response_format' of type 'json_object' is not supported with this model" === | === How to fix "Invalid parameter: 'response_format' of type 'json_object' is not supported with this model" === | ||
| Line 489: | Line 510: | ||
== Further reading == | == Further reading == | ||
* [[ | * [[AI Prompt Engineering]] ([[ChatGPT prompts#How to improve the prompt design | How to improve the prompt design]]) | ||
* [https://help.openai.com/en/collections/3780021-general-top-faq General Top FAQ | OpenAI Help Center] | * [https://help.openai.com/en/collections/3780021-general-top-faq General Top FAQ | OpenAI Help Center] | ||
* [https://help.openai.com/en/collections/3675931-openai-api#api-error-codes-explained OpenAI API | OpenAI Help Center] | * [https://help.openai.com/en/collections/3675931-openai-api#api-error-codes-explained OpenAI API | OpenAI Help Center] | ||
| Line 525: | Line 520: | ||
* [https://platform.openai.com/docs/guides/error-codes Error codes - OpenAI API] | * [https://platform.openai.com/docs/guides/error-codes Error codes - OpenAI API] | ||
* [https://errerrors.blogspot.com/2024/07/openai-batch-api-troubleshooting.html OpenAI Batch API 常見技術問題排除] | * [https://errerrors.blogspot.com/2024/07/openai-batch-api-troubleshooting.html OpenAI Batch API 常見技術問題排除] | ||
* [https://platform.openai.com/docs/guides/production-best-practices Production best practices - OpenAI API] | |||
== References == | == References == | ||