answers

USE FOR AI-grounded answers via OpenAI-compatible /chat/completions. Two modes: single-search (fast) or deep research (enable_research=true, thorough multi-search). Streaming/blocking. Citations.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "answers" with this command: npx skills add sprintmint/cpbox-answers

Answers — AI Grounding

Paid Answers proxy via x402 pay-per-use (HTTP 402).

Prerequisites: This skill requires x402-payment. Complete the setup steps before first use.

Service URLs

RoleDomain
API Providerhttps://www.cpbox.io
Facilitatorhttps://www.cppay.finance

Endpoint (Agent Interface)

POST /api/x402/answers

Payment Flow (x402 Protocol)

  1. First request (no PAYMENT-SIGNATURE) -> 402 Payment Required with requirements JSON
  2. Client signs (EIP-712) -> PAYMENT-SIGNATURE
  3. Retry with PAYMENT-SIGNATURE -> Server settles and returns response

With @springmint/x402-payment or x402-sdk-go, payment is automatic.

When to Use

Use CaseSkillWhy
Quick factual answer (raw context)llm-contextSingle search, returns raw context for YOUR LLM
Fast AI answer with citationsanswers (single-search)streaming, citations
Thorough multi-search deep researchanswers (research mode)Iterative deep research, synthesized cited answer

This endpoint (/res/v1/chat/completions) supports two modes:

  • Single-search (default): Fast AI-grounded answer from a single search. Supports enable_citations.
  • Research (enable_research=true): Multi-iteration deep research with progress events and synthesized cited answer.

Quick Start (cURL)

Blocking (Single-Search)

curl -X POST "https://www.cpbox.io/api/x402/answers" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [{"role": "user", "content": "How does the James Webb Space Telescope work?"}],
    "model": "default",
    "stream": false
  }'

Streaming with Citations (Single-Search)

curl -X POST "https://www.cpbox.io/api/x402/answers" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [{"role": "user", "content": "What are recent breakthroughs in fusion energy?"}],
    "model": "default",
    "stream": true,
    "enable_citations": true
  }'

Research Mode

curl -X POST "https://www.cpbox.io/api/x402/answers" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [{"role": "user", "content": "Compare quantum computing approaches"}],
    "model": "default",
    "stream": true,
    "enable_research": true,
    "research_maximum_number_of_iterations": 3,
    "research_maximum_number_of_seconds": 120
  }'

Using with x402-payment

CLI (AI Agent)

npx @springmint/x402-payment \
  --url https://www.cpbox.io/api/x402/answers \
  --method POST \
  --input '{"messages":[{"role":"user","content":"How does the James Webb Space Telescope work?"}],"model":"default","stream":false}'

Payload/Response

OpenAI-compatible chat.completions JSON + SSE streaming (pass-through).

Two Modes

FeatureSingle-Search (default)Research (enable_research=true)
SpeedFastSlow
Searches1Multiple (iterative)
StreamingOptional (stream=true/false)Required (stream=true)
Citationsenable_citations=true (streaming only)Built-in (in <answer> tag)
Progress eventsNoYes (<progress> tags)
Blocking responseYes (stream=false)No

Parameters

Standard Parameters

ParameterTypeRequiredDefaultDescription
messagesarrayYes-Single user message (exactly 1 message)
modelstringYes-Use "default"
streamboolNotrueEnable SSE streaming
countrystringNo"US"Search country (2-letter country code or ALL)
languagestringNo"en"Response language
safesearchstringNo"moderate"Search safety level (off, moderate, strict)
max_completion_tokensintNonullUpper bound on completion tokens
enable_citationsboolNofalseInclude inline citation tags (single-search streaming only)
web_search_optionsobjectNonullOpenAI-compatible; search_context_size: low, medium, high

Research Parameters

ParameterTypeRequiredDefaultDescription
enable_researchboolNofalseEnable research mode
research_allow_thinkingboolNotrueEnable extended thinking
research_maximum_number_of_tokens_per_queryintNo8192Max tokens per query (1024-16384)
research_maximum_number_of_queriesintNo20Max total search queries (1-50)
research_maximum_number_of_iterationsintNo4Max research iterations (1-5)
research_maximum_number_of_secondsintNo180Time budget in seconds (1-300)
research_maximum_number_of_results_per_queryintNo60Results per search query (1-60)

