🚀 DeepSeek V4 API Guide

Access DeepSeek V4, V3, and R1 through a single OpenAI-compatible endpoint. Start coding in under 2 minutes.

Get API Key →

Why DeepSeek?

DeepSeek has emerged as one of China's most capable AI companies. Their models consistently rival GPT-4 on coding and reasoning benchmarks, at a fraction of the cost.

💻

Superior Coding

DeepSeek V3 and R1 outperform many Western models on HumanEval and MBPP coding benchmarks.

💰

Cost Effective

Up to 80% cheaper than equivalent GPT-4 API calls while maintaining competitive quality.

🔗

OpenAI Compatible

Drop-in replacement — just change the base_url. Works with LangChain, LlamaIndex, etc.

Available DeepSeek Models

ModelContextBest ForSpeed
deepseek-v4128KLatest flagship, general tasksMedium
deepseek-v3128KPrevious gen, proven reliabilityMedium
deepseek-r1128KChain-of-thought reasoningSlower (thinking)
deepseek-v4-flash64KFast, cost-efficient tasksFast

Quick Start — Python

from openai import OpenAI

# Connect to our unified API gateway
client = OpenAI(
    base_url="https://eaf9553505eeb8f5-115-190-107-107.serveousercontent.com/v1",
    api_key="your-api-key"
)

# Use DeepSeek V4 just like OpenAI
response = client.chat.completions.create(
    model="deepseek-v4",
    messages=[
        {"role": "system", "content": "You are a helpful coding assistant."},
        {"role": "user", "content": "Write a Python function to find prime numbers"}
    ],
    temperature=0.7,
    max_tokens=1024
)

print(response.choices[0].message.content)

Quick Start — JavaScript

import OpenAI from 'openai';

const client = new OpenAI({
  baseURL: 'https://eaf9553505eeb8f5-115-190-107-107.serveousercontent.com/v1',
  apiKey: 'your-api-key'
});

const response = await client.chat.completions.create({
  model: 'deepseek-v4',
  messages: [
    { role: 'user', content: 'Explain recursion in simple terms' }
  ]
});

console.log(response.choices[0].message.content);

Quick Start — cURL

curl https://eaf9553505eeb8f5-115-190-107-107.serveousercontent.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4",
    "messages": [
      {"role": "user", "content": "Hello, DeepSeek!"}
    ]
  }'

DeepSeek R1 — Reasoning Mode

DeepSeek R1 uses chain-of-thought reasoning for complex problems. Enable extended thinking for math, logic, and multi-step analysis:

response = client.chat.completions.create(
    model="deepseek-r1",
    messages=[
        {"role": "user", "content": "Prove that sqrt(2) is irrational"}
    ],
    extra_body={"thinking": {"type": "enabled"}},
    max_tokens=4096
)
# R1 returns reasoning in response.choices[0].message.reasoning_content

DeepSeek V4 vs V3 vs R1

When to use DeepSeek V4

Latest model with best overall performance. Use for general-purpose tasks, content generation, code generation, and when you need the highest quality output.

When to use DeepSeek V3

Previous generation model with proven reliability. Slightly cheaper, excellent for production workloads where you've already optimized prompts.

When to use DeepSeek R1

Specialized reasoning model. Best for math problems, logic puzzles, code debugging, and any task requiring step-by-step thinking.

Common Use Cases

🤖 AI Chatbots

Build chatbots powered by DeepSeek's strong conversational abilities at lower cost.

📝 Code Generation

DeepSeek R1 and V3 excel at code generation, review, and debugging tasks.

📊 Data Analysis

Analyze data, generate SQL queries, and create reports using DeepSeek's reasoning capabilities.

🌐 Translation

Strong Chinese-English translation capabilities, ideal for cross-border applications.

Frequently Asked Questions

Is the API OpenAI-compatible?

Yes! Our endpoint implements the OpenAI Chat Completions API. Just change the base_url and use the same SDK you already know.

Can I use DeepSeek with LangChain?

Absolutely. Since the API is OpenAI-compatible, it works seamlessly with LangChain, LlamaIndex, and any framework that supports OpenAI endpoints.

What's the rate limit?

Rate limits depend on your plan. Free tier includes generous limits for testing. Contact us for production-level access.

Is there a free tier?

Yes! Sign up to get free credits to test all DeepSeek models. No credit card required for the free tier.

Ready to Start?

Get instant access to DeepSeek V4, V3, R1 and 8 more models.

Get Your API Key →