Last verified: October 8, 2026
Yes, you can use the OpenAI SDK with DeepSeek for DeepSeek’s OpenAI-compatible API endpoints. The important part is understanding what changes: you install the OpenAI SDK as the client library, but you use a DeepSeek API key, DeepSeek’s base URL, and a current DeepSeek model name.
DeepSeek’s documentation uses the openai package, imports OpenAI, sets base_url="https://api.deepseek.com", and calls client.chat.completions.create() with model="deepseek-flash". See the official DeepSeek Python examples.
Using the OpenAI SDK this way does not mean you are using OpenAI models, OpenAI billing, or an OpenAI API key. The SDK is only the client. Because the base URL points to DeepSeek, the request goes to DeepSeek and is billed by DeepSeek under DeepSeek’s API terms.
This guide covers Python setup, a first request, streaming, async Python, JavaScript and TypeScript, JSON Output, Tool Calls, and Thinking Mode. The key SDK difference is simple: Python uses extra_body for DeepSeek-only request fields; JavaScript places those fields directly in the request object.
Quick answer: what changes from OpenAI to DeepSeek?
If you already know the OpenAI SDK, switching a simple chat request to DeepSeek mainly requires changing three things: the API key, the base URL, and the model name.
| Setting | OpenAI API | DeepSeek with OpenAI SDK |
|---|---|---|
| SDK package | openai | openai |
| API key | OpenAI API key | DeepSeek API key |
| Environment variable | Often OPENAI_API_KEY | Use DEEPSEEK_API_KEY to avoid confusion |
| Base URL | OpenAI default endpoint | https://api.deepseek.com |
| Model name | OpenAI model ID | Current DeepSeek model ID, such as deepseek-flash |
| Billing provider | OpenAI | DeepSeek |
The most common mistakes are using an OpenAI API key, forgetting the base URL, or copying an OpenAI model name into a DeepSeek request.
Prerequisites
Before you start, you need:
- A DeepSeek API key.
- A Python version supported by the installed OpenAI SDK, or a supported Node.js environment for the JavaScript examples.
- The
openaipackage installed in the environment that will run your code. - A current DeepSeek model name, such as
deepseek-flash. - Access to your terminal so you can set environment variables.
API usage is billed separately from the DeepSeek chat app. Check your available API balance and the current DeepSeek API pricing before running examples.
Do not paste your API key directly into your Python file. Store it in an environment variable or a secrets manager.
Install the OpenAI SDK
Install the OpenAI Python SDK:
pip install openaiOr, if your environment uses pip3:
pip3 install openaiOpenAI’s own SDK documentation also lists pip install openai for Python and npm install openai for JavaScript. The SDK package is maintained by OpenAI, but in this tutorial it is configured as a client for DeepSeek’s OpenAI-compatible endpoint. See the OpenAI SDK documentation.
Set your DeepSeek API key
Use DEEPSEEK_API_KEY instead of OPENAI_API_KEY so you do not accidentally send DeepSeek requests with the wrong key.
On macOS or Linux:
export DEEPSEEK_API_KEY="your-deepseek-api-key"On Windows PowerShell:
$env:DEEPSEEK_API_KEY="your-deepseek-api-key"In production, store keys in your hosting platform’s secret manager rather than in shell history, source files, notebooks, screenshots, or issue reports.
Make your first DeepSeek request with the OpenAI SDK
This is the minimal Python example. It uses the OpenAI SDK, but the request is sent to DeepSeek because the client is configured with DeepSeek’s base_url.
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["DEEPSEEK_API_KEY"],
base_url="https://api.deepseek.com",
)
response = client.chat.completions.create(
model="deepseek-flash",
messages=[
{"role": "system", "content": "You are a concise technical assistant."},
{"role": "user", "content": "Explain Python decorators in one paragraph."},
],
extra_body={
"thinking": {
"type": "disabled"
}
},
)
print(response.choices[0].message.content)This starter example explicitly disables Thinking Mode so you can begin with the final answer rather than a separate reasoning stream. DeepSeek documents Thinking Mode as enabled by default; disabling it does not guarantee deterministic output. The extra_body syntax here belongs to the Python SDK.
How the base_url setting works
The base URL tells the SDK where to send requests. If you omit it, the SDK uses its normal OpenAI configuration. If you set it to DeepSeek’s OpenAI-format endpoint, the SDK sends compatible requests to DeepSeek instead.
client = OpenAI(
api_key=os.environ["DEEPSEEK_API_KEY"],
base_url="https://api.deepseek.com",
)DeepSeek’s Models & Pricing page lists https://api.deepseek.com as the OpenAI-format base URL. It also lists https://api.deepseek.com/anthropic as the Anthropic-format base URL. Do not use the Anthropic-format URL with these OpenAI SDK examples. See DeepSeek Models & Pricing.
Which DeepSeek model should you use?
DeepSeek’s current Models & Pricing page lists these two API model IDs:
| Model ID | Documented model version | Good starting point for |
|---|---|---|
deepseek-flash | DeepSeek-V4.1-Flash | Most new examples, general chat, long-context workflows, vision, and lower-cost API usage. |
deepseek-v4-pro | DeepSeek-V4-Pro-0813 | Workloads evaluated for the separate Pro model; compare its behavior and cost with Flash before choosing. |
DeepSeek’s pricing page says legacy names such as deepseek-v4-flash and deepseek-v4-flash-vision-exp are still accepted, but the corresponding models have been retired and requests are served by DeepSeek-V4.1-Flash. For new code, use deepseek-flash.
Enable or disable Thinking Mode
DeepSeek documents Thinking Mode as enabled by default with high effort. In Python, pass the provider-specific thinking field through extra_body. In JavaScript, put thinking directly beside model and messages. These are two SDK syntaxes for the same top-level API field. See the DeepSeek Thinking Mode guide and the OpenAI Python SDK’s extra-parameter options.
The Python snippets in this section reuse the client created in the first-request example.
Disable Thinking Mode for simple output
response = client.chat.completions.create(
model="deepseek-flash",
messages=[
{"role": "user", "content": "Return one sentence explaining HTTP 404."}
],
extra_body={
"thinking": {
"type": "disabled"
}
},
)
print(response.choices[0].message.content)Enable Thinking Mode intentionally
response = client.chat.completions.create(
model="deepseek-flash",
messages=[
{
"role": "user",
"content": "Explain why database indexes can speed up reads but slow down writes."
}
],
reasoning_effort="high",
extra_body={
"thinking": {
"type": "enabled"
}
},
)
message = response.choices[0].message
print("Reasoning:")
print(getattr(message, "reasoning_content", None))
print("\nFinal answer:")
print(message.content)When Thinking Mode is enabled, DeepSeek returns reasoning in reasoning_content and the final answer in content. Treat them as separate fields. Most applications should show the final content to users and handle reasoning_content deliberately.
Stream DeepSeek responses with the OpenAI SDK
Use streaming when you want to display the answer as it is generated. For a simple non-thinking stream, read chunk.choices[0].delta.content. The following snippets reuse the Python client configured earlier.
stream = client.chat.completions.create(
model="deepseek-flash",
messages=[
{"role": "user", "content": "Explain recursion in Python with a short example."}
],
stream=True,
extra_body={
"thinking": {
"type": "disabled"
}
},
)
for chunk in stream:
if not chunk.choices:
continue
delta = chunk.choices[0].delta.content
if delta:
print(delta, end="", flush=True)
print()With Thinking Mode enabled, collect delta.reasoning_content separately from delta.content. The first field carries reasoning; the second carries the final answer. This follows DeepSeek’s streaming examples.
stream = client.chat.completions.create(
model="deepseek-flash",
messages=[
{"role": "user", "content": "Design a retry strategy for a Python API client."}
],
stream=True,
reasoning_effort="high",
extra_body={
"thinking": {
"type": "enabled"
}
},
)
reasoning_parts = []
answer_parts = []
for chunk in stream:
if not chunk.choices:
continue
delta = chunk.choices[0].delta
reasoning_delta = getattr(delta, "reasoning_content", None)
content_delta = getattr(delta, "content", None)
if reasoning_delta:
reasoning_parts.append(reasoning_delta)
if content_delta:
answer_parts.append(content_delta)
print(content_delta, end="", flush=True)
print()
reasoning_text = "".join(reasoning_parts)
final_answer = "".join(answer_parts)Do not mix reasoning deltas and final answer deltas unless your product intentionally displays both.
Use async Python with DeepSeek
The OpenAI Python SDK provides AsyncOpenAI for asynchronous requests. The DeepSeek configuration and extra_body syntax stay the same; await the API call and close the client when it is no longer needed. See the official async-client documentation.
import asyncio
import os
from openai import AsyncOpenAI
async def main():
async with AsyncOpenAI(
api_key=os.environ["DEEPSEEK_API_KEY"],
base_url="https://api.deepseek.com",
) as client:
response = await client.chat.completions.create(
model="deepseek-flash",
messages=[
{"role": "user", "content": "Give me three Python API design tips."}
],
extra_body={"thinking": {"type": "disabled"}},
)
print(response.choices[0].message.content)
asyncio.run(main())Use the synchronous client for a simple script and the asynchronous client inside async request handlers. Calling a synchronous network client directly inside an async handler can block that handler’s event loop.
Use the OpenAI JavaScript SDK with DeepSeek
Use the official openai package in a server-side Node.js environment. Its client option is baseURL, not Python’s base_url. The OpenAI JavaScript SDK documentation states that additional request fields are sent as supplied; it does not translate Python’s extra_body wrapper.
npm install openaiSet DEEPSEEK_API_KEY in the same terminal, using the macOS/Linux command below or the PowerShell command shown earlier:
export DEEPSEEK_API_KEY="your-deepseek-api-key"Save this as deepseek-example.mjs. The .mjs extension lets Node.js use the import statement and top-level await in this example, as in the official SDK setup guide.
import OpenAI from "openai";
const apiKey = process.env.DEEPSEEK_API_KEY;
if (!apiKey) {
throw new Error("Set DEEPSEEK_API_KEY before running this script.");
}
const client = new OpenAI({
apiKey,
baseURL: "https://api.deepseek.com",
});
const completion = await client.chat.completions.create({
model: "deepseek-flash",
messages: [
{ role: "user", content: "Explain what an API base URL does." }
],
thinking: { type: "disabled" }
});
console.log(completion.choices[0].message.content);Run the file:
node deepseek-example.mjsDo not wrap thinking inside extra_body in JavaScript. The intended HTTP body contains thinking at the top level. In Python, the SDK merges extra_body into that body; in JavaScript, nesting the same wrapper does not perform the Python-specific merge. This distinction follows the Node SDK, Python SDK, and DeepSeek request schema.
TypeScript: type the DeepSeek-specific field
Your installed SDK’s TypeScript definitions may not include DeepSeek’s thinking field. For that case, define a request type that extends the SDK’s non-streaming Chat Completions type. This keeps normal parameter checks without using any or moving the field into extra_body.
import OpenAI from "openai";
import type { ChatCompletionCreateParamsNonStreaming } from
"openai/resources/chat/completions";
type DeepSeekChatRequest = ChatCompletionCreateParamsNonStreaming & {
thinking: { type: "enabled" | "disabled" };
};
const apiKey = process.env.DEEPSEEK_API_KEY;
if (!apiKey) {
throw new Error("Set DEEPSEEK_API_KEY before running this script.");
}
const client = new OpenAI({
apiKey,
baseURL: "https://api.deepseek.com",
});
const request: DeepSeekChatRequest = {
model: "deepseek-flash",
messages: [
{ role: "user", content: "Explain what an API base URL does." }
],
stream: false,
thinking: { type: "disabled" }
};
const completion = await client.chat.completions.create(request);
console.log(completion.choices[0].message.content);This is a TypeScript adaptation of the same JavaScript request, not a different API format. Compile it with your project’s TypeScript setup and the types supplied by your pinned openai version. The extension describes a DeepSeek field locally; it does not validate the server’s response. The SDK’s extra-parameter documentation and Chat Completions types explain the underlying client behavior.
JSON output with DeepSeek
DeepSeek supports JSON Output through response_format={"type": "json_object"}. DeepSeek’s JSON Output guide says you should also include the word “json” in the system or user prompt, provide an example of the expected JSON format, and set max_tokens reasonably to avoid truncation. See the DeepSeek JSON Output guide.
import json
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["DEEPSEEK_API_KEY"],
base_url="https://api.deepseek.com",
)
response = client.chat.completions.create(
model="deepseek-flash",
messages=[
{
"role": "system",
"content": (
'Return only a JSON object with string fields topic, difficulty, '
'and summary. Example: {"topic":"Python lists",'
'"difficulty":"beginner","summary":"Lists hold ordered items."}'
)
},
{
"role": "user",
"content": (
"Return a JSON object with keys: topic, difficulty, and summary. "
"Topic: Python generators."
)
},
],
response_format={"type": "json_object"},
max_tokens=500,
extra_body={
"thinking": {
"type": "disabled"
}
},
)
choice = response.choices[0]
if choice.finish_reason != "stop" or not choice.message.content:
raise ValueError("The API did not return a complete JSON answer.")
data = json.loads(choice.message.content)
expected_keys = {"topic", "difficulty", "summary"}
if not isinstance(data, dict) or set(data) != expected_keys:
raise ValueError("Unexpected JSON fields.")
if not all(isinstance(value, str) for value in data.values()):
raise ValueError("All JSON fields must be strings.")
print(data)JSON Output controls response formatting; it does not execute tools or validate business rules. The example checks for a completed response and validates the parsed fields before using them. Handle parse or validation failures in your application instead of treating incomplete output as usable data.
Tool calls with DeepSeek
Tool calls let the model request a function, but your application executes that function. Do not execute arbitrary model-generated function names or arguments without validation. DeepSeek documents Tool Calls as a supported feature on its current API models. See DeepSeek Models & Pricing.
This example uses a mock weather function with fixed demonstration data. It does not contact a live weather service. It validates the function name and arguments, returns the mock result, and uses tool_choice="none" on the follow-up to finish after one tool round. See the DeepSeek Tool Calls guide for the request-and-result pattern.
import json
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["DEEPSEEK_API_KEY"],
base_url="https://api.deepseek.com",
)
def get_weather(location: str) -> dict:
# Fixed sample data, not a live weather lookup.
return {
"is_mock": True,
"location": location,
"temperature_f": 72,
"condition": "clear",
}
tools = [
{
"type": "function",
"function": {
"name": "get_weather",
"description": (
"Return fixed demonstration weather data for a city, "
"not live weather."
),
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "City and state, for example Austin, TX",
}
},
"required": ["location"],
"additionalProperties": False,
},
},
}
]
messages = [
{
"role": "system",
"content": "Use the tool for this demo and label its result as mock data."
},
{"role": "user", "content": "Show the sample weather for Austin, Texas."}
]
response = client.chat.completions.create(
model="deepseek-flash",
messages=messages,
tools=tools,
tool_choice="auto",
extra_body={
"thinking": {
"type": "disabled"
}
},
)
assistant_message = response.choices[0].message
messages.append(assistant_message)
if assistant_message.tool_calls:
for tool_call in assistant_message.tool_calls:
if (
tool_call.type != "function"
or tool_call.function.name != "get_weather"
):
raise ValueError("Unsupported tool requested")
arguments = json.loads(tool_call.function.arguments)
if not isinstance(arguments, dict) or set(arguments) != {"location"}:
raise ValueError("Unexpected tool arguments")
location = arguments["location"]
if not isinstance(location, str) or not location.strip():
raise ValueError("Invalid location")
result = get_weather(location.strip())
messages.append({
"role": "tool",
"tool_call_id": tool_call.id,
"content": json.dumps(result),
})
final_response = client.chat.completions.create(
model="deepseek-flash",
messages=messages,
tools=tools,
tool_choice="none",
extra_body={
"thinking": {
"type": "disabled"
}
},
)
print(final_response.choices[0].message.content)
else:
print(assistant_message.content)For Thinking Mode requests that carry tools, preserve reasoning_content from all previous assistant turns, including turns without a tool call. Keeping the full returned assistant message helps preserve the required fields. Also, tool_choice="required" and a forced named function require Thinking Mode to be disabled. See the reasoning-history rules and tool-choice restrictions.
Using the Responses API with DeepSeek
DeepSeek also supports a Responses API format with the same OpenAI SDK package and base_url="https://api.deepseek.com". DeepSeek’s Responses API guide shows initializing OpenAI with a DeepSeek API key and base URL, then calling client.responses.create() with model="deepseek-flash". See the DeepSeek Responses API guide.
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["DEEPSEEK_API_KEY"],
base_url="https://api.deepseek.com",
)
response = client.responses.create(
model="deepseek-flash",
instructions="You are a helpful assistant.",
input="Give me one tip for writing reliable API clients.",
)
print(response.output_text)Do not assume every OpenAI Responses API feature works with DeepSeek. DeepSeek decides which features are supported on its endpoint, so check DeepSeek’s Responses API documentation before porting advanced OpenAI examples.
What works differently from OpenAI?
The OpenAI SDK can send compatible requests, but DeepSeek is still a different provider with its own models, pricing, parameters, and feature support.
| Assumption | Correct DeepSeek-specific view |
|---|---|
| “I can use my OpenAI API key.” | No. Use a DeepSeek API key. |
| “The default OpenAI endpoint is fine.” | No. Set base_url="https://api.deepseek.com" in Python or baseURL: "https://api.deepseek.com" in JavaScript. |
| “OpenAI model names work.” | No. Use DeepSeek model IDs such as deepseek-flash. |
| “Every OpenAI feature works.” | No. Use only features DeepSeek documents for its own API. |
| “Thinking Mode behaves like OpenAI reasoning.” | No. Follow DeepSeek’s own thinking, reasoning_effort, and reasoning_content documentation. |
| “Tool calls are automatically safe.” | No. Your application must allowlist functions and validate arguments. |
| “I am billed by OpenAI because I installed the OpenAI SDK.” | No. When the request goes to DeepSeek’s base URL with a DeepSeek key, DeepSeek is the provider. |
| “Python and JavaScript pass DeepSeek-only fields the same way.” | No. Python uses extra_body={"thinking": ...}; JavaScript uses top-level thinking. TypeScript may need a local type extension. |
Common errors and fixes
| Problem | Likely cause | Fix |
|---|---|---|
ModuleNotFoundError: No module named 'openai' | The OpenAI Python package is not installed in the active environment. | Run pip install openai in the same virtual environment that runs your script. |
| Authentication failure | Missing or incorrect DeepSeek API key. | Set DEEPSEEK_API_KEY and confirm your process can read it. |
| Request goes to OpenAI instead of DeepSeek | The DeepSeek base URL was not configured correctly. | Set base_url="https://api.deepseek.com" in Python or baseURL: "https://api.deepseek.com" in JavaScript. |
| Model not found | The code uses an OpenAI model name or an outdated DeepSeek model name. | Use current DeepSeek model IDs from the official Models & Pricing page. |
| Unexpected reasoning output | Thinking Mode is enabled by default. | Disable thinking for simple calls or handle reasoning_content separately. |
| Streaming prints nothing | The code reads the wrong delta field or assumes every chunk has content. | Check chunk.choices, then read delta.content for normal answer text. |
| JSON parsing fails | The response is empty, malformed, or truncated. | Use response_format, explicitly ask for JSON, provide a JSON example, allow enough max_tokens, and validate the completed response. |
| Tool result is not connected to the request | The tool result was not appended with the correct tool_call_id. | Append a role: "tool" message using the original tool call ID, then send the next request. |
| Tool call returns a 400 error in Thinking Mode | Reasoning history was dropped, or unsupported tool_choice behavior was used. | Restore the full assistant history when reasoning fields are missing; separately, disable Thinking Mode before required or named tool choice. |
| Thinking is not configured as intended in JavaScript | Python’s extra_body wrapper was copied into the Node request. | Place thinking: { type: "disabled" } directly beside model and messages. |
TypeScript rejects the thinking field | The installed SDK type does not declare this provider-specific parameter. | Use the explicit request-type extension above. A local type error does not by itself mean DeepSeek rejects the field. |
import or top-level await fails in Node.js | The file is being interpreted outside an ES module setup. | Run the example as deepseek-example.mjs, or configure ES modules in your project. |
Production checklist
- Use the official OpenAI SDK package only as the client library.
- Use a DeepSeek API key, not an OpenAI API key.
- Set
base_url="https://api.deepseek.com"in Python. - Set
baseURL: "https://api.deepseek.com"in JavaScript. - Use current DeepSeek model IDs such as
deepseek-flash. - Decide whether each request should use Thinking Mode or non-thinking mode.
- Keep
reasoning_contentseparate from finalcontent. - Check DeepSeek docs before relying on OpenAI-only features.
- Validate tool-call names and arguments before executing application code.
- Store API keys in environment variables or a secrets manager.
- Do not commit keys to Git or paste them into notebooks, screenshots, or logs.
- Add timeouts, bounded retries, and error logging appropriate for your backend.
- Monitor token usage and costs through DeepSeek’s billing and response usage fields.
- Pin SDK versions in production when stability matters.
- Rotate any key that may have leaked.
- Pass DeepSeek-only fields through
extra_bodyin Python, but directly in the JavaScript request object. - Type-check TypeScript integrations against the pinned SDK, and inspect serialized request bodies without exposing credentials.
- Keep mock tool data clearly labeled and replace it with an approved data source before production use.
Frequently asked questions
Can I use the OpenAI SDK with DeepSeek?
Yes. DeepSeek’s official Python examples use the OpenAI SDK with DeepSeek’s API key, DeepSeek’s base_url, and a DeepSeek model name such as deepseek-flash.
What base_url should I use for DeepSeek?
Use https://api.deepseek.com for the OpenAI-compatible DeepSeek API format.
Do I use an OpenAI API key or a DeepSeek API key?
Use a DeepSeek API key. The OpenAI SDK is only the client package in this setup.
What package do I install?
For Python, install openai with pip install openai. For JavaScript or TypeScript, install openai with npm install openai.
What model name should I use?
For most new examples, start with deepseek-flash. Check DeepSeek’s Models & Pricing page before production deployment because model names and routing can change.
Does streaming work with DeepSeek and the OpenAI SDK?
Yes. Use stream=True with Chat Completions and iterate over chunks. Read delta.content for normal answer text, and handle delta.reasoning_content separately when streaming Thinking Mode responses.
Does async Python work?
Yes. Use AsyncOpenAI, await the API request, and keep the same DeepSeek key and base_url. Python’s extra_body syntax also applies to the async client.
Does JSON output work?
Yes. DeepSeek documents JSON Output with response_format={"type": "json_object"}, but you should also instruct the model to output JSON and provide a clear example.
Do tool calls work?
Yes. DeepSeek lists Tool Calls as supported for its current API models. Your application must still validate tool names and arguments before executing any function.
Is DeepSeek fully compatible with OpenAI?
No provider should be treated as automatically compatible with every OpenAI feature. DeepSeek supports OpenAI-compatible API formats for documented endpoints and features, but DeepSeek’s documentation is the source of truth for what works on DeepSeek.
Am I billed by OpenAI or DeepSeek?
If your client uses a DeepSeek API key and base_url="https://api.deepseek.com", your request goes to DeepSeek and is billed by DeepSeek. Installing the OpenAI SDK does not make the request an OpenAI-billed request.
Why is my request going to OpenAI instead of DeepSeek?
Check whether you configured the DeepSeek base URL correctly. In Python, use base_url. In JavaScript, use baseURL.
Should I use extra_body in JavaScript?
No. For the Chat Completions examples here, place thinking directly in the JavaScript request object. Keep extra_body in Python, where it is an SDK option for adding fields to the HTTP body.
Why does TypeScript complain about thinking?
The SDK’s types describe the OpenAI API and may not declare DeepSeek-specific fields. Define an explicit request type that includes thinking, while keeping it at the top level of the object sent to DeepSeek.
Bottom line
The OpenAI SDK works with DeepSeek because DeepSeek exposes an OpenAI-compatible API format. For the basic setup, install openai, store your DeepSeek key in DEEPSEEK_API_KEY, set base_url="https://api.deepseek.com" in Python or baseURL: "https://api.deepseek.com" in JavaScript, and use a DeepSeek model such as deepseek-flash.
Remember the three provider settings: DeepSeek key, DeepSeek base URL, DeepSeek model name. Then use the correct SDK syntax: extra_body for Python’s extra request fields, top-level thinking for JavaScript, and an explicit type extension when TypeScript needs one. Add streaming, async calls, JSON Output, and Tool Calls only when your application needs them.
Official references
- DeepSeek chat Python sample
- DeepSeek Models & Pricing
- DeepSeek Chat Completions API reference
- DeepSeek Thinking Mode guide
- DeepSeek JSON Output guide
- DeepSeek Tool Calls guide
- DeepSeek Responses API guide
- OpenAI SDK documentation
- OpenAI Python API library reference
- OpenAI TypeScript and JavaScript SDK
- OpenAI Python SDK: extra request parameters
- OpenAI JavaScript SDK: extra request parameters
