openai-sdk changedcli-sdks-libraries/libraries/openai-sdk
Nearest release: v2.1.309, published 3 hours before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+13added
Lines−13removed
From line
18
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits13to this page, all time
The whole hunk
from line 18, old and new numbered
/
from line 18
1818
1919## Getting started with the OpenAI SDK
2020
21To use the OpenAI SDK compatibility feature, you'll need to:
21To use the OpenAI SDK compatibility feature, you need to:
2222
23231. Use an official OpenAI SDK.
2424
from line 137
137137 public class QuickStart {
138138 public static void main(String[] args) {
139139 OpenAIClient client = OpenAIOkHttpClient.builder()
140 .apiKey(System.getenv("ANTHROPIC_API_KEY")) // Your Claude API key
141 .baseUrl("https://api.anthropic.com/v1/") // the Claude API endpoint
142 .build();
140 .apiKey(System.getenv("ANTHROPIC_API_KEY")) // Your Claude API key
141 .baseUrl("https://api.anthropic.com/v1/") // the Claude API endpoint
142 .build();
143143
144144 ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()
145 .model("claude-opus-5-5") // Claude model name
146 .addSystemMessage("You are a helpful assistant.")
147 .addUserMessage("Who are you?")
148 .build();
145 .model("claude-opus-5-5") // Claude model name
146 .addSystemMessage("You are a helpful assistant.")
147 .addUserMessage("Who are you?")
148 .build();
149149
150150 ChatCompletion completion = client.chat().completions().create(params);
151151 System.out.println(completion.choices().get(0).message().content().orElse(""));
from line 251
251251
252252 ```java Java
253253 ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()
254 .model("claude-sonnet-4-6")
255 .addUserMessage("Who are you?")
256 .putAdditionalBodyProperty("thinking",
257 JsonValue.from(Map.of("type", "enabled", "budget_tokens", 2000)))
258 .build();
254 .model("claude-sonnet-4-6")
255 .addUserMessage("Who are you?")
256 .putAdditionalBodyProperty("thinking",
257 JsonValue.from(Map.of("type", "enabled", "budget_tokens", 2000)))
258 .build();
259259
260260 ChatCompletion completion = client.chat().completions().create(params);
261261 ```
No line in this hunk matches that.