DeepSeek Prover V2 API

Open-source AI with 128K-token context, excelling in formal theorem proving and mathematical reasoning.
Output

Overview

DeepSeek Prover V2 Model Description

DeepSeek Prover V2, developed by DeepSeek, is an open-source large language model tailored for formal theorem proving in Lean 4. Built on DeepSeek-V3, it excels in mathematical reasoning, decomposing complex problems into subgoals for precise proof construction. With a 671-billion-parameter architecture, it’s ideal for advanced mathematical and logical tasks, accessible via Hugging Face and DeepSeek’s API platform.

Technical Specifications

Performance Benchmarks

DeepSeek Prover V2 is a 671-billion-parameter model (37 billion active per token) using a Mixture-of-Experts (MoE) architecture, initialized with a recursive theorem-proving pipeline powered by DeepSeek-V3. It employs Multi-head Latent Attention (MLA) and DeepSeekMoE for efficient inference, with cold-start data synthesis and reinforcement learning for enhanced reasoning.

  • Context Window: 32K tokens (7B model), extendable to 128K for 671B model.
  • Benchmarks:
    • MiniF2F-test: 88.9% pass ratio, outperforming all open-source models.
    • PutnamBench: Solves 49/658 problems, leading neural theorem proving.
    • ProverBench (325 problems, including AIME 24/25): State-of-the-art results.
    • AIME 2025: Competitive with Qwen3-235B-A22B.
  • Performance: 35 tokens/second output speed, 1.2s latency (TTFT).
  • API Pricing:
    • Input tokens: $0.553875 per million tokens
    • Output tokens: $2.414885 per million tokens

Performance Metrics

DeepSeek Prover V2 metrics

Key Capabilities

DeepSeek Prover V2 specializes in formal theorem proving, integrating informal and formal reasoning via a recursive proof search pipeline. It decomposes complex mathematical problems into manageable subgoals, synthesizing proofs with step-by-step chain-of-thought reasoning.

  • Formal Theorem Proving: Generates and verifies Lean 4 proofs, achieving 88.9% on MiniF2F-test, surpassing all competitors.
  • Mathematical Reasoning: Solves high-school competition-level problems (e.g., AIME 24/25) with precise subgoal decomposition.
  • Chain-of-Thought Reasoning: Combines DeepSeek-V3’s reasoning with formal proofs for cohesive outputs.
  • Scalable Inference: MoE architecture with 37B active parameters ensures efficient computation on large-scale tasks.
  • Multilingual Support: Handles mathematical notation and problem statements in multiple languages.
  • Tool Integration: Supports Lean 4 proof assistant for automated verification and proof construction.
  • API Features: Offers structured outputs, reinforcement learning feedback, and OpenAI-compatible API endpoints.

Optimal Use Cases

DeepSeek Prover V2 is designed for scenarios requiring rigorous mathematical and logical reasoning:

  • Mathematical Research: Formalizing proofs for number theory, algebra, and geometry in Lean 4.
  • Educational Tools: Assisting students with competition-level math problems (e.g., AIME, Putnam).
  • Automated Theorem Proving: Developing and verifying formal proofs for academic and industrial applications.
  • Scientific Analysis: Supporting logical reasoning in fields like theoretical physics and computer science.
  • AI-Driven Logic Systems: Building reasoning engines for automated proof assistants.

Comparison with Other Models

DeepSeek Prover V2 excels in formal theorem proving, outperforming general-purpose models in specialized math tasks:

  • vs. Qwen3-235B-A22B: Matches AIME 2025 performance but surpasses in formal proving (MiniF2F: 88.9% vs. ~80%), though slower (35 vs. 40.1 tokens/second).
  • vs. Gemini 2.5 Flash: Far superior in theorem proving (MiniF2F: 88.9% vs. ~60%) but lacks multimodality and has higher latency (1.2s vs. 0.8s).
  • vs. DeepSeek-R1: Stronger in formal proving (MiniF2F: 88.9% vs. ~75%) but less versatile for general reasoning tasks.
  • vs. Claude 3.7 Sonnet: Outperforms in neural theorem proving (PutnamBench: 49/658 vs. ~40/658), with lower costs ($0.00317 vs. ~$0.015 per 1K tokens).

Code Samples

Limitations

  • Limited to text-based mathematical reasoning; no vision or multimodal capabilities.
  • High latency (1.2s TTFT) for real-time applications.
  • Requires Lean 4 expertise for optimal use.
  • Qwen License restricts commercial use; primarily research-focused.

API Integration

DeepSeek Prover V2 integrates via AI/ML API. Documentation available here.

Use cases

  • Mathematical Research: Formalizing proofs for number theory, algebra, and geometry in Lean 4.
  • Educational Tools: Assisting students with competition-level math problems (e.g., AIME, Putnam).
  • Automated Theorem Proving: Developing and verifying formal proofs for academic and industrial applications.
  • Scientific Analysis: Supporting logical reasoning in fields like theoretical physics and computer science.
  • AI-Driven Logic Systems: Building reasoning engines for automated proof assistants.

How to use DeepSeek Prover V2 API

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

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

DeepSeek Prover V2 API Pricing

TypePrice
Input
Output

DeepSeek Prover V2 vs other models

ModelInputOutputContextBest for
$6.5 / 1M tokens
$39 / 1M tokens
1M tokens
Reasoning + agents
$2.6 / 1M tokens
$13 / 1M tokens
1M tokens
Balanced coding + agents
$3.9 / 1M tokens
$19.5 / 1M tokens
1M tokens
Long-context, multimodal & agentic workflows
$1.95 / 1M tokens
$11.7 / 1M tokens
1M tokens
Reasoning + agents

Frequently asked questions

Yes, DeepSeek Prover V2 can stream responses as they are generated.

Yes, DeepSeek Prover V2 supports both function calling and structured outputs.

DeepSeek Prover V2 was built by DeepSeek.

DeepSeek Prover V2 is accessed via the v1/chat/completions endpoint.

Start building with DeepSeek Prover V2

Get API Key
1000+ models, one API.