For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
GuidesAPI Reference
GuidesAPI Reference
  • Overview
    • API reference
  • Search
    • POSTSearch
    • GETSearch Run List
    • GETSearch Run Get
    • GETSearch Run Events
    • POSTSearch Run Cancel
  • Extract
    • GETExtract a URL
    • POSTExtract
  • Monitors
    • GETList monitors
    • POSTCreate monitor
    • GETRetrieve monitor
    • DELDelete monitor
    • PATCHUpdate monitor
    • GETList monitor events
    • POSTMonitor Pause
    • POSTMonitor Resume
    • POSTRun monitor
  • Tasks
    • POSTTask
    • POSTCreate task run
    • GETRetrieve task run
    • GETStream task run events
    • GETTask List
    • GETTask Get
    • GETTask Events
    • POSTTask Cancel
  • Chat
    • POSTChat completion
  • Find All
    • POSTFindAll
    • GETFindall Run List
    • POSTCreate FindAll run
    • GETRetrieve FindAll run
    • GETStream FindAll run events
    • POSTCancel FindAll run
    • POSTExtend FindAll run
    • POSTEnrich FindAll run
LogoLogo
Tasks

Task Cancel

||View as Markdown|
POST
https://core.usescout.sh/v1/tasks/:task_id/cancel
POST
/v1/tasks/:task_id/cancel
$curl -X POST https://core.usescout.sh/v1/tasks/task_id/cancel \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{}'
1{
2 "task_id": "a1b2c3d4-e5f6-7890-ab12-cd34ef567890",
3 "run_id": "a1b2c3d4-e5f6-7890-ab12-cd34ef567890",
4 "status": "cancelled",
5 "task": "Extract latest market trends for renewable energy",
6 "query": "Extract latest market trends for renewable energy",
7 "credits": 5,
8 "processor": "core",
9 "metadata": {},
10 "fields": [
11 "market_trends",
12 "energy_sector"
13 ],
14 "output_schema": {},
15 "output": null,
16 "basis": [
17 {
18 "field": "market_trends",
19 "citations": [
20 {
21 "url": "https://www.energynews.com/renewable-trends-2024",
22 "title": "",
23 "excerpts": [
24 "Renewable energy market is expected to grow by 15% in 2024."
25 ]
26 }
27 ],
28 "reasoning": "The cited article provides recent statistics supporting the market growth.",
29 "confidence": "medium"
30 }
31 ],
32 "usage": {
33 "tool_calls": 3,
34 "search_queries": 5,
35 "pages_fetched": 12,
36 "tokens": {
37 "input": 450,
38 "output": 1200
39 },
40 "planner_calls": 2,
41 "grader_calls": 1,
42 "synth_calls": 1,
43 "scratchpad_mode": "active",
44 "scratchpad_chunks_indexed": 8,
45 "scratchpad_chunks_used": 6,
46 "scratchpad_searches": 4,
47 "scratchpad_tool_turns": 3
48 },
49 "answer": "The renewable energy market is projected to grow significantly in 2024, driven by increased investments and policy support.",
50 "sources": [
51 "https://www.energynews.com/renewable-trends-2024",
52 "https://www.greenfuture.org/market-analysis"
53 ],
54 "read": [
55 "https://www.energynews.com/renewable-trends-2024"
56 ],
57 "considered": [
58 "https://www.greenfuture.org/market-analysis",
59 "https://www.economicsdaily.com/energy-sector"
60 ],
61 "error": null,
62 "createdAt": "2024-06-10T09:15:00Z",
63 "completedAt": "2024-06-10T09:17:30Z",
64 "report": null,
65 "findings": [
66 {
67 "subquery": "market growth rate",
68 "answer": "15% growth expected in 2024",
69 "citations": [
70 {
71 "url": "https://www.energynews.com/renewable-trends-2024",
72 "title": "Renewable Energy Market Trends 2024",
73 "excerpts": [
74 "Market growth rate projected at 15% for 2024."
75 ]
76 }
77 ],
78 "confidence": 0.85,
79 "evidence": "Recent market reports and expert analysis."
80 }
81 ],
82 "sources_detailed": [
83 {
84 "index": 1,
85 "url": "https://www.energynews.com/renewable-trends-2024",
86 "title": "Renewable Energy Market Trends 2024",
87 "domain": "energynews.com",
88 "fetched": "2024-06-10T09:16:00Z",
89 "quality": "high",
90 "first_seen_subquery": "market growth rate"
91 }
92 ]
93}

Cancel an in-flight task; a no-op if it has already finished.

Was this page helpful?
Previous

Task Events

Next

Chat completion

Built with

Authentication

AuthorizationBearer
Your API key, sent as a Bearer token.

Path parameters

task_idstringRequired

Response

Successful Response
task_idstring

Opaque task identifier (alias of run_id).

run_idstring

Opaque run identifier (alias of task_id).

statusstring
queued, running, completed, failed or cancelled.
taskstring
The objective.
querystring

The objective verbatim (alias of task).

creditsinteger
Cost accumulated by the run.
processorstringDefaults to core

Processor tier used: base | core | ultra.

metadatamap from strings to strings or null

Free-form user metadata, echoed back.

fieldslist of strings

Output field names, derived from output_schema.

output_schemamap from strings to any or null
The requested output spec, if any.
outputany

The answer once completed. For type=json, the parsed JSON object. For text/auto, the string. Null until completed.

basislist of objects

Per-field citation basis (empty until completed).

usageobject or null

Usage stats: tool_calls, search_queries, pages_fetched, tokens.

answerstringDefaults to

The agent’s answer text (empty until completed).

sourceslist of strings

Sample of source URLs the agent read (empty until done).

readlist of strings

Source URLs read in full (empty until completed).

consideredlist of strings

Source URLs considered (empty until completed).

errorstring or null
Failure reason when status is failed.
createdAtstring or null

ISO-8601 creation timestamp.

completedAtstring or null

ISO-8601 completion timestamp.

reportstring or null

Long-form markdown research report with inline [N] citations. Only present for research-tier runs.

findingslist of maps from strings to any or null

Per-sub_query findings ({subquery, answer, citations, confidence, evidence}). Research-tier only.

sources_detailedlist of maps from strings to any or null

Numbered sources list ({index, url, title, domain, fetched, quality, first_seen_subquery}). Research-tier only.

Errors

422
Unprocessable Entity Error