📚 DOCS · v1.0

เอกสาร เชิงลึก ทั้งหมด
ของ Mavis

เปรียบเทียบราคา · ต้นทุน Token · Self-host · API · โครงสร้างเทคนิค

📖 สารบัญ

1. 🧠 ทำไม Mavis

AI ทั่วไปลืมทุกอย่างเมื่อปิดแชท — Mavis จำข้าม session ด้วย persistent memory + session continuity

3 ความต่างหลัก

📊 ตัวเลขจริง: 50+ apps · 3.1B tokens/เดือน · $120/เดือน · 246× ถูกกว่า GPT-5.5

2. ⚖️ Mavis vs AI อื่น

เปรียบเทียบ feature-by-feature กับ ChatGPT, Claude, Gemini

Feature Mavis ChatGPT Claude Gemini
จำข้าม session ✅ ตลอดอายุ ❌ session หน่อย ⚠️ projects แยก ⚠️ limited
Deploy เว็บ/เกมจริง ✅ 50+ apps
Self-host ✅ 1 คำสั่ง
BYOK ราคาถูก ✅ $120/เดือน flat ⚠️ Pay-per-token ⚠️ Pay-per-token ⚠️ Pay-per-token
ความเร็ว (cached) ~2-3s ~3-5s ~4-6s ~3-5s
เน้นภาษาไทย ✅ native ⚠️ แปล ✅ OK ⚠️ แปล

3. 💰 Apps vs ตลาด

เปรียบเทียบราคา subscription ของ Mavis กับ AI อื่นๆ ในงานเดียวกัน

Provider Plan USD/mo Tokens/เดือน ≈ ฿/เดือน
Mavis Token Plan Ultra $120 12.5B ~4,200
Mavis Token Plan Max $50 5.1B ~1,750
Mavis Token Plan Plus $20 1.7B ~700
ChatGPT Plus $20 ~700K (rate-limit) ~700
Claude Pro $20 ~700K (rate-limit) ~700
Gemini Advanced $20 ~500K (rate-limit) ~700
⚠️ จุดสำคัญ: subscription ของ ChatGPT/Claude/Gemini มี rate-limit เข้มงวด — Mavis Token Plan ให้ tokens จริงๆ ไม่ใช่ rate-limit

4. 🖥️ Self-host Infrastructure

Mavis รันได้บน VPS ของคุณเอง — ไม่ต้องเช่าใคร

4 VPS ที่ใช้งานจริง

System CPU RAM Disk Status
Mavis Sandbox Intel Xeon 2 vCPU 2 GiB 30 GB overlay session only
VPS 103.22.183.111 QEMU AMD 6 vCPU 15 GiB 96 GB (92% used ⚠️) 17h uptime · 43 services
VPS 5.231.28.248 (CodeHub) AMD EPYC 9334 8 vCPU 15 GiB 242 GB + 16 TB XFS 12 weeks uptime 🔥
VPS 178.83.121.75 (Games) AMD EPYC 7663 1 vCPU 2.9 GiB (262 MB free ⚠️) 19 GB 20+ listening ports

Self-host vs Cloud SaaS

Self-host Mavis Cloud SaaS (OpenAI)
ต้นทุน server ~$70/เดือน $0 (no server)
ต้นทุน API $120/เดือน flat $1,272-29,473/เดือน
Data privacy ✅ ของคุณเอง ❌ ส่งให้ provider
Customize ✅ full ❌ black box
Vendor lock-in ❌ ไม่มี ⚠️ สูง
รวม/เดือน ~$190 $1,272+

5. 🎟️ Token Plan Economics

เลือก plan ที่เหมาะกับการใช้งาน — ใช้เยอะ = Max คุ้มที่สุด, ใช้น้อย = Plus

