Anthropic provides a compatibility layer that enables you to use the OpenAI SDK to test the Anthropic API. With a few code changes, you can quickly evaluate Anthropic model capabilities.
strict
parameter for function calling is ignored, which means the tool use JSON is not guaranteed to follow the supplied schema.\n
) in between them. This full string is then supplied as a single system message at the start of the messages.
thinking
parameter. While this will improve Claude’s reasoning for complex tasks, the OpenAI SDK won’t return Claude’s detailed thought process. For full extended thinking features, including access to Claude’s step-by-step reasoning output, use the native Anthropic API.
/v1/messages
endpoint.
Field | Support status |
---|---|
model | Use Claude model names |
max_tokens | Fully supported |
max_completion_tokens | Fully supported |
stream | Fully supported |
stream_options | Fully supported |
top_p | Fully supported |
parallel_tool_calls | Fully supported |
stop | All non-whitespace stop sequences work |
temperature | Between 0 and 1 (inclusive). Values greater than 1 are capped at 1. |
n | Must be exactly 1 |
logprobs | Ignored |
metadata | Ignored |
response_format | Ignored |
prediction | Ignored |
presence_penalty | Ignored |
frequency_penalty | Ignored |
seed | Ignored |
service_tier | Ignored |
audio | Ignored |
logit_bias | Ignored |
store | Ignored |
user | Ignored |
modalities | Ignored |
top_logprobs | Ignored |
reasoning_effort | Ignored |
tools
/ functions
fieldsShow fields
tools[n].function
fieldsField | Support status |
---|---|
name | Fully supported |
description | Fully supported |
parameters | Fully supported |
strict | Ignored |
messages
array fieldsShow fields
messages[n].role == "developer"
Field | Support status |
---|---|
content | Fully supported, but hoisted |
name | Ignored |
Field | Support status |
---|---|
id | Fully supported |
choices[] | Will always have a length of 1 |
choices[].finish_reason | Fully supported |
choices[].index | Fully supported |
choices[].message.role | Fully supported |
choices[].message.content | Fully supported |
choices[].message.tool_calls | Fully supported |
object | Fully supported |
created | Fully supported |
model | Fully supported |
finish_reason | Fully supported |
content | Fully supported |
usage.completion_tokens | Fully supported |
usage.prompt_tokens | Fully supported |
usage.total_tokens | Fully supported |
usage.completion_tokens_details | Always empty |
usage.prompt_tokens_details | Always empty |
choices[].message.refusal | Always empty |
choices[].message.audio | Always empty |
logprobs | Always empty |
service_tier | Always empty |
system_fingerprint | Always empty |
Header | Support Status |
---|---|
x-ratelimit-limit-requests | Fully supported |
x-ratelimit-limit-tokens | Fully supported |
x-ratelimit-remaining-requests | Fully supported |
x-ratelimit-remaining-tokens | Fully supported |
x-ratelimit-reset-requests | Fully supported |
x-ratelimit-reset-tokens | Fully supported |
retry-after | Fully supported |
request-id | Fully supported |
openai-version | Always 2020-10-01 |
authorization | Fully supported |
openai-processing-ms | Always empty |