DeepSeek R1 0528
A state-of-the-art 671B-parameter MoE LLM with o1-style reasoning licensed for commercial use
Deploy DeepSeek R1 0528 behind an API endpoint in seconds.
Deploy modelExample usage
DeepSeek R1 0528 runs using the Baseten Inference Stack and is accessible via an OpenAI-compatible API endpoint.
Input
1# You can use this model with any of the OpenAI clients in any language!
2# Simply change the API Key to get started
3
4from openai import OpenAI
5
6client = OpenAI(
7 api_key="YOUR_API_KEY",
8 base_url="https://inference.baseten.co/v1"
9)
10
11response = client.chat.completions.create(
12 model="deepseek-ai/DeepSeek-R1-0528",
13 messages=[
14 {
15 "role": "user",
16 "content": "Implement Hello World in Python"
17 }
18 ],
19 stop=[],
20 stream=True,
21 stream_options={
22 "include_usage": True,
23 "continuous_usage_stats": True
24 },
25 top_p=1,
26 max_tokens=1000,
27 temperature=1,
28 presence_penalty=0,
29 frequency_penalty=0
30)
31
32for chunk in response:
33 if chunk.choices and chunk.choices[0].delta.content is not None:
34 print(chunk.choices[0].delta.content, end="", flush=True)
JSON output
1{
2 "id": "8456fe51db3548789f199cfb8c8efd35",
3 "object": "text_completion",
4 "created": 1735236968,
5 "model": "deepseek-ai/DeepSeek-R1-0528",
6 "choices": [
7 {
8 "index": 0,
9 "text": "Let's think through this step by step...",
10 "logprobs": null,
11 "finish_reason": "stop",
12 "matched_stop": 1
13 }
14 ],
15 "usage": {
16 "prompt_tokens": 14,
17 "total_tokens": 240,
18 "completion_tokens": 226,
19 "prompt_tokens_details": null
20 }
21}