Deepseek.ai is an independent website and is not affiliated with, sponsored by, or endorsed by Hangzhou DeepSeek Artificial Intelligence Co., Ltd.

    DeepSeek Documentation

    Everything you need to integrate DeepSeek AI into your applications. OpenAI-compatible API makes migration simple.

    Documentation Resources

    Getting Started

    Quick start guide for DeepSeek API

    Learn how to set up your account, get an API key, and make your first API call in minutes.

    Read Guide

    API Reference

    Complete API documentation

    Full API reference including endpoints, parameters, response formats, and error codes.

    View Reference

    Model Overview

    Available models and capabilities

    Compare DeepSeek-V3, R1, and other models. Learn about context windows, capabilities, and use cases.

    Explore Models

    Code Examples

    Sample code and integrations

    Python, JavaScript, and other language examples for common use cases.

    View Examples

    Tutorials

    Step-by-step guides

    Build chatbots, RAG systems, and AI applications with DeepSeek.

    Read Tutorials

    Research Papers

    Technical papers and benchmarks

    Read the technical papers behind DeepSeek models and their performance benchmarks.

    View Papers

    Quick Start Example

    Python Example

    Make your first API call with Python

    from openai import OpenAI
    
    # DeepSeek uses OpenAI-compatible API
    client = OpenAI(
        api_key="your-api-key",
        base_url="https://api.deepseek.com"
    )
    
    response = client.chat.completions.create(
        model="deepseek-chat",  # or "deepseek-reasoner"
        messages=[
            {"role": "system", "content": "You are a helpful assistant."},
            {"role": "user", "content": "Hello!"}
        ]
    )
    
    print(response.choices[0].message.content)

    Note: DeepSeek's API is fully compatible with OpenAI's client libraries. Just change the base URL and use your DeepSeek API key.

    Frequently Asked Questions

    How do I get a DeepSeek API key?

    Sign up at platform.deepseek.com, navigate to the API Keys section, and create a new key. The process takes less than a minute.

    Is the DeepSeek API compatible with OpenAI?

    Yes, DeepSeek provides an OpenAI-compatible API. You can use existing OpenAI client libraries (Python, JavaScript, etc.) by simply changing the base URL to api.deepseek.com.

    What models are available via the API?

    The API provides access to DeepSeek-V3 (general-purpose chat) and DeepSeek-R1 (reasoning model). Use deepseek-chat for V3 and deepseek-reasoner for R1.

    Ready to Build with DeepSeek?

    Get your API key and start building AI-powered applications today.