Please rotate your device

To continue exploring this website, please rotate your device to a vertical orientation

DeepSeek R1 0528

DeepSeek/DeepSeek R1 0528

A state-of-the-art 671B-parameter MoE LLM with o1-style reasoning licensed for commercial use

large language

DeepSeek R1 0528 runs using the Baseten Inference Stack and is accessible via an OpenAI-compatible API endpoint.

Input

python
# You can use this model with any of the OpenAI clients in any language!
# Simply change the API Key to get started

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://inference.baseten.co/v1"
)

response = client.chat.completions.create(
    model="deepseek-ai/DeepSeek-R1-0528",
    messages=[
        {
            "role": "user",
            "content": "Implement Hello World in Python"
        }
    ],
    stream=True,
    stream_options={
        "include_usage": True,
        "continuous_usage_stats": True
    },
    top_p=1,
    max_tokens=1000,
    temperature=1,
    presence_penalty=0,
    frequency_penalty=0
)

for chunk in response:
    if chunk.choices and chunk.choices[0].delta.content is not None:
        print(chunk.choices[0].delta.content, end="", flush=True)

Output

json
{
  "id": "8456fe51db3548789f199cfb8c8efd35",
  "object": "text_completion",
  "created": 1735236968,
  "model": "deepseek-ai/DeepSeek-R1-0528",
  "choices": [
    {
      "index": 0,
      "text": "Let's think through this step by step...",
      "logprobs": null,
      "finish_reason": "stop",
      "matched_stop": 1
    }
  ],
  "usage": {
    "prompt_tokens": 14,
    "total_tokens": 240,
    "completion_tokens": 226,
    "prompt_tokens_details": null
  }
}