Provider

Route DeepSeek through Stockyard

Add cost tracking, caching, failover, and 76 middleware modules to your DeepSeek requests. One URL change, no SDK swap.

Environment variable
DEEPSEEK_API_KEY
Models
deepseek-chat, deepseek-reasoner
Failover to
OpenAI GPT-4o-mini, Groq Llama, or Mistral
API format
OpenAI-compatible

Why proxy DeepSeek?

DeepSeek offers some of the most cost-effective models available, especially for reasoning tasks with DeepSeek-R1. Proxying through Stockyard lets you track exactly how much each request costs, cache responses for repeated queries, and fail over to other providers during DeepSeek outages.

DeepSeek is OpenAI-compatible, so Stockyard routes requests with near-zero overhead. Add cost tracking, audit logs, and safety guardrails without any SDK changes.

Quick start

# Install Stockyard
curl -fsSL stockyard.dev/install.sh | sh

# Set your DeepSeek API key
export DEEPSEEK_API_KEY=your-key-here

# Start the proxy
stockyard
# Provider: deepseek (from DEEPSEEK_API_KEY)
# Proxy listening on :4200

# Send a request through the proxy
curl http://localhost:4200/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-chat","messages":[{"role":"user","content":"hello"}]}'

Good to know

DeepSeek servers are in China, which can add latency for US/EU users. Stockyard's failover can route to faster providers when latency exceeds your threshold.

Cost savings example

For a workload doing 10,000 requests/day at ~500 tokens each:

GPT-4o
~$75/day
DeepSeek-chat
~$4/day
DeepSeek + caching
~$1-2/day

With Stockyard's prompt cache, repeated requests are free. Combined with DeepSeek's pricing, the same workload can cost 50-75x less than direct GPT-4o.

Route DeepSeek through Stockyard in under 60 seconds.

Install Guide

All 16 providers · Proxy-only mode · What is an LLM proxy? · vs LiteLLM · Best self-hosted proxy

Explore: OpenAI · Anthropic · Groq · Mistral