Deepseek V3 was recently released: a cheap, reliable, supposedly GPT-4 class model.
Quick note upfront, according to the docs, there will be non-trivial price increases in February 2025:
- Input price (cache miss) is going up to
$0.27
/ 1M tokens from$0.14
/ 1M tokens (~2x) - Output price is going up to
$1.10
/ 1M tokens from$0.28
/1M tokens (~4x)
From now until 2025-02-08 16:00 (UTC), all users can enjoy the discounted prices of DeepSeek API
To get started
Deepseek exposes an OpenAI compatible API.
Because of this, it’s easy to call via curl, Python, or Node.js using OpenAI’s clients and a base_url
override, as shown in Deepseek’s documentation.
A little searching also revealed the llm
CLI tool can support making calls to OpenAI compatible APIs with a extra-openai-models.yaml
configuration file.
Here are several examples of how a config file like this might look.
To make this all work, I stored my Deepseek API key so llm
knows about it with
llm keys set deepseek
then created a file at ~/Library/Application\ Support/io.datasette.llm/extra-openai-models.yaml
containing
# https://api-docs.deepseek.com/
- model_id: deepseek-v3 # my name for calling the model, e.g. `llm -m deepseek-v3`
model_name: deepseek-chat # the name Deepseek using in their documentation
api_base: "https://api.deepseek.com/v1"
api_key_name: deepseek # which we set earlier
With that in place, I can now call the model
β― llm -m deepseek-v3 'hi π who I am speaking with?'
Hi there! π You're speaking with an AI assistant here to help answer your questions or chat about whateverβs on your mind. How can I assist you today?
β― llm -m deepseek-v3 'write jq extract the `user_name` field from the first 10 items of jsonl but nothing more. no talk, no code fences; just code'
jq -s '.[0:10][] | .user_name'
Per the release notes from Deepseek, the model does yet seem to support multi-modality
This is just the beginning! Look forward to multimodal support and other cutting-edge features in the DeepSeek ecosystem.