Tier USD/mo Tokens เมวิสใช้ Verdict
Plus $20 1.7B 182% (over quota ❌) ไม่พอ
Max $50 5.1B 60.8% (fits ✅) 🔥 POPULAR
Ultra $120 12.5B 24.8% (4× headroom ✅) ✓ เมวิสใช้อันนี้
💡 เคล็ดลับ: Ultra ไม่ได้แพง — เมื่อเทียบกับ pay-per-token ที่ทำงานเดียวกัน ถูกกว่า 10-246 เท่า

6. 💸 ต้นทุนจริง · 3.1B tokens/เดือน

สมมติฐาน: 70/30 input/output · cache hit 95% · ใช้จริง 3.1B tokens/เดือน

โมเดล ฿/1K tokens USD/mo ฿/mo × Mavis
🐉 Mavis Ultra ฿0.0014 $120 ~4,200
🌊 DeepSeek V3 ฿0.0034 $304 ~10,656 2.5×
🤖 M3 Pay-Per-Token ฿0.014 $1,272 ~44,528 10.6×
💎 Gemini 2.5 Ultra ฿0.13 $11,789 ~412,616 98×
🧠 Claude Opus 4.8 ฿0.28 $24,823 ~868,814 207×
⚡ GPT-5.5 ฿0.33 $29,473 ~1,031,564 246×
📐 สูตร: 3.1B × 70/30 in/out × cache 95% = input สด 0.1085B + cache 2.0615B + output 0.93B

7. 🔧 โครงสร้างเทคนิค

Memory Architecture

Token Economics

// Cache hit rate (real workload)
const cacheHitRate = 95.4%

// Actual usage breakdown
const dailyTokens = 1.10B (mean) // range 0.35-3.10B
const monthlyTokens = 26.7-33B
const monthlyCost = $11,510 (cache) / $19,708 (no cache)

API Rate Limits

8. 📡 API Reference

POST /api/build (Apps Builder)

POST https://apps.sj88ai.com/api/build
Content-Type: application/json

{
  "user": "yourname",
  "program": "my-app",
  "html": "<html>...</html>",
  "title": "My App",
  "description": "..."
}

Response:
{
  "ok": true,
  "url": "https://apps.sj88ai.com/yourname/my-app/"
}

GET /api/programs/<user>

GET https://apps.sj88ai.com/api/programs/demouser

Response:
{
  "ok": true,
  "programs": [
    {"name": "counter", "url": "...", "created": "..."}
  ]
}

MiniMax API (LMM)

POST https://api.minimax.io/v1/chat/completions
Authorization: Bearer YOUR_KEY

{
  "model": "MiniMax-Text-01",
  "messages": [{"role": "user", "content": "..."}]
}
🔗 เอกสารเพิ่มเติม: ดูที่ codehub.sj88ai.com/skill สำหรับ 100 sub-phases guide

9. 🐉 MiniMax M3 Deep Dive

เอกสารเชิงลึกเกี่ยวกับ MiniMax M3 — model ที่ Mavis ใช้ทำงาน · เปิดตัว 1 มิ.ย. 2026

9.1 Overview

MiniMax M3 เป็น frontier open-weight LLM จาก Shanghai-based MiniMax · เปิดตัววันที่ 1 มิถุนายน 2026 · เป็น model แรกที่รวม 3 ความสามารถระดับ frontier เข้าด้วยกัน:

M3 ยังเป็น open-weight (ไม่ใช่ fully open-source) — ปล่อย weight แต่ปิด inference + agent layer

9.2 MSA Architecture

นวัตกรรมหลักของ M3 คือ MiniMax Sparse Attention (MSA) — sparse attention architecture ใหม่ที่ทำให้ 1M context เป็นไปได้ในทางปฏิบัติ

ปัญหาของ Full Attention

Standard Transformer attention scales เป็น O(n²) — ที่ 1M tokens หมายถึง 1 trillion operations ต่อ token · ไม่สามารถใช้งานได้จริงใน production

MSA Solution

