DeepSeek
Cost-effective chat and reasoning models (DeepSeek-R1 / deepseek-reasoner) with strong math and coding.
Overview
DeepSeek builds cost-effective, OpenAI-compatible models with strong mathematical and coding performance, including reasoning models that expose their thinking process.
Official Website: https://www.deepseek.com API Documentation: https://api-docs.deepseek.com
Key features
- Cost-effective — competitive pricing for high-volume workloads
- Reasoning — reasoning models (e.g.
deepseek-reasoner/ R1) exposereasoning_content - Strong math & coding — excellent at mathematical reasoning and code generation
- OpenAI-compatible — drop-in chat completions with function calling
- Context caching — automatic caching of repeated prompt prefixes
Using DeepSeek with Yunxin
Address DeepSeek models by prefixing the model id with the deepseek slug — deepseek/<model> (for example deepseek/deepseek-reasoner). You always call the same Yunxin base URL, https://api.yuhuanstudio.com/v1, with your sk- API key; Yunxin routes the request to DeepSeek.
Usage example
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["YUNXIN_API_KEY"],
base_url="https://api.yuhuanstudio.com/v1",
)
response = client.chat.completions.create(
model="deepseek/model-id",
messages=[
{"role": "user", "content": "Write a Python quicksort."},
],
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.YUNXIN_API_KEY,
baseURL: "https://api.yuhuanstudio.com/v1",
});
const response = await client.chat.completions.create({
model: "deepseek/model-id",
messages: [{ role: "user", content: "Write a Python quicksort." }],
});
console.log(response.choices[0].message.content);curl https://api.yuhuanstudio.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $YUNXIN_API_KEY" \
-d '{
"model": "deepseek/model-id",
"messages": [{"role": "user", "content": "Write a Python quicksort."}]
}'Reasoning models
Reasoning models such as deepseek-reasoner (R1) return their thinking in a reasoning_content field alongside the final answer:
{
"choices": [{
"message": {
"role": "assistant",
"content": "The answer is 42.",
"reasoning_content": "Let me think through this step by step..."
}
}]
}See Reasoning for how to request and read thinking across formats.
Available models
List the models currently available for this provider:
curl "https://api.yuhuanstudio.com/v1/models?provider=deepseek" \
-H "Authorization: Bearer $YUNXIN_API_KEY"Capabilities and pricing are per-model. Use the Models API to discover which DeepSeek models are available and what each one supports.
Official resources
How is this guide?