DeepSeek-R1 API

DeepSeek R1 excels in reasoning tasks with advanced features like chain-of-thought processing and efficient parameter activation
Context
128K tokens
Input
$0.364 / 1M
Output
$0.546 / 1M
Released
Aug 28, 2025

How to use DeepSeek-R1 API

Install any OpenAI-compatible SDK, point it at api.aimlapi.com/v1, and set the model to deepseek/deepseek-reasoner.
import requests

r = requests.post(
    "https://api.aimlapi.com/v1/chat/completions",
    headers={"Authorization": "Bearer " + AIMLAPI_KEY},
    json={
      "model": "deepseek/deepseek-reasoner",
      "messages": [
        {
          "role": "user",
          "content": "Hello!"
        }
      ]
    },
)
print(r.json())
const r = await fetch("https://api.aimlapi.com/v1/chat/completions", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "model": "deepseek/deepseek-reasoner",
    "messages": [
      {
        "role": "user",
        "content": "Hello!"
      }
    ]
  }),
});
console.log(await r.json());
curl -X POST https://api.aimlapi.com/v1/chat/completions \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek/deepseek-reasoner","messages":[{"role":"user","content":"Hello!"}]}'

OpenAI-compatible — swap the base URL and it works with your existing SDK.

DeepSeek-R1 API Pricing

TypePrice
Input
$0.364 / 1M tokens
Output
$0.546 / 1M tokens

DeepSeek-R1 Benchmarks

BenchmarkScoreWhat it measures
Humanity's Last Exam
17.7%
Expert-level questions across many domains
SWE-bench Verified
57.6%
Resolving verified real GitHub issues
LiveCodeBench
73.3%
Contamination-free competitive programming problems
GPQA Diamond
81.0%
Google-proof graduate science questions (hardest subset)
AIME 2025
87.5%
Competition mathematics (AIME), 2025

Start building with DeepSeek-R1

Get API Key
1000+ models, one API.