DeepSeek API
Reasoning-first LLMs via RunAPI — flash for fast, low-cost work; pro for complex agentic tasks.
# 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_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-flash",
"max_tokens": 1024,
"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",
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",
messages: [{ role: "user", content: "Refactor this Python module for readability, explain each change, then add unit tests for the edge cases." }]
});
DeepSeek is a family of reasoning-first language models. deepseek-v4-flash is the fast, low-cost tier with an optional thinking mode; deepseek-v4-pro targets the hardest reasoning and agentic workloads. Both are available through RunAPI with one key and per-token billing.
- Wiele wariantów dla różnych poziomów szybkości i jakości
- Model skill zawiera dokumentację, schematy i notatki setupu
- Działa z workflow kodowania aplikacji
- Nie płacisz za nieudane generacje
Porównaj wszystkie warianty API
Endpointy API DeepSeek
Użyj SDK OpenAI lub Anthropic z kluczem RunAPI. Dodatkowy SDK nie jest wymagany.
| Endpoint | Protocol |
|---|---|
| /v1/chat/completions | OpenAI compatible |
| /v1/responses | OpenAI Responses |
| /v1/messages | Anthropic compatible |
| /v1beta/models/{model}:generateContent | Gemini generateContent |
| /v1beta/models/{model}:streamGenerateContent | Gemini streamGenerateContent |
Od model skilla do pierwszego wyniku w czterech krokach
Wybierz model
Wybierz model i wariant pasujące do typu wyjścia, progu jakości i celu opóźnienia.
Konfiguracja
Ustaw klucz RunAPI i zainstaluj model skill w workspace kodu.
Implementacja
Użyj instrukcji skilla, aby dodać funkcję modelu w swojej aplikacji.
Odbiór
Odpytuj po task ID, streamuj gdy wspierane albo obsłuż callback webhook.
Czym jest API DeepSeek?
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.
Dlaczego używać API DeepSeek przez RunAPI
Jedno uwierzytelnienie, wszyscy providerzy
Jeden klucz RunAPI odblokowuje cały katalog. Bez osobnych kont i rotacji kluczy dla każdej integracji.
Ujednolicony cennik i rozliczenia
Rozliczanie za wywołanie w USD, fakturowane co miesiąc. Nieudane generacje nie są naliczane.
Skill ze schematami
Typowane schematy i notatki setupu są spakowane w model skill, więc implementacja startuje od właściwego kontraktu.
Najczęstsze pytania
What is the difference between deepseek-v4-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-v4-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-v4-flash for fast everyday work and deepseek-v4-pro for more complex reasoning and agentic workflows.
Od jakiego wariantu powinienem zacząć?
Wybierz najtańszy wariant, który spełnia Twoje wymagania jakościowe. Większość zespołów zaczyna od szybkiego wariantu, a do produkcji przechodzi na pro.
Czy jest darmowy plan?
Nowe konta otrzymują darmowe pierwsze wywołania dla każdego modelu. Później płacisz za każde wywołanie.
Czy streamujecie wyniki?
Tam, gdzie streaming jest dostępny, RunAPI streamuje end-to-end.
Jak są rozliczane nieudane próby?
Nieudane generacje nie są obciążane opłatą.
Czy wyniki są buforowane?
Wygenerowane wyniki są zapisywane i można je pobrać po ID zadania. Dane wejściowe nie są buforowane.
Czy mogę używać komercyjnie?
Tak — użycie komercyjne jest dostępne dla każdego wariantu, chyba że licencja modelu wyraźnie to ogranicza; informacja taka jest podana na stronie wariantu.
A co z limitami zapytań?
Limity na klucz rosną wraz z poziomem wykorzystania. Aktualne limity znajdziesz na stronie cennika.
Gdzie mogę zgłosić problem?
Otwórz zgłoszenie w publicznym repozytorium GitHub albo napisz do supportu.