# North Mini Code โ€” Zapi reference > North Mini Code โ€” model AI khusus coding, gratis. Tulis/jelaskan/perbaiki kode. OpenAI-compatible streaming. **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/north - 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 --- ## North Mini Code **Category:** ai ยท **Slug:** `north` **Detail page:** https://zpi.web.id/api/ai/north North Mini Code โ€” model AI khusus coding, gratis. Tulis/jelaskan/perbaiki kode. OpenAI-compatible streaming. **Tags:** ai, chat, llm, coding, code, north, free ### Chat Completions OpenAI-compatible chat completions. Streaming SSE + reasoning. - **Method:** `POST` - **Endpoint:** `https://api.zpi.web.id/v1/ai:north/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:north/chat" \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "messages": [ { "role": "system", "content": "Kamu asisten coding ahli. Jawab ringkas dengan kode bersih" }, { "role": "user", "content": "Tulis fungsi Python cek_palindrome(s) yang abaikan spasi dan kapital, sertakan 2 contoh pemakaian" } ], "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:north/chat", { method: "POST", headers: { "x-api-key": process.env.ZAPI_KEY, "Content-Type": "application/json" }, body: JSON.stringify({ "messages": [ { "role": "system", "content": "Kamu asisten coding ahli. Jawab ringkas dengan kode bersih" }, { "role": "user", "content": "Tulis fungsi Python cek_palindrome(s) yang abaikan spasi dan kapital, sertakan 2 contoh pemakaian" } ], "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:north/chat", headers={"x-api-key": "YOUR_API_KEY"}, json={ "messages": [ { "role": "system", "content": "Kamu asisten coding ahli. Jawab ringkas dengan kode bersih" }, { "role": "user", "content": "Tulis fungsi Python cek_palindrome(s) yang abaikan spasi dan kapital, sertakan 2 contoh pemakaian" } ], "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": "11109eb9-cc96-4233-afd0-dd2caf17f495", "cost": "0", "model": "north-mini-code-1-0-xl", "usage": { "total_tokens": 380, "prompt_tokens": 33, "completion_tokens": 347, "prompt_tokens_details": { "audio_tokens": 0, "cached_tokens": 0 }, "completion_tokens_details": { "audio_tokens": 0, "reasoning_tokens": 224, "accepted_prediction_tokens": 0, "rejected_prediction_tokens": 0 } }, "object": "chat.completion", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "```python\ndef cek_palindrome(s: str) -> bool:\n \"\"\"\n Periksa apakah string s adalah palindrome, mengabaikan spasi dan huruf kapital.\n \"\"\"\n # Hapus semua spasi dan ubah ke huruf kecil\n cleaned = ''.join(s.split()).lower()\n # Bandingkan dengan string terbaliknya\n return cleaned == cleaned[::-1]\n\n# Contoh penggunaan\nif __name__ == \"__main__\":\n print(cek_palindrome(\"A man a plan a canal Panama\")) # True\n print(cek_palindrome(\"Hello World\")) # False\n```", "reasoning_content": "The user asks: \"Write a Python function cek_palindrome(s) that ignores spaces and capital letters, and include 2 examples\". So we need to output a function that takes a string s, removes spaces, lowercases, then checks if it's equal to its reverse. Provide two example calls with prints presumably. They want concise code. Should be correct.\n\nWe need to output code snippet. Since it's a coding assistant, likely they want Python code. We can include docstring.\n\nLet's produce:\n\ndef cek_palindrome(s):\n cleaned = ''.join(s.split()).lower()\n return cleaned == cleaned[::-1]\n\nBut ignoring spaces also includes other whitespace? Probably just spaces. So we can remove spaces: s.replace(\" \", \"\").lower().\n\nBetter: cleaned = ''.join(s.split()).lower() removes all whitespace.\n\nLet's do:\n\ndef cek_palindrome(s):\n s = ''.join(s.split()).lower()\n return s == s[::-1]\n\nExamples:\n\nprint(cek_palindrome(\"A man a plan a canal Panama\")) # True\nprint(cek_palindrome(\"Hello World\")) # False\n\nThat's it." }, "logprobs": null, "finish_reason": "stop" } ], "created": 1782115834 } ``` --- _Generated: 2026-08-02T14:23:45.976Z_