Source: OpenAI SDK compatibility (Claude docs)
Anthropic's OpenAI-compatible Chat Completions endpoint: what maps, what is ignored or rejected, and why it is meant for testing rather than production.
Contents
- What: official documentation page
- Publisher: Anthropic
- Date: living document; read 2026-11-14
- Original: OpenAI SDK compatibility
Summary
Point an official OpenAI SDK at https://api.anthropic.com/v1/ with a Claude key and model name to call Claude through Chat Completions. Anthropic positions this for evaluating models, not as a long-term production integration, and documents field-by-field support.
Key claims
stricton function tools is ignored, so tool arguments are not schema-guaranteed.response_formataccepts onlyjson_schemawithstrict: true;json_objectortextreturn 400.- Audio and
filecontent parts return 400; image URLs work (detailignored). - Prompt caching is not supported through the layer.
- All system/developer messages are hoisted and concatenated into the top-level system prompt, wherever they appeared.
- Thinking: on by default on Claude 5 models; otherwise pass
thinkingviaextra_body; thinking content is not returned;adaptivereturns 400. nmust be 1;logprobs,seed, penalties,logit_bias,store,reasoning_effort,service_tierand others are ignored.temperatureabove 1 is capped; on Claude 4.7+ any non-default sampling value returns 400.- Forced
tool_choicereturns 400 on Opus 5.5, Sonnet 5.5 and Fable/Mythos 5.1-5.2. usage.*_tokens_details,logprobsandsystem_fingerprintcome back empty; error message text differs from OpenAI’s.- Some rate-limit headers are renamed (
x-ratelimit-requestsinstead ofx-ratelimit-limit-requests).