技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
deep-research【数据与研究】Run deep research through DeepAPI and save a report with sources. Use when asked for deep research, DeepAPI research, or Perplexity deep research.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use DeepAPI (POST /v1/research/deep) for all deep research.
Read API_KEY from the environment. Never source shell startup files.
KEY=${API_KEY:?Set API_KEY in your environment}
BASE=${DEEPAPI_API_BASE_URL:-https://deepapi.co}
If the key is missing, stop and ask the user. Never print or log it. Get a key at deepapi.co.
Follow the research-prompt skill. Write one self-contained paragraph:
Field limits: query ≤ 4000 characters (the prompt), optional context ≤ 8000, optional instructions ≤ 2000. Do not send model or provider; the API rejects them.
One call returns a cited answer, targeting 700-1,120 words. The server allows up to ~5 minutes.
IDK=$(uuidgen) # keep this; retries must reuse the SAME Idempotency-Key
jq -n --rawfile p /tmp/dr_prompt.txt '{query:$p, maxCostUsd:"0.70"}' > /tmp/dr_body.json
curl -s --max-time 320 "$BASE/v1/research/deep" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $IDK" \
-d @/tmp/dr_body.json > /tmp/dr_result.json
Minimum maxCostUsd is "0.35". Default to "0.70"; ask the user before raising it.
jq -r '.status' /tmp/dr_result.json # succeeded | failed
jq -r '.output.answer' /tmp/dr_result.json # the report
jq -r '.output.sources[]?.url' /tmp/dr_result.json # source URLs
Save a Markdown report with citation URLs beneath it. Only report costs if the user asks. If the answer has [n] citations but output.sources is empty, deliver it and tell the user.
For longer reports, run each numbered sub-question separately with its own Idempotency-Key, then combine the answers and sources into one Markdown file.
insufficient_credits: stop and ask the user how to proceed.rate_limit_exceeded: wait Retry-After seconds, then retry once.status: failed / HTTP 502: report requestId and error.message. Do not retry in a loop.replayed: true and no new charge.deepapi skill for envelope/auth details and other endpoints.