Constraints (IMPORTANT)

ConstraintError
enable_research=true requires stream=true"Blocking response doesn't support 'enable_research' option"
enable_research=true incompatible with enable_citations=true"Research mode doesn't support 'enable_citations' option"
enable_citations=true requires stream=true"Blocking response doesn't support 'enable_citations' option"

Notes for Agent Usage

  • Use x402-payment to handle the payment handshake automatically, especially for streaming (stream=true).

Response Format

Blocking Response (stream=false, single-search only)

Standard OpenAI-compatible JSON:

{
  "id": "chatcmpl-...",
  "object": "chat.completion",
  "choices": [{"message": {"role": "assistant", "content": "The James Webb Space Telescope works by..."}, "index": 0, "finish_reason": "stop"}],
  "usage": {"prompt_tokens": 10, "completion_tokens": 50, "total_tokens": 60}
}

Streaming Response

SSE response with OpenAI-compatible chunks:

data: {"id":"chatcmpl-...","object":"chat.completion.chunk","choices":[{"delta":{"content":"Based on"},"index":0}]}

data: {"id":"chatcmpl-...","object":"chat.completion.chunk","choices":[{"delta":{"content":" recent research"},"index":0}]}

data: [DONE]

Streaming Tags by Mode

Single-Search (with enable_citations=true)

TagPurpose
<citation>Inline citation references
<usage>JSON cost/billing data

Research Mode

TagPurposeKeep?
<queries>Generated search queriesDebug
<analyzing>URL counts (verbose)Debug
<thinking>URL selection reasoningDebug
<progress>Stats: time, iterations, queries, URLs analyzed, tokensMonitor
<blindspots>Knowledge gaps identifiedYes
<answer>Final synthesized answer (only the final answer is emitted; intermediate drafts are dropped)Yes
<usage>JSON cost/billing data (included at end of streaming response)Yes

Usage Tag Format

The <usage> tag contains JSON-stringified cost and token data:

<usage>{"X-Request-Requests":1,"X-Request-Queries":8,"X-Request-Tokens-In":15000,"X-Request-Tokens-Out":2000,"X-Request-Requests-Cost":0.005,"X-Request-Queries-Cost":0.032,"X-Request-Tokens-In-Cost":0.075,"X-Request-Tokens-Out-Cost":0.01,"X-Request-Total-Cost":0.122}</usage>

Use Cases

  • Chat interface integration: Use this endpoint to get a web-grounded answer payload in OpenAI-compatible format.
  • Deep research / comprehensive topic research: Use research mode (enable_research=true) for complex questions needing multi-source synthesis (e.g., "Compare approaches to nuclear fusion").
  • OpenAI SDK drop-in: Same SDK, same streaming format — just change base_url and api_key. Works with both sync and async clients.
  • Cited answers: Enable enable_citations=true in single-search mode for inline citation tags, or use research mode which automatically includes citations in its answer.

Notes

  • Timeout: Set client timeout to at least 30s for single-search, 300s (5 min) for research
  • Single message: The messages array must contain exactly 1 user message
  • Cost monitoring: Parse the <usage> tag from streaming responses to track costs

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Research

Deep Research (Surf)

Conducts deep, multi-angle research using Surf MCP tools and parallel subagents. Use for deep research, competitive landscape analysis, strategic intelligenc...

Registry SourceRecently Updated
Research

Commonpaper

Common Paper integration. Manage data, records, and automate workflows. Use when the user wants to interact with Common Paper data.

Registry SourceRecently Updated
1110Profile unavailable
Research

Stock Entry Analyzer

多指标股票入场分析工具。基于乖离率 (BIAS) 为核心,结合均线/MACD/RSI/成交量/资金流/估值等 7 大类指标,综合判断股票或基金是否适合买入。使用 stock-price-query、stock-market-pro、eastmoney-tools 获取数据,输出检查清单和综合评分。当用户询问"XX...

Registry SourceRecently Updated
1610Profile unavailable
Research

Agent Travel

Research unresolved agent problems during heartbeat, scheduled, task-end, failure-recovery, or idle windows; search official docs plus community sources; and...

Registry SourceRecently Updated
1900Profile unavailable