Short answer
DeepSeek’s current API model list names deepseek-flash and deepseek-v4-pro; it does not list a separate deepseek-coder model. The example below therefore calls DeepSeek Flash, a coding-capable alternative—not a named DeepSeek Coder model. DeepSeek says deepseek-flash is served by DeepSeek-V4.1-Flash-1017. (DeepSeek model list and API quick start)
A Cloudflare tutorial documented a separate Workers AI route for @hf/thebloke/deepseek-coder-6.7b-base-awq and @hf/thebloke/deepseek-coder-6.7b-instruct-awq. Cloudflare operates that endpoint; it is not DeepSeek’s API. Those IDs are not shown in the current Workers AI catalog page retrieved for this update, so I can’t confirm their present availability or lifecycle status. That absence is not confirmation that they are discontinued. (Cloudflare tutorial; current Workers AI catalog)
Make a first DeepSeek API request
This example uses DeepSeek’s OpenAI-compatible Chat Completions API and the current model ID deepseek-flash. You need a DeepSeek API key and the OpenAI Python SDK. The prompt is a coding example; the model’s output is not guaranteed. (DeepSeek quick start)
- Install the SDK:
pip install openai - Set your API key in the environment:
export DEEPSEEK_API_KEY="your-api-key"
- Send a request and print the returned text:
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["DEEPSEEK_API_KEY"],
base_url="https://api.deepseek.com",
)
response = client.chat.completions.create(
model="deepseek-flash",
messages=[
{"role": "system", "content": "You are a careful coding assistant."},
{"role": "user", "content": "Write a Python palindrome checker and include two simple tests."},
],
)
print(response.choices[0].message.content)
The equivalent HTTP request is POST https://api.deepseek.com/chat/completions, authenticated with Authorization: Bearer <API key>. Its JSON body includes model and messages. DeepSeek’s quick-start example reads the generated text from response.choices[0].message.content. (DeepSeek quick start)
Check available model IDs before deployment
DeepSeek documents GET https://api.deepseek.com/models for listing currently available models and their metadata. The documentation says metadata can include context window, output limit, supported input and output modalities, and API capabilities; a field may be omitted when its information is unavailable. Check the returned model IDs rather than relying on an old deepseek-coder example. (DeepSeek model-list reference)
Pricing and production considerations
DeepSeek lists model prices per 1 million tokens. Its current pricing page lists these rates for deepseek-flash: (DeepSeek Models & Pricing)
| Usage | Off-peak | Peak |
|---|---|---|
| Input, cache miss | $0.15 / 1M tokens | $0.30 / 1M tokens |
| Input, cache hit | $0.003 / 1M tokens | $0.006 / 1M tokens |
| Output | $0.60 / 1M tokens | $1.20 / 1M tokens |
Peak hours are 01:00–04:00 and 06:00–10:00 UTC, Monday through Friday, excluding Chinese public holidays. All other hours—including weekends and Chinese public holidays—are off-peak. DeepSeek says product prices may change, so check its pricing page when estimating costs. (DeepSeek Models & Pricing)
For deepseek-flash, DeepSeek lists an account-level concurrency limit of 2,500. Each request counts as one concurrent connection until its response is complete; requests over the limit receive HTTP 429. This is a concurrency limit, not a request-per-second or throughput guarantee. (DeepSeek Rate Limit & Isolation)
The pricing page lists a 1M-token context length and a maximum output of 384K for deepseek-flash. It also lists JSON output and tool calls, and says beta FIM completion is available only in non-thinking mode. Check current model metadata and feature conditions for your integration; listed maximums are not a promise that every request will use the full allowance. (DeepSeek Models & Pricing; DeepSeek model-list reference)
What about older “DeepSeek Coder API” examples?
Treat the provider and model ID in an example as essential. DeepSeek’s current published API list names deepseek-flash and deepseek-v4-pro, not deepseek-coder. The older Cloudflare tutorial uses Cloudflare’s account-based endpoint and Cloudflare credentials for its Coder model examples. Don’t combine those model IDs with DeepSeek’s endpoint or assume they remain available on Cloudflare today. (DeepSeek Models & Pricing; Cloudflare tutorial; Cloudflare Workers AI catalog)
Local inference is different from hosted API access: loading model weights with Transformers runs them in your environment; it does not, by itself, provide a hosted endpoint or API credentials.
Bottom line
For a currently documented DeepSeek-hosted coding request, use deepseek-flash with DeepSeek’s Chat Completions API. This is an alternative, not a request to a separately named DeepSeek Coder model. If you specifically need the older Coder model IDs shown in Cloudflare’s tutorial, verify their current availability and lifecycle in Cloudflare’s catalog before integrating.
Sources
Your First API Call | DeepSeek API Docs
Models & Pricing | DeepSeek API Docs
Lists Models | DeepSeek API Docs
Rate Limit & Isolation | DeepSeek API Docs
Workers AI Models | Cloudflare Docs
Explore Code Generation Using DeepSeek Coder Models | Cloudflare Docs