MSA ใช้ pre-filtering stage ที่ partition KV cache ออกเป็น blocks · เลือกเฉพาะ blocks ที่เกี่ยวข้องกับ query ปัจจุบัน · effective computation ลดลงเหลือ O(n log n)

ผลลัพธ์ที่ได้ (vs M2)

MetricM2 (Full Attention)M3 (MSA)Δ
Per-token computebaseline1/20-95%
Prefill speedbaseline9× faster+9×
Decode speedbaseline15.6× faster+15.6×
Context coverage100%98.3%-1.7%

เปรียบเทียบกับ Sparse Attention อื่น

MethodProviderCoverageEffective computation
MSAMiniMax98.3%O(n log n)
DSA (DeepSeek Sparse Attention)DeepSeek~95%O(n log n)
MoBA (Mixture of Blocks Attention)Moonshot~93%O(n log n)
Flash-Sparse-Attentionopen source~90%O(n log n)

9.3 Specifications

FieldValue
ReleasedJune 1, 2026
TypeOpen-weight (inference + agent closed)
Context window (max)1,048,576 tokens (~1.5M Thai chars / 1,500 pages)
Context window (guaranteed)512K tokens
Max output128K tokens
Modality (input)Text + Image + Video
Modality (output)Text only
ArchitectureMSA (MiniMax Sparse Attention)
BackboneGQA + MSA blocks
KV cache (FP8, 1M ctx)~120 GB
Min hardware (1M)4× H200 SXM5 (564 GB total) or 8× H100 SXM5 (640 GB)

9.4 Pricing (Detailed)

Tier 1: ≤512K input (standard rate)

DirectionUSD per 1M tokensTHB per 1M tokens (×35)
Input$0.30~10.5
Output$1.20~42
Cache read$0.06~2.1
Cache write$0.30~10.5

Tier 2: >512K input (long-context rate · 2× standard)

DirectionUSD per 1M tokens
Input$0.60
Output$2.40
Cache read$0.12

Comparison · Full 1M-context request

Provider1M input (cache miss)1M input (cached)Output price× M3
🐉 MiniMax M3$0.60$0.12$1.20-2.40
DeepSeek V4 Flash$0.14$0.0028$0.280.23×
DeepSeek V4 Pro$0.44$0.0036$0.880.73×
Qwen3.5-Plus$0.500.83×
GPT-5.4$2.50$0.25$15.004.2×
Claude Sonnet 4.6$3.00$0.30$15.00
Gemini 3.1 Pro$4.00$0.20$18.006.7×
GPT-5.5$5.00$0.50$30.008.3×
Claude Opus 4.8$5.00$0.50$25.008.3×
Claude Fable 5 (suspended)$10.00$1.00$50.0016.7×

M3 = cheapest frontier-level 1M model · 8-16× ถูกกว่า GPT-5.5/Opus/Fable · เทียบเฉพาะ frontier-level coding

9.5 Benchmarks · Full Comparison

vs Claude Opus 4.7 (closest competitor)

BenchmarkM3Opus 4.7Δ (M3 - Opus)Winner
SWE-Bench Verified80.587.6-7.1Opus
SWE-Bench Pro59.064.3-5.3Opus
Google-Proof Q&A92.994.2-1.3Opus
BrowseComp83.579.3+4.2M3 🏆
Terminal-Bench 2.166.062.3+3.7M3 🏆
MCP-Atlas74.277.3-3.1Opus

vs GPT-5.5 + Gemini 3.1 Pro (other 1M-class)

BenchmarkM3GPT-5.5Gemini 3.1 Pro
SWE-Bench Pro59.057.356.8
SWE-Bench Verified80.582.078.0
KernelBench Hard (open)28.8 (SOTA)

Coding Achievements (real workloads)

9.6 Use Cases for 1M Context

9.6.1 Full Repository Understanding

โหลด codebase ทั้งโปรเจคในครั้งเดียว — ไม่ต้อง RAG, ไม่ต้อง chunking

