Skip to content
開發者文件

API v1

唯讀 JSON API:搜尋提示詞、瀏覽公開組合包與串接自動化。不需登入;依 IP 限制請求次數。

English

快速開始

請使用 curl 執行檔;若 Windows PowerShell 的 curl 是別名,請改用 curl.exe。網址已加引號,查詢參數不會被終端拆開。

讀取官方模型參考

curl "https://prompt.luvai.net/api/v1/models?lang=zh&limit=1"

查詢工具代碼與公開數量

curl "https://prompt.luvai.net/api/v1/tools?lang=zh&limit=1"

搜尋公開電子報標題

curl "https://prompt.luvai.net/api/v1/newsletters?lang=zh&limit=1"

搜尋公開教學

curl "https://prompt.luvai.net/api/v1/tutorials?limit=1"

搜尋既有工程術語

curl "https://prompt.luvai.net/api/v1/keywords?q=cache&limit=1"

搜尋免費提示詞

curl "https://prompt.luvai.net/api/v1/prompts?free=1&lang=zh&limit=1"

查詢主題代碼

curl "https://prompt.luvai.net/api/v1/tags?q=code-review&lang=zh"

瀏覽公開組合包

curl "https://prompt.luvai.net/api/v1/collections?lang=zh&limit=20"
依真實 slug 讀取一筆結果(Node.js 18 以上)

將程式存為 promptcraft-read.mjs,執行 node promptcraft-read.mjs。最多發出兩次公開請求,每次逾時 10 秒;不需 API key 或額外套件。

const base = "https://prompt.luvai.net/api/v1";
async function read(url) {
  const response = await fetch(url, { signal: AbortSignal.timeout(10000) });
  if (!response.ok) throw new Error("HTTP " + response.status);
  const data = await response.json();
  if (data.ok !== true) throw new Error("Unexpected API response");
  return data;
}
const page = await read(base + "/prompts?free=1&limit=1&lang=zh");
const selected = page.prompts[0];
if (selected) {
  const detail = await read(base + "/prompts/" + encodeURIComponent(selected.slug) + "?lang=zh");
  console.log(JSON.stringify(detail, null, 2));
} else {
  console.log("No published free prompts were found.");
}

分頁回應含 next_offset。保留原查詢條件,以下一個 offset 繼續,遇到 null 就停止。組合包項目只有摘要;以項目 slug 查詢單篇端點,取得可用內容。

既有工程術語詞典

直接讀公開定義、使用時機與 how_to_ask 提問句。這是既有資料查詢,不呼叫 AI、不使用 AI 點數。content_language 為 zh-Hant;附英文術語,正文仍為繁中,回傳網址連到既有原文詞條。

GET參數/回應
/api/v1/tutorialsq (≤200), limit (1–50; 20), offset; total / showing / next_offset / tutorials
/api/v1/tutorials/{slug}tutorial: full stored Markdown, content_language=zh-Hant, content_format=markdown, source URL and dates
/api/v1/keywordsq (≤200), category, limit (1–50; 20), offset; total / showing / next_offset / keywords
/api/v1/keywords/{slug}keyword: definition, when_to_use, how_to_ask, gotcha, related, tags, updated_at

字面搜尋:% 與 _ 不是萬用字元。category 使用 OpenAPI 列出的完整值。保留條件,以 next_offset 續讀直到 null。搜尋 30 次/分鐘/IP、單篇 60 次;非法或重複參數 400、缺詞條 404、限流 429/Retry-After、資料不可用 503。沒有 lang 參數或虛構翻譯。

Node.js:搜尋後讀完整教學

標題、摘要與完整 Markdown 都是既有繁中資料。q 字面搜尋,不接受 lang,也不呼叫 AI。依 next_offset 續讀直到 null,來源網址指向實際教學頁。

