openai-sdk changedcli-sdks-libraries/libraries/openai-sdk
Nearest release: v2.1.334, published 11 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+20added
Lines−22removed
From line
48
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits27to this page, all time
The whole hunk
from line 48, old and new numbered
/
from line 48
48482. Change the following:
4949
5050 * Update your base URL to point to the Claude API.
51 * Replace your API key with a [Claude API key](https://platform.claude.com/settings/keys) from the Claude Console.
51 * Replace your OpenAI key with a [Developer API key](https://platform.claude.com/settings/keys) from the Claude Console.
5252 * If your key is a [personal or service account key](https://platform.claude.com/docs/en/manage-claude/api-keys#key-types) scoped to the organization, also send the `anthropic-workspace-id` header on every request. For example, set it as a default header on the client. See [Select a workspace](https://platform.claude.com/docs/en/manage-claude/api-keys#select-a-workspace) on the Developer API keys page.
5353 * Update your model name to use a [Claude model](https://platform.claude.com/docs/en/models/overview).
5454
from line 63
6363 from openai import OpenAI
6464
6565 client = OpenAI(
66 api_key=os.environ.get("ANTHROPIC_API_KEY"), # Your Claude API key
66 api_key=os.environ.get("ANTHROPIC_API_KEY"), # Your Developer API key
6767 base_url="https://api.anthropic.com/v1/", # the Claude API endpoint
6868 )
6969
from line 82
8282 import OpenAI from "openai";
8383
8484 const openai = new OpenAI({
85 apiKey: process.env.ANTHROPIC_API_KEY, // Your Claude API key
85 apiKey: process.env.ANTHROPIC_API_KEY, // Your Developer API key
8686 baseURL: "https://api.anthropic.com/v1/" // Claude API endpoint
8787 });
8888
from line 105
105105 ChatClient chatClient = new(
106106 model: "claude-opus-5-5", // Claude model name
107107 credential: new ApiKeyCredential(
108 Environment.GetEnvironmentVariable("ANTHROPIC_API_KEY")), // Your Claude API key
108 Environment.GetEnvironmentVariable("ANTHROPIC_API_KEY")), // Your Developer API key
109109 options: new OpenAIClientOptions()
110110 {
111111 Endpoint = new Uri("https://api.anthropic.com/v1/") // the Claude API endpoint
from line 132
132132
133133 func main() {
134134 client := openai.NewClient(
135 option.WithAPIKey(os.Getenv("ANTHROPIC_API_KEY")), // Your Claude API key
135 option.WithAPIKey(os.Getenv("ANTHROPIC_API_KEY")), // Your Developer API key
136136 option.WithBaseURL("https://api.anthropic.com/v1/"), // the Claude API endpoint
137137 )
138138
from line 157
157157 import com.openai.models.chat.completions.ChatCompletion;
158158 import com.openai.models.chat.completions.ChatCompletionCreateParams;
159159
160 public class QuickStart {
161 public static void main(String[] args) {
162 OpenAIClient client = OpenAIOkHttpClient.builder()
163 .apiKey(System.getenv("ANTHROPIC_API_KEY")) // Your Claude API key
164 .baseUrl("https://api.anthropic.com/v1/") // the Claude API endpoint
165 .build();
160 void main() {
161 OpenAIClient client = OpenAIOkHttpClient.builder()
162 .apiKey(System.getenv("ANTHROPIC_API_KEY")) // Your Developer API key
163 .baseUrl("https://api.anthropic.com/v1/") // the Claude API endpoint
164 .build();
166165
167 ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()
168 .model("claude-opus-5-5") // Claude model name
169 .addSystemMessage("You are a helpful assistant.")
170 .addUserMessage("Who are you?")
171 .build();
166 ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()
167 .model("claude-opus-5-5") // Claude model name
168 .addSystemMessage("You are a helpful assistant.")
169 .addUserMessage("Who are you?")
170 .build();
172171
173 ChatCompletion completion = client.chat().completions().create(params);
174 System.out.println(completion.choices().get(0).message().content().orElse(""));
175 }
172 ChatCompletion completion = client.chat().completions().create(params);
173 IO.println(completion.choices().get(0).message().content().orElse(""));
176174 }
177175 ```
178176
from line 182
184182 require "openai"
185183
186184 openai = OpenAI::Client.new(
187 api_key: ENV["ANTHROPIC_API_KEY"], # Your Claude API key
185 api_key: ENV["ANTHROPIC_API_KEY"], # Your Developer API key
188186 base_url: "https://api.anthropic.com/v1/" # the Claude API endpoint
189187 )
190188
No line in this hunk matches that.