TaScan Runs API
The runs API from TaScan — 3 operation(s) for runs.
The runs API from TaScan — 3 operation(s) for runs.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/tascan-io:tascan-io-runs-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: TaScan Runs API
version: 1.1.0
description: 'TaScan: Task. Scan. Done. Verified Work for humans, AI agents and devices. Create and dispatch work, collect evidence (photos, GPS, NFC/QR/RFID scans, device readings, agent output), verify it under pinned policies, and get a signed Action Receipt anyone can check without trusting TaScan. Covers projects and task lists, workers and payments, zones, tags and assets, evidence ingestion, verifications, receipts, agent coordination (cycles, builds, fan-outs, runs), keys, budgets and delegations. MCP clients should use the native MCP server instead: https://app.tascan.io/mcp (npm: tascan-mcp), which exposes the same capabilities as tools. Protocol spec: https://app.tascan.io/docs/protocol/TASCAN-PROTOCOL-v0.1.md. Independent receipt verifier: npx tascan-verify.'
contact:
name: TaScan
url: https://tascan.io
termsOfService: https://tascan.io/terms
servers:
- url: https://app.tascan.io/api/v1
security:
- apiKey: []
tags:
- name: Runs
paths:
/runs/claim:
post:
summary: Claim Run
description: 'Claim a fan-out seat task as a LOCAL subagent run (POST /runs/claim -> claim_agent_run(p_runner=''local'')). Only admitted when instance starts with ":" -- the seat''s own coord.agent_id, set when the fan-out was created (tascan_create_fanout seats[i].runner=''local''). Any other instance is refused, claimed false with reason seat_not_yours -- this tool never claims a seat that is not yours, and never claims a cloud (research) seat at all (refused not_routable). Never mints a completion or a receipt by itself -- claiming only opens the run; work happens after, and tascan_finish_run is what leaves the signed receipt. Requires agent:dispatch:code. A foreign or unknown task_id is 404, never 403 (S2: another org''s task never even appears to exist). SR-S2: the identity is bound to the key: a key with an agent_id claims only with an instance starting ":" (403 instance_not_key_agent), so a seat is claimable only by its own agent''s key; a key without one claims only when owner-tier (the operator: the answer carries on_behalf and a claim_on_behalf ledger event, written in the same transaction as the claim, so a claim whose record cannot be written is an error with no run left claimed; any other key 403 run_requires_agent_key); a task assigned to another agent answers 404, to a supervisor 403 assigned_to_agent.'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
task_id:
type: string
description: The seat task ID (UUID) -- from tascan_create_fanout's seats[] or tascan_get_fanout (view=status/report).
instance:
type: string
description: Your claim identity, "<agent_id>:<anything>" -- e.g. "researcher-07:host-1234". Must start with the seat's own registered agent_id or the claim is refused seat_not_yours.
ttl_seconds:
type: integer
description: Optional lease length in seconds (60-86400, default 1800). Extend it later with tascan_heartbeat_run instead of claiming a longer one up front.
required:
- task_id
- instance
responses:
'200':
description: 'Success. JSON body: { data: ... } or an error object { error, message }.'
4XX:
description: Client error (validation, auth, scope, rate limit).
operationId: post_runs_claim
tags:
- Runs
x-mcp-tools:
- tascan_claim_run
/runs/{id}/finish:
post:
summary: Finish Run
description: 'Finish a claimed local run (POST /runs/:run_id/finish). outcome=''completed'' stores `document` (and optional `verification`) as the seat''s own build artifacts under EXACTLY the artifact_paths the fan-out named for this seat, hashes them into build_ref, and finishes the run -- this mints a real task_completions row and a SIGNED TASCAN RECEIPT for your work (tascan_get_receipt), the same as any other build; `document` is your deliverable and IS what gets hashed, so send the real content, not a summary. Zero changes to coord_fanout_settle / the barrier / the roll-up -- your completion releases the next held seat and, once every seat settles, feeds the fan-out''s own synthesizer and rollup exactly like a cloud research seat''s would. outcome=''failed'' finishes the run failed with your `error` text and stores nothing. Requires agent:dispatch:code. A run outside your org, or already finished, is refused (404 / the RPC''s own not_live). SR-S2: a key with an agent_id drives only a run whose instance starts ":" (another agent''s run answers 404 Run not found, like a foreign one); a key without one only when owner-tier (else 403 run_requires_agent_key).'
parameters:
- name: id
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
run_id:
type: string
description: The run ID from tascan_claim_run's response.
instance:
type: string
description: The SAME instance string you claimed with.
outcome:
type: string
enum:
- completed
- failed
description: '''completed'' stores your document and mints a signed completion; ''failed'' stores nothing.'
document:
type: string
description: Required when outcome is completed. The seat's deliverable -- hashed as build_ref, stored verbatim under the seat's own artifact_paths.
verification:
type: string
description: Optional second document (a short verification/self-check note) -- stored as the seat's second artifact_path when the fan-out named two.
error:
type: string
description: Required when outcome is failed -- why (up to 4000 chars).
cost_micro_usd:
type: integer
description: Optional micro-USD cost to record against the cycle's own budget (default 0 -- a Claude Code subscription seat has no per-call API cost to report).
required:
- run_id
- instance
- outcome
responses:
'200':
description: 'Success. JSON body: { data: ... } or an error object { error, message }.'
4XX:
description: Client error (validation, auth, scope, rate limit).
operationId: post_run_finish
tags:
- Runs
x-mcp-tools:
- tascan_finish_run
/runs/{id}/heartbeat:
post:
summary: Heartbeat Run
description: 'Extend a claimed local run''s lease and mark it running (POST /runs/:run_id/heartbeat -> heartbeat_agent_run). ok false with reason not_live means the run is no longer yours -- the sweep expired it, or it was never yours to begin with -- STOP, do not finish it. Never mints a completion or a receipt. Requires agent:dispatch:code. A run outside your org is 404, never 403. SR-S2: a key with an agent_id drives only a run whose instance starts ":" (another agent''s run answers 404 Run not found, like a foreign one); a key without one only when owner-tier (else 403 run_requires_agent_key).'
parameters:
- name: id
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
run_id:
type: string
description: The run ID from tascan_claim_run's response.
instance:
type: string
description: The SAME instance string you claimed with -- a mismatch answers not_live.
extend_seconds:
type: integer
description: 'Optional: push expires_at out to now + this many seconds (60-86400) if that is later than the current lease -- never shortens it.'
required:
- run_id
- instance
responses:
'200':
description: 'Success. JSON body: { data: ... } or an error object { error, message }.'
4XX:
description: Client error (validation, auth, scope, rate limit).
operationId: post_run_heartbeat
tags:
- Runs
x-mcp-tools:
- tascan_heartbeat_run
components:
securitySchemes:
apiKey:
type: http
scheme: bearer
description: 'API key from the TaScan admin Team page. Format: tsk_live_... Send as: Authorization: Bearer tsk_live_xxx. Rate limit 60 requests/min.'
x-generated:
by: live-event/scripts/gen-agent-docs.js
from:
- api-v1-helpers.js ROUTES
- api-v1.js handler switch
- coord-*-lib.js matchers
- receipt.js
- tascan-mcp/tools.cjs
operations: 218
mcp_tools: 141