{"service":"ThaiFi MPP","realm":"mpp.thaifi.com","operator":{"name":"Planck Laps Co., Ltd.","legal_name":"บริษัท พลังก์ แล็บส์ จำกัด","address":"39/130 หมู่ที่ 7 ถนนสุขุมวิท ตำบลบ้านสวน อำเภอเมืองชลบุรี จังหวัดชลบุรี"},"chain":{"id":17,"rpc":"https://rpc.thaifi.com","currency":"THCFI","token":"0x20c000000000000000000000c82102FFe7064362","decimals":6},"discovery":{"openapi":"https://mpp.thaifi.com/openapi.json","docs":"https://mpp.thaifi.com/llms.txt","stats":"https://mpp.thaifi.com/stats"},"payment":"MPP tempo charge, push mode — on 402 pay the quoted amount on chain 17 with the challenge-bound attribution memo, then retry with `Authorization: Payment <base64url credential>`","services":[{"id":"iapp","name":"iApp Image Generation","title":"iApp Image Generation","category":"AI","description":"Thai image generation with exact Thai text rendering (19 typefaces). One image per payment.","method":"POST","path":"/iapp/generate","url":"https://mpp.thaifi.com/iapp/generate","endpoint":"POST https://mpp.thaifi.com/iapp/generate","price":"1.5 THCFI / image","auth":"mpp","requestBody":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","maxLength":1500},"text":{"type":"string","description":"Text to render exactly (max 4 lines x 120 chars)"},"font":{"type":"string","default":"kanit-bold"},"size":{"type":"string","enum":["1024x1024","1280x768","768x1280","1536x1024","1024x1536"],"default":"1024x1024"},"style":{"type":"string"},"seed":{"type":"integer"},"text_scale":{"type":"number","minimum":0.2,"maximum":0.9}}},"docs":"- Body (JSON): `prompt` (required, max 1500 chars), `text` (Thai text to\n  render exactly), `font` (default kanit-bold), `size`\n  (1024x1024|1280x768|768x1280|1536x1024|1024x1536), `style`, `seed`,\n  `text_scale` (0.2-0.9)\n- Response (JSON): `status`, `id`, `width`, `height`, `mime_type`,\n  `image_base64`, `time`","latency":"~20-45s per image"},{"id":"qwen","name":"Qwen Image","title":"Qwen Image","category":"AI","description":"Image generation with Qwen-Image on our own DGX Spark GPU — photorealistic subjects on any background, fast. One image per payment.","method":"POST","path":"/qwen/generate","url":"https://mpp.thaifi.com/qwen/generate","endpoint":"POST https://mpp.thaifi.com/qwen/generate","price":"1 THCFI / image","auth":"mpp","requestBody":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","maxLength":1500},"size":{"type":"string","enum":["1024x1024","1280x768","768x1280","1536x1024","1024x1536"],"default":"1024x1024"},"seed":{"type":"integer"},"n":{"type":"integer","minimum":1,"maximum":4,"default":1}}},"docs":"- Body (JSON): `prompt` (required, max 1500 chars), `size`\n  (1024x1024|1280x768|768x1280|1536x1024|1024x1536), `seed`, `n` (1-4)\n- Response (JSON): `status`, `id`, `width`, `height`, `mime_type`,\n  `image_base64`, `time`, `engine`\n- Engine: Qwen/Qwen-Image-2.1 on our own GPU — photorealistic subjects,\n  studio-style backgrounds","latency":"~45-60s per image"},{"id":"qwen3.8","name":"LLM Chat (combo)","title":"LLM Chat (combo)","category":"AI","description":"Chat completion via the combo model on our AI gateway (200K context, vision/PDF input, reasoning; no tool calling). Flat price per request.","method":"POST","path":"/llm/chat","url":"https://mpp.thaifi.com/llm/chat","endpoint":"POST https://mpp.thaifi.com/llm/chat","price":"0.2 THCFI / request","auth":"mpp","requestBody":{"type":"object","required":["messages"],"properties":{"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant","tool"]},"content":{"type":"string"}}}},"temperature":{"type":"number","default":0.7},"max_tokens":{"type":"integer","default":1024,"maximum":4096}}},"docs":"- Body (JSON): `messages` (required, OpenAI-compatible\n  `{role, content}` array; roles: system|user|assistant|tool),\n  `temperature` (default 0.7), `max_tokens` (default 1024, hard cap 4096\n  so the flat price cannot be abused with huge generations)\n- Response (JSON): OpenAI-compatible chat completion object\n- Model: combo (gateway-routed; 200K context, vision/PDF input, no tool calling)","latency":"a few seconds to ~1 min depending on completion length"},{"id":"legal-search","name":"Legal Knowledge Search","title":"Legal Knowledge Search","category":"Legal","description":"Full-text search over the curated Thai legal knowledge base (พ.ร.ก. สินทรัพย์ดิจิทัล 2561 รวมแก้ไข 2568, พ.ร.บ. ระบบการชำระเงิน 2560, ประกาศกระทรวงการคลัง) — คืนตัวบทรายมาตรา/ข้อ พร้อม citation.","method":"POST","path":"/legal/search","url":"https://mpp.thaifi.com/legal/search","endpoint":"POST https://mpp.thaifi.com/legal/search","price":"0.1 THCFI / query","auth":"mpp","requestBody":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Search text in Thai or English, e.g. `ผู้ให้บริการรับฝากสินทรัพย์ดิจิทัล`, `มาตรา 26`, `โฆษณา`"},"doc":{"type":"string","description":"Restrict to one document id — see GET /legal/outline"},"limit":{"type":"integer","default":8,"minimum":1,"maximum":20}}},"docs":"- Body (JSON): `query` (required, 1–300 chars), optional `doc` (document id, see `GET /legal/outline`) and `limit` (1–20, default 8).\n- Response: `{ results: [{ doc_id, section, chapter, title, citation, body, analysis, amendment }] }` — queries like `มาตรา 26` resolve the exact section deterministically first; otherwise Thai/English trigram full-text search (BM25).\n- Content = actual gazette text split per มาตรา/ข้อ with curated analysis — informational, not legal advice.","latency":"instant"},{"id":"legal-ask","name":"Legal Q&A (RAG)","title":"Legal Q&A (RAG)","category":"Legal","description":"ตอบคำถามกฎหมายสินทรัพย์ดิจิทัล/การชำระเงินไทย จากตัวบทราชกิจจานุเบกษาในฐานความรู้ พร้อมอ้างมาตรา — retrieval + LLM synthesis. ไม่ใช่คำปรึกษาทางกฎหมาย.","method":"POST","path":"/legal/ask","url":"https://mpp.thaifi.com/legal/ask","endpoint":"POST https://mpp.thaifi.com/legal/ask","price":"0.5 THCFI / question","auth":"mpp","requestBody":{"type":"object","required":["question"],"properties":{"question":{"type":"string","description":"The legal question in Thai or English, 5–2000 chars","maximum":2000},"doc":{"type":"string","description":"Restrict retrieval to one document id — see GET /legal/outline"},"limit":{"type":"integer","default":6,"minimum":3,"maximum":12}}},"docs":"- Body (JSON): `question` (required, 5–2000 chars), optional `doc` and `limit` (3–12, default 6).\n- Response: `{ answer, citations, results }` — the answer cites every section it used and ends with the not-legal-advice disclaimer.\n- Upstream down → 503 before payment (circuit breaker); upstream fails after payment → 502 `refundable: true`.","latency":"a few seconds (LLM synthesis)"},{"id":"course","name":"Course Booking","title":"Course Booking","category":"Events","description":"Register and pay for a course seat (workshops, vibe coding classes). One seat per payment; the attendee gets a check-in code in the response and by email.","method":"POST","path":"/courses/{courseId}/register","url":"https://mpp.thaifi.com/courses/{courseId}/register","endpoint":"POST https://mpp.thaifi.com/courses/{courseId}/register","price":"per course — see GET /courses","auth":"mpp","requestBody":{"type":"object","required":["email","firstName","lastName"],"properties":{"email":{"type":"string","description":"Attendee email — receives the confirmation + check-in code"},"firstName":{"type":"string"},"lastName":{"type":"string"},"phone":{"type":"string","description":"optional"}}},"docs":"- First: `GET /courses` (free) — list courses with `id`, price (THCFI),\n  seats left, date and location\n- Then: `POST /courses/{courseId}/register` with `email`, `firstName`,\n  `lastName` (`phone` optional)\n- On `402` the amount to pay is THAT course's price; after payment the\n  booking is confirmed and the response carries `bookingRef` and\n  `checkinCode` (also emailed to the attendee — show the code at the door)\n- Ask again later: `GET /bookings/{bookingRef}`, or recover by email:\n  `POST /bookings/lookup` `{\"email\":\"…\"}` → OTP arrives by email →\n  `POST /bookings/verify` `{\"email\":\"…\",\"otp\":\"…\"}` returns all bookings\n  with their codes\n- `409 course_full` / `course_closed` / `already_registered` — refused\n  BEFORE any payment is taken","latency":"instant"},{"id":"token-create","name":"TIP-20 Token Creation","title":"TIP-20 Token Creation","category":"Launchpad","description":"Create a full TIP-20 token on ThaiFi chain 17 with an initial mint — name, symbol, supply and optional 1024x1024 logo. The paying wallet becomes the token's admin; creation is fully non-custodial handover.","method":"POST","path":"/tokens/create","url":"https://mpp.thaifi.com/tokens/create","endpoint":"POST https://mpp.thaifi.com/tokens/create","price":"1000 THCFI / token","auth":"mpp","requestBody":{"type":"object","required":["name","symbol","mint_amount"],"properties":{"name":{"type":"string","maxLength":64},"symbol":{"type":"string","pattern":"^[A-Z0-9]{2,11}$","description":"2-11 chars A-Z/0-9"},"mint_amount":{"type":"integer","minimum":1,"maximum":1000000000,"description":"Human units — 6 decimals are applied server-side (10,000 mints 10,000.000000)"},"recipient":{"type":"string","description":"optional — who receives the initial mint (default: the paying wallet)"},"logo_base64":{"type":"string","description":"optional — base64 PNG/WebP, square ≤1024x1024, ≤2MB; set on-chain as logoURI so the explorer shows it"}}},"docs":"- Body (JSON): `name` (max 64), `symbol` (2-11 A-Z0-9),\n  `mint_amount` (integer human units, 1-1,000,000,000 — decimals are applied\n  for you: 10,000 → 10,000.000000), `recipient` (optional — defaults to YOUR\n  wallet, the payer), `logo_base64` (optional — base64 PNG or WebP, square,\n  ≤1024x1024, ≤2MB; uploaded to assets.thaifi.com and set as the on-chain\n  `logoURI()` so exp.thaifi.com shows it)\n- What you get: a REAL system TIP-20 on chain 17 (gas-payable standard, full\n  standard interface), initial mint of `mint_amount` to `recipient`, supply\n  locked at the minted amount, and **all admin rights handed to the paying\n  wallet** (DEFAULT_ADMIN + ISSUER) — the service renounces its own roles, so\n  the token is fully yours (raise the cap, pause, mint more — your call)\n- Response (JSON): `token` (address), `request_id`, `mint_amount_raw`,\n  `recipient`, `logo_url`, `txs` (on-chain step hashes), `explorer_url`\n- Check later: `GET /tokens/{token_address}` — creation record\n- Note: your wallet (the payer) is the admin — keep its access key safe","latency":"~10-20s (7 on-chain transactions)"},{"id":"voucher-create","name":"Voucher / Ticket NFT Collection","title":"Voucher / Ticket NFT Collection","category":"Launchpad","description":"Deploy a dedicated ERC-1155 NFT contract for vouchers or event tickets and mint the ordered quantity to one wallet. Tickets (concerts, runs) and reward vouchers/coupons supported. Price: 1,000 THCFI minimum (includes 5,000), then 0.20 THCFI per voucher.","method":"POST","path":"/vouchers/collections","url":"https://mpp.thaifi.com/vouchers/collections","endpoint":"POST https://mpp.thaifi.com/vouchers/collections","price":"1,000 THCFI min. (incl. 5,000), then 0.20 THCFI per voucher — POST /vouchers/quote","auth":"mpp","requestBody":{"type":"object","required":["kind","name","organization","description","tier_name","quantity"],"properties":{"kind":{"type":"string","enum":["ticket","voucher"]},"name":{"type":"string","maxLength":100},"organization":{"type":"string","maxLength":100},"description":{"type":"string","maxLength":1000},"tier_name":{"type":"string","maxLength":60,"description":"e.g. VIP, Regular, 5KM, 10KM"},"quantity":{"type":"integer","minimum":1,"maximum":100000},"event_date":{"type":"string","description":"tickets: ISO date/datetime (required)"},"venue_name":{"type":"string","description":"tickets: venue or start line (required)"},"redemption_value":{"type":"string","description":"vouchers: what it is worth, e.g. 'ส่วนลด 20%' (required)"},"redemption_instructions":{"type":"string","maxLength":1000,"description":"vouchers: how to redeem (required)"},"valid_from":{"type":"string","description":"optional ISO date"},"valid_until":{"type":"string","description":"optional ISO date (recommended for vouchers)"},"terms":{"type":"string","maxLength":2000},"external_url":{"type":"string"},"symbol":{"type":"string","description":"optional — slugged from name by default"},"recipient":{"type":"string","description":"optional — defaults to the paying wallet"},"logo_base64":{"type":"string","description":"optional — base64 PNG/WebP, square ≤1024x1024, ≤2MB"}}},"docs":"- Price: `max(1,000, quantity × 0.20)` THCFI — the 1,000 minimum covers up\n  to 5,000 vouchers, each beyond costs 0.20 THCFI\n- First: `POST /vouchers/quote` (free, same body) — validates the order and\n  returns the exact price. Ask your user the questions below until you have\n  every required field, then quote, then create.\n- Required fields — `kind: \"ticket\"`: `name`, `organization`,\n  `description`, `tier_name` (VIP/Regular/5KM…), `quantity`,\n  `event_date` (ISO), `venue_name`; `kind: \"voucher\"`: `name`,\n  `organization`, `description`, `tier_name`, `quantity`,\n  `redemption_value` (\"ส่วนลด 20%\", \"กาแฟ 1 แก้ว\"), `redemption_instructions`\n- Optional: `valid_from`, `valid_until` (recommended for vouchers),\n  `terms`, `external_url`, `symbol`, `recipient` (defaults to the paying\n  wallet), `logo_base64` (base64 PNG/WebP square ≤1024x1024, ≤2MB)\n- What you get: a DEDICATED ERC-1155 contract for the collection (own\n  name/symbol, source-verified), `quantity` units of token id 1 minted to\n  `recipient`, ERC-1155 metadata JSON + logo on assets.thaifi.com, and full\n  contract ownership (DEFAULT_ADMIN + MINTER) handed to the paying wallet\n- Response (JSON): `collection` (contract address), `token_id`,\n  `quantity`, `metadata_url`, `txs`, `explorer_url`\n- Check later: `GET /vouchers/collections/{request_id}`\n- Distribute by ordinary transfers — scan-to-redeem flows can verify balance\n  of the holder on chain","latency":"~10-20s (5 on-chain transactions)"},{"id":"agent-auth","name":"Agent Auth (free)","title":"Agent Auth (free)","category":"Identity","description":"Agent identity for free APIs — proves an on-chain authorized access key (AccountKeychain). Signature over server challenge, no payment.","method":"GET","path":"/whoami","url":"https://mpp.thaifi.com/whoami","endpoint":"GET https://mpp.thaifi.com/whoami","price":"free (ThaiFiAgent auth)","auth":"agent","requestBody":null,"docs":"- Price: free — requires agent identity, no payment\n- Auth: ThaiFi Agent Auth (TAA) — the server answers `401` with\n  `WWW-Authenticate: ThaiFiAgent realm=\"…\", challenge=\"<base64url>\", expires=\"<unix>\"`.\n  Sign `keccak256(tag(\"thaifi-agent-auth\")[0:4] ‖ 0x01 ‖ keccak256(realm)[0:10]\n  ‖ nonce ‖ utf8(METHOD) ‖ utf8(path?query) ‖ sha256(body) | 0x00*32\n  ‖ uint64be(unix timestamp))` with your on-chain access key and retry with\n  `Authorization: ThaiFiAgent <base64url {v:1, ts, nonce, signature}>`.\n  The server verifies your key against the AccountKeychain precompile —\n  revoked/expired keys are rejected by the chain itself.\n- `thaifi request` answers this challenge automatically (v0.3.0+)\n- Response (JSON): `account`, `keyId`, `keyType`, `expiry`, `spendPolicy`, `token`","latency":null}]}