deepseek-v4-pro — API, Pricing & Context Window | Vivgrid
deepseek-v4-pro on Vivgrid: DeepSeek's flagship coding model with a 1M-token context window, up to 384K output tokens, and competitive pricing.
deepseek-v4-pro is DeepSeek's flagship coding model, pairing strong agentic performance with a standout 1M-token context window and an unusually large 384K-token max output. Its competitive pricing makes frontier-class coding accessible at scale.
On Vivgrid, deepseek-v4-pro is available through the unified, OpenAI-compatible endpoint, so you can route DeepSeek alongside OpenAI, Anthropic, and Google models with a single API key.
Specifications
| Provider | DeepSeek |
| Model ID | deepseek-v4-pro |
| Best for | Coding |
| Available on | Vibe coding |
| Context window | 1,000,000 tokens |
| Max output | 384,000 tokens |
| Modalities | Text |
| Tool / function calling | Yes |
| Knowledge cutoff | 2025-05 |
| Acceleration | 🌐 Global (Centralized) |
Pricing
Pricing in USD per 1M tokens.
| Input | Cached input | Output |
|---|---|---|
| $1.74 | $0.14 | $3.48 |
What one request costs
The rates above applied to a 20K-token prompt with a 2K-token reply — a typical single agent turn, small enough that every request is billed at the base rate.
| Request | Cost |
|---|---|
| Cold prompt, nothing cached | $0.0418 |
| Warm prompt, 90% of the input served from cache | $0.0130 |
Use deepseek-v4-pro in your coding agent
deepseek-v4-pro works with the same Vivgrid key and https://api.vivgrid.com/v1 endpoint as every other model in the catalog. Grab your API key from the Vivgrid Console, then drop one of the configurations below into your agent of choice.
OpenCode
OpenCode has Vivgrid built in, so you can use deepseek-v4-pro without writing any config: open /models, search for vivgrid, paste your API key and pick the model. The OpenCode tutorial walks through it step by step.
Prefer to configure it by hand? Install OpenCode:
npm i -g opencode-aiDeclare deepseek-v4-pro under the Vivgrid provider in your global OpenCode config, ~/.config/opencode/opencode.json. The @ai-sdk/openai-compatible provider talks to Vivgrid over Chat Completions (/v1/chat/completions):
{
"$schema": "https://opencode.ai/config.json",
"model": "vivgrid/deepseek-v4-pro",
"provider": {
"vivgrid": {
"npm": "@ai-sdk/openai-compatible",
"name": "Vivgrid",
"options": {
"baseURL": "https://api.vivgrid.com/v1",
"apiKey": "{env:VIVGRID_API_KEY}"
},
"models": {
"deepseek-v4-pro": {
"name": "deepseek-v4-pro",
"tool_call": true,
"modalities": { "input": ["text"], "output": ["text"] },
"limit": { "context": 1000000, "output": 384000 }
}
}
}
}
}Export your key and launch OpenCode:
export VIVGRID_API_KEY="viv-xxxxxxxxxxxxx"
opencodeUse /models to switch between deepseek-v4-pro and other Vivgrid models mid-session. See the full OpenCode tutorial.
Pi
Install Pi:
npm install -g --ignore-scripts @earendil-works/pi-coding-agentAdd deepseek-v4-pro to the Vivgrid provider in ~/.pi/agent/models.json. Pi talks to Vivgrid over Chat Completions (/v1/chat/completions):
{
"providers": {
"vivgrid": {
"baseUrl": "https://api.vivgrid.com/v1",
"apiKey": "viv-xxxxxxxxxxxxx",
"api": "openai-completions",
"compat": {
"sendSessionAffinityHeaders": true
},
"models": [
{
"id": "deepseek-v4-pro",
"input": ["text"],
"contextWindow": 1000000,
"maxTokens": 384000
}
]
}
}
}Make it the model Pi starts with in ~/.pi/agent/settings.json:
{
"defaultProvider": "vivgrid",
"defaultModel": "deepseek-v4-pro"
}Then verify and start Pi:
pi --list-models vivgrid
piOr run a one-shot prompt without entering the TUI:
pi -p "explain the auth flow in this repo" --model vivgrid/deepseek-v4-proSee the full Pi tutorial.
API surfaces
The Vivgrid Console catalogs deepseek-v4-pro on one surface, all behind the same API key. The endpoint shown is the one the Console previews for that surface.
| Surface | Primary endpoint | Use it for |
|---|---|---|
| Vibe coding | /chat/completions | Coding CLIs and IDE agents that drive the model themselves — point the tool at Vivgrid and keep your own loop. |
Quick start
Get an API key from the Vivgrid Console, then call deepseek-v4-pro directly.
curl https://api.vivgrid.com/v1/chat/completions \
-H "Authorization: Bearer $VIVGRID_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-pro",
"messages": [
{ "role": "user", "content": "Say hello in English, Chinese and Spanish." }
],
"stream": true
}'Choosing within the DeepSeek V4 family
Prices are USD per 1M tokens at the base rate. Rows marked this page are the model described here.
| Model | Context | Max output | Input | Output |
|---|---|---|---|---|
deepseek-v4-pro — this page | 1,000,000 | 384,000 | $1.74 | $3.48 |
deepseek-v4.1-flash | 1,000,000 | 384,000 | $0.31 | $1.23 |
Ideal use cases
- Cost-effective coding agents needing very long context
- Tasks that generate large outputs (up to 384K tokens)
- Whole-repository reasoning and refactoring
- High-volume engineering workloads on a budget
Related models
- deepseek-v4-pro-0813 — the newer 0813 release, at a lower price
- gpt-6-astra — OpenAI's frontier gpt-6 coding model
- deepseek-v4-flash — faster, cheaper V4 sibling
- deepseek-v4-flash-vision-exp — multimodal DeepSeek sibling
deepseek-v4-flash (0731)
deepseek-v4-flash (0731) on Vivgrid: DeepSeek's fast, ultra-affordable model with a 1M-token context window and up to 384K output tokens.
gemini-4-argonNew
gemini-4-argon on Vivgrid: Google's flagship reasoning and coding model with a 1M-token context window, 1M max output, and text, image, video, audio, and PDF input.