const base = "https://prompt.luvai.net/api/v1";
async function read(path) {
  const response = await fetch(base + path, { signal: AbortSignal.timeout(10000) });
  if (!response.ok) throw new Error("HTTP " + response.status);
  const data = await response.json();
  if (data.ok !== true) throw new Error("Unexpected response");
  return data;
}
const page = await read("/tutorials?limit=1");
const selected = page.tutorials[0];
if (selected) {
  const detail = await read("/tutorials/" + encodeURIComponent(selected.slug));
  console.log(JSON.stringify(detail.tutorial, null, 2));
} else {
  console.log("No stored public tutorials were found.");
}
Node.js:搜尋後讀完整定義
const base = "https://prompt.luvai.net/api/v1";
async function read(path) {
  const response = await fetch(base + path, { signal: AbortSignal.timeout(10000) });
  if (!response.ok) throw new Error("HTTP " + response.status);
  const data = await response.json();
  if (data.ok !== true) throw new Error("Unexpected response");
  return data;
}
const page = await read("/keywords?limit=1");
const selected = page.keywords[0];
if (selected) {
  const detail = await read("/keywords/" + encodeURIComponent(selected.slug));
  console.log(JSON.stringify(detail.keyword, null, 2));
} else {
  console.log("No stored glossary entries were found.");
}

公開電子報封存

先搜尋已公開的各期標題,再讀取完整原始 HTML。lang 只選來源網址的介面語言,標題與正文維持原文。回應沒有收件人或寄送作業欄位,不寄信、不操作訂閱,也不呼叫 AI。

GET參數/回應
/api/v1/newslettersq (≤200 Unicode code points), lang (zh|en), limit (1–50; 20), offset; total / showing / next_offset / newsletters
/api/v1/newsletters/{slug}lang (zh|en); newsletter: subject, published_at, url, content_format=html, content

q 字面搜尋標題(ASCII 大小寫不敏感),% 與 _ 不是萬用字元。保留查詢,依 next_offset 續讀直到 null。REST 路徑將回傳 slug 編碼一次;MCP 直接用原始 slug。搜尋每 IP 每分鐘 30 次、單篇 60 次;非法、未知或重複參數 400,未存在或私人期數 404,限流 429/Retry-After,資料失敗 503。回應 no-store,下一次重新讀取公開狀態。

Node.js:搜尋後讀完整電子報
const base = "https://prompt.luvai.net/api/v1";
async function read(path) {
  const response = await fetch(base + path, { signal: AbortSignal.timeout(10000) });
  if (!response.ok) throw new Error("HTTP " + response.status);
  const data = await response.json();
  if (data.ok !== true) throw new Error("Unexpected response");
  return data;
}
const page = await read("/newsletters?limit=1&lang=zh");
const selected = page.newsletters[0];
if (selected) {
  const detail = await read("/newsletters/" + encodeURIComponent(selected.slug) + "?lang=zh");
  console.log(JSON.stringify(detail.newsletter, null, 2));
} else {
  console.log("No published newsletter issues were found.");
}

端點參考

