Get DeepSeek R1 API with comparable to OpenAI-o1 performance in reasoning, math, and code tasks.
DeepSeek R1 uses a MoE architecture with 671B total parameters, 37B activated parameters. It delivers high performance in reasoning, math, and code tasks, outperforming many open-source models and competing with top proprietary models, while offering scalable open-source options.
Gain instant access to DeepSeek R1 through production API: AI/ML API provides direct connectivity to DeepSeek R1.
Read more: Technical Model Card.
Try Deepseek R1 API in the Playground.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.aimlapi.com/v1",
api_key="<YOUR_API_KEY>",
)
response = client.chat.completions.create(
model="deepseek/deepseek-r1",
messages=[
{
"role": "system",
"content": "You are an AI assistant who knows everything.",
},
{
"role": "user",
"content": "Tell me, why is the sky blue?"
},
],
)
message = response.choices[0].message.content
print(f"Assistant: {message}")
DeepSeek R1's mixture-of-experts architecture drives competitive scalability and cost-efficiency, making it a leader among open-source AI models.
Read more: Deepseek R1 vs GPT o1-preview comparison
DeepSeek R1 outperforms OpenAI-o1-1217 in math and reasoning tasks like DROP and LiveCodeBench, showing its strength in complex problem-solving with RL-enhanced reasoning capabilities.
DeepSeek R1 excels in areas requiring deep mathematical reasoning and large-scale code completion as well as MMLU and Chinese comparing to Claude-3.5.
DeepSeek R1 outperforms GPT-4o in reasoning and math tasks, excelling in MATH-500 and AIME 2024, and handling advanced logic and computation at scale.
In the Playground, navigate to the Key Management section and click on Create API Key. You can easily activate or deactivate your keys as needed.
After creating your API key, you can integrate AI models into your application by following the guidelines provided in our API reference.