Text DeepSeek

DeepSeek API

Use the DeepSeek API via RunAPI with a model skill, unified auth, and pay-as-you-go pricing.

runapi.ai
# Base URL
https://runapi.ai

# Endpoints
POST /v1/chat/completions
POST /v1/responses
POST /v1/messages
POST /v1beta/models/{model}:generateContent
POST /v1beta/models/{model}:streamGenerateContent
curl https://runapi.ai/v1/chat/completions \
  -H "Authorization: Bearer $RUNAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "deepseek-v4-flash-vision-exp",
  "messages": [
    {
      "role": "user",
      "content": "Refactor this Python module for readability, explain each change, then add unit tests for the edge cases."
    }
  ]
}'
from openai import OpenAI

client = OpenAI(
    base_url="https://runapi.ai/v1",
    api_key="your-runapi-key"
)

response = client.chat.completions.create(
    model="deepseek-v4-flash-vision-exp",
    messages=[{"role": "user", "content": "Refactor this Python module for readability, explain each change, then add unit tests for the edge cases."}]
)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://runapi.ai/v1",
  apiKey: "your-runapi-key"
});

const response = await client.chat.completions.create({
  model: "deepseek-v4-flash-vision-exp",
  messages: [{ role: "user", content: "Refactor this Python module for readability, explain each change, then add unit tests for the edge cases." }]
});
https://runapi.ai 5 endpoints
OVERVIEW

About DeepSeek

Use deepseek-flash for everyday work and deepseek-v4-pro for complex reasoning. DeepSeek documents the official direct API as DeepSeek-V4.1-Flash-1017, updated on 2026-10-17. Third-party channels may use older versions; their 1017 status is unverified. DeepSeek officially lists image input, a 1M-token context and up to 384K output tokens for V4.1 Flash. On RunAPI, use deepseek-flash; image input and these context and output limits have not been tested across all channels.

Provider
DeepSeek
Modality
Text

DeepSeek API endpoints

EndpointProtocol
POST /v1/chat/completionsOpenAI compatible
POST /v1/responsesOpenAI Responses
POST /v1/messagesAnthropic compatible
POST /v1beta/models/{model}:generateContentGemini generateContent
POST /v1beta/models/{model}:streamGenerateContentGemini streamGenerateContent

Available Versions

Variant Billing Pricing
deepseek-flash 1K tokens Input $0.30 / 1M tokens | Output $1.20 / 1M tokens View →
deepseek-v4-flash 1K tokens Input $0.30 / 1M tokens | Output $1.20 / 1M tokens View →
deepseek-v4-flash-vision-exp 1K tokens Input $0.30 / 1M tokens | Output $1.20 / 1M tokens View →
deepseek-v4-pro 1K tokens Input $1.32 / 1M tokens | Output $3.96 / 1M tokens View →
PRICING

DeepSeek Pricing

Endpoint Resolution Duration Price
chat_completion — — Input $0.30 / 1M tokens | Output $1.20 / 1M tokens
message — — Input $0.30 / 1M tokens | Output $1.20 / 1M tokens

Prices shown for deepseek-flash. Other variants retain their own endpoint pricing.

Agent integration

Run DeepSeek From an Agent

HOW IT WORKS

Get Started with DeepSeek

  1. Create an API key

    Sign up and generate an API key from the dashboard.

  2. Pick a version

    Choose the version that best matches your quality and cost requirements.

  3. Send a request

    Submit your prompt and parameters to the model's documented endpoint.

  4. Get your result

    Poll the task or set a webhook, then download the completed output.

CONTEXT

About DeepSeek on RunAPI

DeepSeek models are large language models tuned for reasoning, code, and agentic tool use. Through RunAPI they share a single API key with pay-as-you-go token billing, and are callable from both the OpenAI and Anthropic SDKs.

Provider
DeepSeek
See all →
Modality
Text
Browse models →

Why Use DeepSeek Through RunAPI

One auth, every provider

A single RunAPI API key unlocks the whole model catalog across all providers. No separate accounts to create, no API keys to rotate per integration, and no credential management overhead. Add a new model to your app by changing one parameter.

Unified pricing & billing

Per-call pricing in USD, billed monthly into a single invoice. No subscription tiers, no minimum spend, and failed generations are never charged. The pricing page and check_pricing API show exact costs before you commit to a model.

Schema-first SDK

Typed schemas, parameter constraints, and setup notes are packaged in the model skill so your implementation starts from the right contract. The skill loads into Claude Code, Codex, Gemini CLI, Cursor, and VS Code — your agent knows the correct request shape before you write a line of code.

DeepSeek Questions

Which model name should I use for DeepSeek Flash?

Use deepseek-flash for new code. DeepSeek documents that its official direct API serves the retired names deepseek-v4-flash and deepseek-v4-flash-vision-exp with DeepSeek-V4.1-Flash-1017 at the Flash price. Third-party mappings to 1017 remain unconfirmed.

What is the difference between deepseek-flash and deepseek-v4-pro?

Flash is the fast, low-cost tier for everyday tasks; pro targets the most complex reasoning and long agentic workflows at a higher token price.

How do I turn on thinking (reasoning) mode?

Thinking is a request parameter on deepseek-flash, not a separate model — set it per request when you want step-by-step reasoning.

Can I call DeepSeek with both the OpenAI and Anthropic SDKs?

Yes. DeepSeek is available on both the OpenAI Chat Completions and the Anthropic Messages surfaces; point either SDK at RunAPI and pass the deepseek model id.

How are cached prompt tokens billed?

Cached prompt tokens bill at a much lower cache-read rate than fresh input tokens; cache hits are detected automatically and reflected in usage.

Which DeepSeek variants should I use?

Use deepseek-flash for everyday work and deepseek-v4-pro for complex reasoning. DeepSeek documents the official direct API as DeepSeek-V4.1-Flash-1017, updated on 2026-10-17. Third-party channels may use older versions; their 1017 status is unverified. DeepSeek officially lists image input, a 1M-token context and up to 384K output tokens for V4.1 Flash. On RunAPI, use deepseek-flash; image input and these context and output limits have not been tested across all channels.

SIMILAR MODELS

Similar Text Models

Start generating with DeepSeek