GET/api/v1/collections目前公開的組合包摘要。count 為分頁前總數;以 next_offset 取得下一頁,null 代表結束。+
查詢參數
名稱可用值說明
langzh | enDefault zh. English fields fall back to the source; translation_status is complete, partial or source.
limit1-50Default 20
offsetinteger ≥ 0Default 0; use next_offset from the previous response.
200 回應 · 縮略示意
{
  "ok": true,
  "count": 1,
  "limit": 20,
  "offset": 0,
  "next_offset": null,
  "collections": [{
    "slug": "example-collection",
    "title": "Example collection",
    "summary": "Public collection metadata",
    "kicker": null,
    "unlock_cost": null,
    "updated_at": "2026-10-12",
    "translation_status": "complete",
    "url": "https://prompt.luvai.net/en/collections/example-collection"
  }]
}
請求限制: 30/min/IP
GET/api/v1/collections/[slug]組合包資訊與依策展順序排列的公開提示詞摘要、註解和連結。items_count 為分頁前的公開項目數;position 保留全包順位。未發布的組合包回 404。+
查詢參數
名稱可用值說明
langzh | enDefault zh; untranslated notes keep their source text.
limit1-50Default 25
offsetinteger ≥ 0Default 0; follow next_offset until null.
200 回應 · 縮略示意
{
  "ok": true,
  "limit": 25,
  "offset": 0,
  "next_offset": null,
  "collection": {
    "slug": "example-collection",
    "title": "Example collection",
    "items_count": 1,
    "items": [{
      "position": 1,
      "note": "Editorial note",
      "prompt": {
        "slug": "example-prompt",
        "title": "Example prompt",
        "is_pro": false,
        "url": "https://prompt.luvai.net/en/prompts/example-prompt"
      }
    }]
  }
}
請求限制: 60/min/IP
GET/api/v1/tagsDiscover every public topic, its unique prompt count, slug and locale URL. Use slug as the prompts API tag filter or MCP search_prompts tag.+
查詢參數
名稱可用值說明
qstring ≤ 200Search topic labels and aliases.
min_count1–100Minimum unique prompt count, default 1.
langzh | enLocale for topic links, default zh.
limit1–50Default 20; count precedes pagination.
offsetsafe integer ≥ 0Follow next_offset until null.
200 回應 · 縮略示意
{ "ok": true, "count": 1, "limit": 20, "offset": 0, "next_offset": null, "tags": [{ "slug": "code-review", "label": "Code Review", "prompt_count": 2, "url": "https://prompt.luvai.net/tags/code-review" }] }
請求限制: 30/min/IP
GET/api/v1/promptsList / search prompts. Count is complete before pagination; follow next_offset until null.+
查詢參數
名稱可用值說明
qstring ≤ 500Literal search across public metadata/examples and free body/variables. PRO body/variables are excluded from matching. Count includes every published match before pagination.
tagstring ≤ 200Exact topic label or normalized slug from /tags. Aliases match the same topic; literal percent text must be URL encoded. Empty/invalid values return 400; unknown topics return zero results. Combines with all other filters.
toolstring ≤ 100Use a known key from /tools or tool_key from /integrations (Midjourney uses mj); recognized legacy aliases also work. Unknown keys return 400.
categorystring?Filter by medium: image / video / music / tutorial
langzh | enMetadata language (default zh; missing translations fall back to Chinese)
free0 | 1Default 0. Use 1 for free entries only; unsupported values return 400.
sortrecommended | updated | ratingDefault recommended. updated uses UTC update time; rating uses average, then rating count, with unrated entries last. Invalid values return 400. Sort applies before pagination; MCP search_prompts accepts the same sort values.
limit1-50Default 20. Invalid integers return 400.
offsetsafe integer ≥ 0Default 0. Invalid integers return 400.
200 回應 · 縮略示意
{
  "ok": true,
  "count": 237,
  "limit": 20,
  "offset": 0,
  "next_offset": 20,
  "sort": "recommended",
  "tag": null,
  "prompts": [
    {
      "slug": "midjourney-portrait-cinematic",
      "title": "...",
      "summary": "...",
      "tool": "mj",
      "category": "image",
      "tags": ["portrait", "cinematic"],
      "difficulty": "intermediate",
      "url": "https://prompt.luvai.net/prompts/..."
    }
  ]
}
請求限制: 30/min/IP
GET/api/v1/prompts/[slug]Published prompt detail: free entries include full text; Pro entries return preview only. Draft and scheduled entries return 404.+
查詢參數
名稱可用值說明
langzh | enMetadata language (default zh)
200 回應 · 縮略示意
{
  "ok": true,
  "prompt": {
    "slug": "...",
    "title": "...",
    "is_pro": false,
    "access": "full",
    "preview": "first-line preview",
    "full_prompt": "complete prompt text",
    "context": "when to use / why",
    "variables": [{"name": "subject", "description": "..."}],
    "sample_output": "...",
    "rating": { "avg": 4.6, "count": 32 },
    "updated_at": "2026-05-13"
  }
}
請求限制: 60/min/IP
GET/api/v1/models官方參考版本、來源與核對日期;明示未核實及退役資訊。不生成、不設定供應商路由。+
查詢參數
名稱可用值說明
qstring ≤ 200參考資料字面搜尋
categoryenumimage / video / music / tutorial / audio
langenumzh / en
limit / offsetintegerlimit 1–50;offset ≥ 0;依 next_offset 續讀
200 回應 · 縮略示意
{
  "ok": true,
  "total": 1,
  "showing": 1,
  "limit": 1,
  "offset": 0,
  "next_offset": null,
  "models": [
    {
      "key": "midjourney",
      "name": "Midjourney",
      "category": "image",
      "version": "V8.2",
      "vendor": "Midjourney",
      "notes": "官方版本頁列出 V8.2 預設版本;舊提示詞的參考圖與版本參數需依文件調整。",
      "source_url": "https://docs.midjourney.com/hc/en-us/articles/32199405667853-Version",
      "checked_on": "2026-10-15",
      "verified_on": "2026-10-15",
      "verification": "documented",
      "status": "reference",
      "tool_key": "mj",
      "url": "https://prompt.luvai.net/models?q=midjourney#midjourney",
      "search_url": "https://prompt.luvai.net/search?q=Midjourney",
      "generator_url": "https://prompt.luvai.net/tools/midjourney/generator",
      "record_type": "model_reference"
    }
  ]
}
請求限制: 30/min/IP
GET/api/v1/tools公開工具定義與提示詞庫數量。不帶查詢保留完整舊清單;帶查詢可取兩語分頁。數量可重疊,不代表模型執行能力。+
查詢參數
名稱可用值說明
qstring ≤ 200工具資料字面搜尋
categoryenumimage / video / music / tutorial
langenumzh / en
limit / offsetinteger明示分頁;limit 1–50,offset ≥ 0
200 回應 · 縮略示意
{
  "ok": true,
  "tools": [
    {
      "key": "mj",
      "label": "Midjourney",
      "label_en": "Midjourney",
      "medium": "image",
      "description": "...",
      "prompt_count": 42,
      "url": "https://prompt.luvai.net/tools/mj"
    }
  ]
}
請求限制: 30/min/IP
GET/api/v1/integrationsPlatform directory with search keys and working local builder links. Media generation happens on the external platform; audio-tool requirements are shown on its page.+
200 回應 · 縮略示意
{
  "ok": true,
  "total": 19,
  "categories": { "image": 7, "video": 6, "music": 2, "audio": 1, "text": 3 },
  "with_generator": 15,
  "with_prompts": 18,
  "integrations": [{
    "key": "midjourney",
    "tool_key": "mj",
    "name": "Midjourney",
    "vendor": "Midjourney Inc",
    "category": "image",
    "has_generator": true,
    "has_prompts": true,
    "generator_kind": "prompt_builder",
    "prompts_url": "https://prompt.luvai.net/midjourney-prompts",
    "generator_url": "https://prompt.luvai.net/tools/midjourney/generator"
  }]
}
請求限制: 30/min/IP
GET/api/v1/changelogRecently updated prompts (default last 30 days). Polling-friendly.+
查詢參數
名稱可用值說明
days1-365Lookback window, default 30
limit1-100Max items returned, default 50
200 回應 · 縮略示意
{
  "ok": true,
  "days": 30,
  "count": 28,
  "prompts": [
    {
      "slug": "midjourney-portrait-cinematic",
      "title": "...",
      "tool": "mj",
      "category": "image",
      "difficulty": "intermediate",
      "updated_at": "2026-05-13",
      "url": "https://prompt.luvai.net/prompts/..."
    }
  ]
}
請求限制: 30/min/IP

限流與公開內容範圍

清單與搜尋端點每個 IP 每分鐘 30 次;提示詞及組合包單筆詳情為 60 次。各端點標示限制。HTTP 429 的 Retry-After 以秒為單位,請等待後再試,避免同時重送。

免費提示詞詳情包含 full_prompt 與 variables。PRO 回傳 is_pro: true、access: preview,省略全文與變數;公開 API 無法解鎖付費內容。

組合包只提供公開摘要,免費項目也不附全文,且排除草稿與排程提示詞。英文欄位缺少翻譯時保留原文;組合包以 translation_status 標示翻譯完整度。

錯誤處理

400
查詢值或工具代碼無效。依 error 修正參數;不要重送相同無效請求。
404
slug 不存在或未公開。請從最新清單取得有效 slug。
429
已達 IP 請求限制。等待 Retry-After 指定秒數後再試。
網路/5xx
設定請求逾時,採用有次數限制且逐步延後的重試。請求失敗不應顯示成沒有結果。

各端點的回應區塊是縮略示意。完整回應契約請參考 OpenAPI schema。

MORE