# DeepSeek V4 Flash — Zapi reference > DeepSeek V4 Flash — model AI cepat dengan reasoning, gratis. OpenAI-compatible: streaming, reasoning, tool calling. **Base URL:** `https://api.zpi.web.id` **Auth:** Send `x-api-key: YOUR_KEY` header on every request. Get a free key at https://zpi.web.id/dashboard/keys. **Response envelope:** `{ status, message, content }` **Rate limit:** 60 req/min on free tier. **Related:** - Detail page: https://zpi.web.id/api/ai/deepseek - Endpoint catalog: https://zpi.web.id/category/ai - Concise index: https://zpi.web.id/llms.txt - Full reference: https://zpi.web.id/llms-full.txt --- ## DeepSeek V4 Flash **Category:** ai · **Slug:** `deepseek` **Detail page:** https://zpi.web.id/api/ai/deepseek DeepSeek V4 Flash — model AI cepat dengan reasoning, gratis. OpenAI-compatible: streaming, reasoning, tool calling. **Tags:** ai, chat, llm, deepseek, reasoning, free, streaming ### Chat Completions OpenAI-compatible chat completions. Streaming SSE + reasoning. - **Method:** `POST` - **Endpoint:** `https://api.zpi.web.id/v1/ai:deepseek/chat` **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `messages` | array | body | yes | OpenAI-format messages | | `stream` | boolean | body | no | Stream OpenAI delta SSE. Default false | | `temperature` | number | body | no | Sampling temperature 0-2 | | `max_tokens` | number | body | no | Max output tokens | | `top_p` | number | body | no | Nucleus sampling 0-1 | | `reasoning_effort` | enum(low|medium|high) | body | no | Reasoning effort | | `tools` | array | body | no | OpenAI tool/function-calling definitions | | `tool_choice` | unknown | body | no | auto \| none \| required \| {function} | | `response_format` | unknown | body | no | mis. {"type":"json_object"} | | `stop` | unknown | body | no | Stop sequence(s) | | `seed` | number | body | no | Deterministic seed | **cURL:** ```bash curl -X POST "https://api.zpi.web.id/v1/ai:deepseek/chat" \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "messages": [ { "role": "system", "content": "Kamu adalah Zapi AI, asisten pintar berbasis DeepSeek" }, { "role": "user", "content": "Jelaskan singkat kenapa langit biru, lalu hitung 17*23 dan tunjukkan langkahnya" } ], "stream": true, "temperature": 1, "max_tokens": 1, "top_p": 1, "reasoning_effort": "low", "tools": "VALUE", "tool_choice": "VALUE", "response_format": "VALUE", "stop": "VALUE", "seed": 1 }' ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/ai:deepseek/chat", { method: "POST", headers: { "x-api-key": process.env.ZAPI_KEY, "Content-Type": "application/json" }, body: JSON.stringify({ "messages": [ { "role": "system", "content": "Kamu adalah Zapi AI, asisten pintar berbasis DeepSeek" }, { "role": "user", "content": "Jelaskan singkat kenapa langit biru, lalu hitung 17*23 dan tunjukkan langkahnya" } ], "stream": true, "temperature": 1, "max_tokens": 1, "top_p": 1, "reasoning_effort": "low", "tools": "VALUE", "tool_choice": "VALUE", "response_format": "VALUE", "stop": "VALUE", "seed": 1 }) }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.post("https://api.zpi.web.id/v1/ai:deepseek/chat", headers={"x-api-key": "YOUR_API_KEY"}, json={ "messages": [ { "role": "system", "content": "Kamu adalah Zapi AI, asisten pintar berbasis DeepSeek" }, { "role": "user", "content": "Jelaskan singkat kenapa langit biru, lalu hitung 17*23 dan tunjukkan langkahnya" } ], "stream": true, "temperature": 1, "max_tokens": 1, "top_p": 1, "reasoning_effort": "low", "tools": "VALUE", "tool_choice": "VALUE", "response_format": "VALUE", "stop": "VALUE", "seed": 1 }) data = r.json() ``` **Example response:** ```json { "id": "3f5b3ec8-865b-491e-a9a6-e8a253d19b44", "cost": "0", "model": "deepseek-v4-flash", "usage": { "total_tokens": 1327, "prompt_tokens": 118, "completion_tokens": 1209, "prompt_tokens_details": { "cached_tokens": 0 }, "prompt_cache_hit_tokens": 0, "prompt_cache_miss_tokens": 118, "completion_tokens_details": { "reasoning_tokens": 1000 } }, "object": "chat.completion", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "Tentu, Zapi AI siap menjawab dengan singkat!\n\n**1. Kenapa langit biru?** \nKarena fenomena **Hamburan Rayleigh (Rayleigh Scattering)**. Cahaya Matahari mengandung spektrum warna. Saat melewati atmosfer, molekul udara (seperti nitrogen dan oksigen) menghamburkan cahaya dengan panjang gelombang pendek (biru dan ungu) jauh lebih kuat daripada cahaya panjang gelombang panjang (merah). Mata manusia lebih sensitif terhadap biru dibanding ungu, ditambah sebagian ungu diserap atmosfer, jadilah langit tampak biru dari segala arah.\n\n**2. Hitung 17 × 23** \nHasilnya adalah **391**. \n(Perhitungan: 17 × 20 = 340, 17 × 3 = 51, 340 + 51 = 391)\n\nAda yang ingin ditanyakan lagi? 😊", "reasoning_content": "Thinking. 1. **Analyze the Request:**\n * Greeting/Context: \"Kamu adalah Zapi AI, asisten pintar berbasis DeepSeek\" -> The user is aware of the persona. I should embody it.\n * Task 1: \"Jelaskan singkat kenapa langit biru\" -> Explain briefly why the sky is blue.\n * Task 2: \"lalu hitung 17*23\" -> Then calculate 17 multiplied by 23.\n * Format: Concise, answers both parts sequentially.\n\n2. **Part 1: Why the sky is blue (briefly):**\n * *Cause:* Rayleigh scattering.\n * *Mechanism:* Sunlight reaches Earth's atmosphere, it is scattered by gases and small particles.\n * *Wavelength dependence:* Shorter wavelengths (blue/violet) scatter much more than longer wavelengths (red/orange).\n * *Why not violet?* The sun emits more blue light, our eyes are less sensitive to violet, and some violet is absorbed.\n * *Core explanation:* Air molecules scatter blue light from the sun more than they scatter red light. This scattered blue light is what fills the sky and reaches our eyes from all directions.\n\n3. **Part 2: Calculate 17 * 23:**\n * Standard multiplication: 17 * 20 = 340. 17 * 3 = 51. 340 + 51 = 391.\n * Alternative: (20-3) * 23 = 460 - 69 = 391.\n * Result: 391.\n\n4. **Drafting the response:**\n * \"Tentu, Zapi AI siap membantu!\"\n * **Pertanyaan 1: Kenapa langit biru?**\n * Singkatnya, karena fenomena *Rayleigh scattering* (hamburan Rayleigh). Cahaya matahari terdiri dari berbagai warna. Saat memasuki atmosfer Bumi, molekul udara dan partikel kecil menghamburkan cahaya dengan panjang gelombang pendek (biru dan ungu) jauh lebih kuat daripada panjang gelombang panjang (merah). Karena mata kita lebih sensitif terhadap biru daripada ungu, dan sebagian ungu diserap, langit terlihat biru.\n * **Pertanyaan 2: Hitung 17 * 23**\n * Hasil dari 17 dikali 23 adalah **391**. (Cara cepat: 17 x 20 = 340, 17 x 3 = 51, 340 + 51 = 391).\n\n5. **Refining the tone:**\n * Friendly, helpful, knowledgeable (\"asisten pintar\").\n * Keep \"singkat\" (brief) for the explanation. Don't overcomplicate the first answer.\n * Ensure the calculation is clearly correct. 17 * 23 = 391.\n\n Let's double check the calculation.\n 23 * 10 = 230\n 23 * 7 = 161\n 230 + 161 = 391. Yes, that's correct.\n\n Let's refine the language for the first part:\n * \"Fenomena ini disebut dengan hamburan Rayleigh.\"\n * \"Cahaya biru memiliki panjang gelombang yang lebih pendek sehingga lebih mudah dihamburkan oleh partikel di atmosfer.\"\n * \"Akibatnya, di siang hari saat kita melihat ke segala arah di langit (kecuali langsung ke arah matahari), yang kita lihat adalah cahaya biru yang terhambur tersebut.\"\n\n Combined response structure:\n 1. Acknowledge the greeting.\n 2. Answer 1 (Langit biru).\n 3. Answer 2 (17 * 23).\n 4. Closing (optional, just a friendly tone).\n\n \"Tentu, Zapi AI akan menjawabnya dengan singkat!\n\n **1. Kenapa Langit Biru?**\n Karena fenomena **Hamburan Rayleigh**. Cahaya matahari terdiri dari spektrum warna. Molekul udara di atmosfer menghamburkan cahaya dengan panjang gelombang pendek (biru dan ungu) lebih kuat daripada panjang gelombang panjang (merah). Mata kita lebih sensitif pada warna biru, sehingga kita melihat langit berwarna biru.\n\n **2. Hitung 17 × 23**\n Hasilnya adalah **391**\n (17 × 20 = 340, 17 × 3 = 51, 340 + 51 = 391).\n\n Ada yang bisa dibantu lagi?\"" }, "logprobs": null, "finish_reason": "stop" } ], "created": 1782115745, "system_fingerprint": "fp_8b330d02d0_prod0820_fp8_kvcache_20260402" } ``` --- _Generated: 2026-08-02T14:23:14.498Z_