// Pseudo-API call
POST /v1/chat/completions
{
  "model": "MiniMax-Text-01",
  "messages": [{
    "role": "user",
    "content": "Refactor the auth module to use OAuth2. [WHOLE REPO: 800K tokens]"
  }]
}
// M3 processes in single context window

9.6.2 Long Document Analysis

9.6.3 Long Video Understanding

9.6.4 Long-Range Agent Tasks

9.7 Native Multimodality

M3 รับ input ได้ 3 modalities (text, image, video) — output เป็น text only

Image Understanding

Video Understanding

9.8 Server Tiers (Detailed)

TierLatency (TTFT)ConcurrencySLAUse case
Standard~298ms decodeDefaultBest-effortChat, dev, regular
Priority~246ms decode (stable)Scheduled priority✅ SLA guaranteeProduction SLA-sensitive
Self-hostDepends on GPUYour ownYour ownFull control · air-gapped

Priority Tier Requirements

9.9 Thinking Mode

M3 รองรับ 2 modes ที่ toggle ได้ต่อ request:

ModeUse caseLatency
Thinking ONComplex reasoning, agent tasks, long-horizon collabSlower (chain-of-thought)
Thinking OFFConversation, code completion, latency-sensitiveFaster (direct response)

Same pricing in both modes · switch per-request

9.10 API Reference

Base URL

https://api.minimax.io/v1

Chat Completion (basic)

POST /v1/chat/completions
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

{
  "model": "MiniMax-Text-01",
  "messages": [
    {"role": "user", "content": "Hello"}
  ],
  "max_tokens": 1024,
  "temperature": 0.7
}

With Long Context (1M tier)

POST /v1/chat/completions
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

{
  "model": "MiniMax-Text-01",
  "messages": [...],  // can be 1M+ tokens
  "max_tokens": 128000,
  "temperature": 0.7
  // Note: pricing automatically 2× for >512K input
}

With Multimodal (image input)

{
  "model": "MiniMax-Text-01",
  "messages": [{
    "role": "user",
    "content": [
      {"type": "text", "text": "What's in this image?"},
      {"type": "image_url", "image_url": {"url": "https://..."}}
    ]
  }]
}

With Service Tier (priority)

{
  "model": "MiniMax-Text-01",
  "messages": [...],
  "service_tier": "priority"  // SLA guaranteed
}

Streaming

POST /v1/chat/completions
{
  "model": "MiniMax-Text-01",
  "messages": [...],
  "stream": true
}
// Returns SSE stream of chunks

9.11 Self-Host Requirements (1M context)

TierContextMin GPUVRAM totalvLLM/SGLang
Standard128K1× A100 80GB80 GBvLLM 0.6+
Long512K2× A100 80GB160 GBvLLM 0.6+
Full1M4× H200 SXM5564 GBvLLM 0.6+
Full alt1M8× H100 SXM5640 GBSGLang

9.12 Limitations & Caveats

Open-weight ≠ Open-source

M3 ปล่อย weights แต่ inference + agent code ปิด · ต้อง verify license terms ก่อน commercial deployment

1M context = real cost

แม้ M3 จะทำ 1M ได้ แต่ self-host ต้องการ 4×H200 / 8×H100 · ใช้ hosted API จะประหยัดกว่ามาก

SWE-Bench Pro caveats

M3's 59.0% on SWE-Bench Pro is impressive — แต่:

Community controversy

Some community criticism around Terminal-Bench using Claude Code scaffold · MiniMax has been transparent about it · industry standard practice

9.13 Why M3 for Mavis?

Mavis เลือก M3 เพราะ:

9.14 Citations & Sources

📊 สรุป: M3 = frontier-level coding + 1M context + native multimodal · ราคาถูกกว่า GPT-5.5/Opus 8-16× · Mavis เลือกใช้เพราะ value-for-money สูงสุด
🔗 ดูเพิ่ม: API Reference · โครงสร้างเทคนิค · ต้นทุนจริง