How to use AI Prompt with DeepSeek API
This page provides information on how to send AI Prompts to the DeepSeek API from the command line using AI Prompt. Ozeki AI Prompt is fully compatible with the DeepSeek API, thus you can send basic and JSON prompts to DeepSeek models and use interactive mode as well. In this short article, you will learn how to configure AI Prompt to send basic prompts to DeepSeek API. Let's get started!
What is AI Prompt?
Ozeki AI Prompt is a command line tool which makes it possible to run AI prompts on the command line, that are evaluated by HTTP AI APIs, such as Ozeki AI Server, OpenAI (ChatGPT), DeepSeek and all other OpenAI compatible APIs.
What is DeepSeek API?
DeepSeek API is an HTTP AI API, which is providing developers with access to DeepSeek's advanced AI Models, such as DeepSeek-V3 and DeepSeek-R1, making it an open-source and cost-effective alternative to OpenAI API, while offering similar results and performance.
How to use AI Prompt with DeepSeek API (Few steps)
- Requirements
- Configuration
- Send basic prompt
- Send JSON prompt
Requirements
Before continuing with this guide, make sure Ozeki AI Prompt is installed on your computer and you have a DeepSeek API Key.
If you haven't downloaded AI Prompt yet, check out AI prompt to learn how to setup AI Prompt on your computer.
If you don't have a DeepSeek API Key, proceed to https://platform.deepseek.com to top up your balance and create a new API Key.
Check out the How to the use Deepseek AI model API guide for step-by-step instructions on setting up you API access.
Configuration
With AI Prompt being an universal tool, there isn't a big difference in configuring AI Prompt to work with DeepSeek API compared to Ozeki HTTP API. Follow the next configuration steps to make sure you will use AI Prompt properly with DeepSeek API.
API key
Set your DeepSeek API key, using the -a option.
ModelSelect the DeepSeek model you want to use. DeepSeek API curretly offers the deepseek-chat and deepseek-reasoner model options. Check out DeepSeek Models & Pricing, to learn about the differences between capabilities and pricing of the two model. In this guide, the deepseek-chat model will be used.
To specify the model, use the -m option.
URL
The DeepSeek API can be accessed through the following URL:
https://api.deepseek.com/chat/completions
Use the -h option to set this URL.
How to send basic prompt with AI Prompt to DeepSeek API (Video tutorial)
This video demonstrates how to send a basic prompt to DeepSeek API. You will see which options must be specified to make AI Prompt work properly with DeepSeek AI.
How to send basic prompt with AI Prompt to DeepSeek API
You can send a basic prompt the same way to DeepSeek API the same way as you would to Ozeki HTTP API. Make sure you set the model, the server URL and the API key as mentioned earlier:
::Change the example API key to your Deepseek API key aiprompt.exe "Where is Beijing?" -m deepseek-chat -h https://api.deepseek.com/chat/completions -a sk-u6xcskj3dhodortleulm2jfmq8cmya8s
Output:
Role: assistant Content: Beijing is the capital city of the People's Republic of China. It is located in the northern part of the country, in the northeastern region of the North China Plain. Beijing is one of the most populous cities in the world and serves as the political, cultural, and educational center of China. It is known for its rich history, with landmarks such as the Forbidden City, the Great Wall of China, and the Temple of Heaven.
How to send JSON prompt with AI Prompt to DeepSeek API (Video tutorial)
How to send JSON prompt with AI Prompt to DeepSeek API
It is recommended to use JSON files for sending JSON prompts instead of defining then in the command line.
Open the File Explorer at the location of your AI Prompt installation.
Create a JSON File using Notepad. To open a Notepad, type notepad into the File Explorer's address bar and press Enter.
Paste the JSON prompt into the newly opened Notepad:
Example JSON:
{ "model":"deepseek-chat", "messages":[ { "role":"user", "content":"Where is Beijing?" }, { "role":"assistant", "content":"Beijing is the capital city of the People's Republic of China. It is located in the northern part of the country, near the northeastern edge of the North China Plain. Beijing is one of the most populous cities in the world and serves as the political, cultural, and educational center of China. The city is surrounded by mountains to the north, northwest, and west, which provide a natural defense and have historically contributed to its strategic importance. Beijing is also known for its rich history, with numerous historical sites such as the Forbidden City, the Great Wall of China, and the Temple of Heaven." }, { "role":"user", "content":"Tell me more about the Forbidden City" } ] }
Save the json file by selecting the File menu, and clicking on the Save as.. option.
After clicking Save as..., the Save as dialog is opened. Set the save location to the path to your AI Prompt installation. Enter the filename "prompt.json" in the input area labeled File name and select All Files in the dropdown menu labeled Save as type.
Click the Save button to save the JSON file.
At this point you have successfully created the JSON file, which you can confirm by looking at the File Explorer. To run AI Prompt, open Command Prompt by typing cmd into the address bar of the File Explorer, and press Enter.
Use the type command to print the contents of the JSON file to the standard input. Run AI Prompt with the -j option to enable JSON mode. Make sure you are using the DeepSeek API's server URL and your API key is set correctly.
::Change the example API key to your Deepseek API key type prompt.json | aiprompt.exe -j -h https://api.deepseek.com/chat/completions -a sk-u6xcskj3dhodortleulm2jfmq8cmya8s
The response of the DeepSeek API is in a minimal JSON format, meaning the whole response is in a single line:
{"id":"160175b9-5c6b-40c1-b6b0-262d0fb8bc70","object":"chat.completion","created":1738192709,"model":"deepseek-chat","choices":[{"index":0,"message":{"role":"assistant","content":"The **Forbidden City**, located in the heart of Beijing, is one of the most iconic and historically significant landmarks in China. Here are some key details about it:\n\n### **Overview**\n- **Name in Chinese**: ?? (Gugong), meaning \"Former Palace.\"\n- **Construction Period**: Built between 1406 and 1420 during the Ming Dynasty.\n- **Purpose**: It served as the imperial palace for 24 emperors from the Ming Dynasty (1368-1644) to the end of the Qing Dynasty (1644-1912).\n- **Size**: It covers an area of about **720,000 square meters (180 acres)**, making it one of the largest palace complexes in the world.\n- **Layout**: The Forbidden City is rectangular in shape, surrounded by a **10-meter-high wall** and a **52-meter-wide moat**. It has **980 surviving buildings** and is divided into two main sections:\n - **Outer Court**: Used for ceremonial purposes (e.g., the Hall of Supreme Harmony).\n - **Inner Court**: Where the emperor and his family lived.\n\n### **Architecture**\n- The Forbidden City is a masterpiece of **traditional Chinese palatial architecture**, characterized by its symmetry, grandeur, and intricate details.\n- The buildings are constructed primarily of wood and feature **yellow-glazed roof tiles**, which symbolize imperial power.\n- The complex is aligned along a **north-south axis**, reflecting the cosmological principles of harmony and balance.\n\n### **Key Structures**\n1. **Meridian Gate (Wumen)**: The main entrance to the Forbidden City.\n2. **Hall of Supreme Harmony (Taihe Dian)**: The largest and most important hall, used for major ceremonies like coronations.\n3. **Hall of Central Harmony (Zhonghe Dian)**: Where the emperor prepared for ceremonies.\n4. **Hall of Preserving Harmony (Baohe Dian)**: Used for banquets and imperial examinations.\n5. **Palace of Heavenly Purity (Qianqing Gong)**: The emperor's residence.\n6. **Imperial Garden**: A tranquil space with ancient trees, pavilions, and rock formations.\n\n### **Cultural Significance**\n- The Forbidden City was the political and ceremonial center of Chinese government for nearly **500 years**.\n- It is a symbol of China's imperial history and architectural ingenuity.\n- In 1987, it was designated a **UNESCO World Heritage Site** for its cultural and historical importance.\n\n### **Modern Use**\n- Today, the Forbidden City is home to the **Palace Museum**, which houses an extensive collection of Chinese art and artifacts, including paintings, ceramics, and imperial treasures.\n- It is one of the **most visited museums in the world**, attracting millions of tourists annually.\n\n### **Fun Facts**\n- The name \"Forbidden City\" comes from the fact that access to the complex was strictly controlled-only the emperor, his family, and select officials were allowed inside.\n- It is said to have **9,999.5 rooms**, as only the heavens (symbolized by the Jade Emperor's palace) could have 10,000 rooms.\n\nThe Forbidden City remains a testament to China's rich history and cultural heritage, offering visitors a glimpse into the lives of its emperors and the grandeur of imperial China."},"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":138,"completion_tokens":681,"total_tokens":819,"prompt_tokens_details":{"cached_tokens":0},"prompt_cache_hit_tokens":0,"prompt_cache_miss_tokens":138},"system_fingerprint":"fp_3a5770e1b4"}
Check out the output indented:
{ "id": "160175b9-5c6b-40c1-b6b0-262d0fb8bc70", "object": "chat.completion", "created": 1738192709, "model": "deepseek-chat", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "The **Forbidden City**, located in the heart of Beijing, is one of the most iconic and historically significant landmarks in China. Here are some key details about it:\n\n### **Overview**\n- **Name in Chinese**: ?? (Gugong), meaning \"Former Palace.\"\n- **Construction Period**: Built between 1406 and 1420 during the Ming Dynasty.\n- **Purpose**: It served as the imperial palace for 24 emperors from the Ming Dynasty (1368-1644) to the end of the Qing Dynasty (1644-1912).\n- **Size**: It covers an area of about **720,000 square meters (180 acres)**, making it one of the largest palace complexes in the world.\n- **Layout**: The Forbidden City is rectangular in shape, surrounded by a **10-meter-high wall** and a **52-meter-wide moat**. It has **980 surviving buildings** and is divided into two main sections:\n - **Outer Court**: Used for ceremonial purposes (e.g., the Hall of Supreme Harmony).\n - **Inner Court**: Where the emperor and his family lived.\n\n### **Architecture**\n- The Forbidden City is a masterpiece of **traditional Chinese palatial architecture**, characterized by its symmetry, grandeur, and intricate details.\n- The buildings are constructed primarily of wood and feature **yellow-glazed roof tiles**, which symbolize imperial power.\n- The complex is aligned along a **north-south axis**, reflecting the cosmological principles of harmony and balance.\n\n### **Key Structures**\n1. **Meridian Gate (Wumen)**: The main entrance to the Forbidden City.\n2. **Hall of Supreme Harmony (Taihe Dian)**: The largest and most important hall, used for major ceremonies like coronations.\n3. **Hall of Central Harmony (Zhonghe Dian)**: Where the emperor prepared for ceremonies.\n4. **Hall of Preserving Harmony (Baohe Dian)**: Used for banquets and imperial examinations.\n5. **Palace of Heavenly Purity (Qianqing Gong)**: The emperor's residence.\n6. **Imperial Garden**: A tranquil space with ancient trees, pavilions, and rock formations.\n\n### **Cultural Significance**\n- The Forbidden City was the political and ceremonial center of Chinese government for nearly **500 years**.\n- It is a symbol of China's imperial history and architectural ingenuity.\n- In 1987, it was designated a **UNESCO World Heritage Site** for its cultural and historical importance.\n\n### **Modern Use**\n- Today, the Forbidden City is home to the **Palace Museum**, which houses an extensive collection of Chinese art and artifacts, including paintings, ceramics, and imperial treasures.\n- It is one of the **most visited museums in the world**, attracting millions of tourists annually.\n\n### **Fun Facts**\n- The name \"Forbidden City\" comes from the fact that access to the complex was strictly controlled-only the emperor, his family, and select officials were allowed inside.\n- It is said to have **9,999.5 rooms**, as only the heavens (symbolized by the Jade Emperor's palace) could have 10,000 rooms.\n\nThe Forbidden City remains a testament to China's rich history and cultural heritage, offering visitors a glimpse into the lives of its emperors and the grandeur of imperial China." }, "logprobs": null, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 138, "completion_tokens": 681, "total_tokens": 819, "prompt_tokens_details": { "cached_tokens": 0 }, "prompt_cache_hit_tokens": 0, "prompt_cache_miss_tokens": 138 }, "system_fingerprint": "fp_3a5770e1b4" }
Final thoughts
In conclusion, this article has provided you with the essential steps to use the DeepSeek API with Ozeki AI Prompt. If you feel like using the DeepSeek API instead of the Ozeki HTTP API is too much hassle, or if you want to use other models simultaneously, you can also download DeepSeek models and integrate them into Ozeki AI Server, unifying the two API endpoints into a single one. Check out the How to the use Deepseek AI model API guide on this topic.
More information