Terminal Use Tasks API
The Tasks API from Terminal Use — 14 operation(s) for tasks.
The Tasks API from Terminal Use — 14 operation(s) for tasks.
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/terminal-use-tasks-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
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. 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: Sb0 Agent APIKeys Tasks API
version: 0.1.0
servers:
- url: https://api.terminaluse.com
description: Base URL declared by the provider in apis.yml (roadmap#122).
tags:
- name: Tasks
paths:
/tasks:
get:
description: List all tasks.
operationId: tasks_list
parameters:
- description: Optional agent filter. When provided, we authorize it via direct OpenFGA Check and avoid ListObjects(agent) to prevent false 403s from transient/partial list results.
in: query
name: agent_id
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Optional agent filter. When provided, we authorize it via direct OpenFGA Check and avoid ListObjects(agent) to prevent false 403s from transient/partial list results.
title: Agent Id
- in: query
name: namespace_id
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Namespace Id
- in: query
name: agent_name
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Agent Name
- in: query
name: branch_id
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Branch Id
- in: query
name: status
required: false
schema:
items:
$ref: '#/components/schemas/TaskStatus'
title: Status
type: array
- in: query
name: created_after
required: false
schema:
anyOf:
- format: date-time
type: string
- type: 'null'
title: Created After
- in: query
name: created_before
required: false
schema:
anyOf:
- format: date-time
type: string
- type: 'null'
title: Created Before
- in: query
name: include_total
required: false
schema:
default: false
title: Include Total
type: boolean
- in: query
name: limit
required: false
schema:
default: 50
title: Limit
type: integer
- in: query
name: page_number
required: false
schema:
default: 1
title: Page Number
type: integer
- in: query
name: order_by
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Order By
- in: query
name: order_direction
required: false
schema:
default: desc
title: Order Direction
type: string
- in: query
name: relationships
required: false
schema:
items:
$ref: '#/components/schemas/TaskRelationships'
title: Relationships
type: array
responses:
'200':
content:
application/json:
schema:
items:
$ref: '#/components/schemas/TaskResponse'
title: Response Tasks List
type: array
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: List Tasks
tags:
- Tasks
post:
description: Create a new task for an agent.
operationId: tasks_create
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateTaskRequest'
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/TaskResponse'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: Create Task
tags:
- Tasks
/tasks/migrate:
post:
description: 'Migrate tasks between versions within the same branch. Supports two modes: bulk migration by source version (from_version_id), or migration of specific tasks (task_ids). Target can be explicit (to_version_id) or latest active version (to_latest).'
operationId: tasks_migrate
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MigrateTasksRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/MigrateTasksResponse'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: Migrate Tasks Between Versions
tags:
- Tasks
/tasks/name/{task_name}:
delete:
description: Delete a task by its unique name.
operationId: tasks_delete_by_name
parameters:
- in: path
name: task_name
required: true
schema:
title: Task Name
type: string
- description: Optional agent filter. When provided, we authorize it via direct OpenFGA Check and avoid ListObjects(agent) to prevent false 403s from transient/partial list results.
in: query
name: agent_id
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Optional agent filter. When provided, we authorize it via direct OpenFGA Check and avoid ListObjects(agent) to prevent false 403s from transient/partial list results.
title: Agent Id
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteResponse'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: Delete Task by Name
tags:
- Tasks
get:
description: Get a task by its unique name.
operationId: tasks_retrieve_by_name
parameters:
- in: path
name: task_name
required: true
schema:
title: Task Name
type: string
- in: query
name: relationships
required: false
schema:
items:
$ref: '#/components/schemas/TaskRelationships'
title: Relationships
type: array
- description: Optional agent filter. When provided, we authorize it via direct OpenFGA Check and avoid ListObjects(agent) to prevent false 403s from transient/partial list results.
in: query
name: agent_id
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Optional agent filter. When provided, we authorize it via direct OpenFGA Check and avoid ListObjects(agent) to prevent false 403s from transient/partial list results.
title: Agent Id
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/TaskResponse'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: Get Task by Name
tags:
- Tasks
put:
description: Update mutable fields for a task by its unique Name.
operationId: tasks_update_by_name
parameters:
- in: path
name: task_name
required: true
schema:
title: Task Name
type: string
- description: Optional agent filter. When provided, we authorize it via direct OpenFGA Check and avoid ListObjects(agent) to prevent false 403s from transient/partial list results.
in: query
name: agent_id
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Optional agent filter. When provided, we authorize it via direct OpenFGA Check and avoid ListObjects(agent) to prevent false 403s from transient/partial list results.
title: Agent Id
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateTaskRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Task'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: Update Task by Name
tags:
- Tasks
/tasks/name/{task_name}/stream:
get:
description: "Stream events for a task by its unique name using Server-Sent Events (SSE).\n\n Supports automatic reconnection with Last-Event-ID header. When the client\n reconnects, it sends the Last-Event-ID header with the last received event ID,\n and the server resumes from that point.\n\n Returns TextStreamPart events (Vercel AI SDK compatible format)."
operationId: tasks_stream_by_name
parameters:
- in: path
name: task_name
required: true
schema:
title: Task Name
type: string
- description: Optional agent filter. When provided, we authorize it via direct OpenFGA Check and avoid ListObjects(agent) to prevent false 403s from transient/partial list results.
in: query
name: agent_id
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Optional agent filter. When provided, we authorize it via direct OpenFGA Check and avoid ListObjects(agent) to prevent false 403s from transient/partial list results.
title: Agent Id
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/TextStreamPartWrapper'
description: SSE stream of TextStreamPart events
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: Stream Task Events by Name
tags:
- Tasks
x-fern-streaming:
format: sse
/tasks/{task_id}:
delete:
description: Delete a task by its unique ID.
operationId: tasks_delete
parameters:
- in: path
name: task_id
required: true
schema:
title: Task Id
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteResponse'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: Delete Task by ID
tags:
- Tasks
get:
description: Get a task by its unique ID.
operationId: tasks_retrieve
parameters:
- in: path
name: task_id
required: true
schema:
title: Task Id
type: string
- in: query
name: relationships
required: false
schema:
items:
$ref: '#/components/schemas/TaskRelationships'
title: Relationships
type: array
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/TaskResponse'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: Get Task by ID
tags:
- Tasks
put:
description: Update mutable fields for a task by its unique ID.
operationId: tasks_update
parameters:
- in: path
name: task_id
required: true
schema:
title: Task Id
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateTaskRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Task'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: Update Task by ID
tags:
- Tasks
/tasks/{task_id}/cancel:
post:
description: Cancel a running task.
operationId: tasks_cancel
parameters:
- in: path
name: task_id
required: true
schema:
title: Task Id
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/TaskResponse'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: Cancel Task
tags:
- Tasks
/tasks/{task_id}/events:
post:
description: Send an event to a running task.
operationId: tasks_send_event
parameters:
- in: path
name: task_id
required: true
schema:
title: Task Id
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateTaskEventRequest'
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/Event'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: Send Event to Task
tags:
- Tasks
x-fern-retries:
disabled: true
/tasks/{task_id}/handler-end:
post:
description: Signal that an ACP handler has finished processing an event.
operationId: tasks_handler_end
parameters:
- in: path
name: task_id
required: true
schema:
title: Task Id
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/HandlerEndRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/HandlerEndResponse'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: Handler End
tags:
- Tasks
/tasks/{task_id}/stream:
get:
description: "Stream events for a task by its unique ID using Server-Sent Events (SSE).\n\n Supports automatic reconnection with Last-Event-ID header. When the client\n reconnects, it sends the Last-Event-ID header with the last received event ID,\n and the server resumes from that point.\n\n Returns TextStreamPart events (Vercel AI SDK compatible format)."
operationId: tasks_stream
parameters:
- in: path
name: task_id
required: true
schema:
title: Task Id
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/TextStreamPartWrapper'
description: SSE stream of TextStreamPart events
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: Stream Task Events by ID
tags:
- Tasks
x-fern-streaming:
format: sse
/tasks/{task_id}/system-folder-types:
get:
description: Get all registered system folder types with their configurations for a task.
operationId: tasks_list_system_folder_types
parameters:
- in: path
name: task_id
required: true
schema:
title: Task Id
type: string
responses:
'200':
content:
application/json:
schema:
items:
$ref: '#/components/schemas/SystemFolderTypeResponse'
title: Response Tasks List System Folder Types
type: array
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: List System Folder Types
tags:
- Tasks
/tasks/{task_id}/system-folders/{folder_type}:
get:
description: Get a task's system folder record by type.
operationId: tasks_get_system_folder
parameters:
- in: path
name: folder_type
required: true
schema:
$ref: '#/components/schemas/SystemFolderType'
- in: path
name: task_id
required: true
schema:
title: Task Id
type: string
responses:
'200':
content:
application/json:
schema:
anyOf:
- $ref: '#/components/schemas/SystemFolderResponse'
- type: 'null'
title: Response Tasks Get System Folder
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: Get System Folder
tags:
- Tasks
/tasks/{task_id}/system-folders/{folder_type}/download-url:
post:
description: Get a presigned URL for direct download of a system folder archive from GCS.
operationId: tasks_get_system_folder_download_url
parameters:
- in: path
name: folder_type
required: true
schema:
$ref: '#/components/schemas/SystemFolderType'
- in: path
name: task_id
required: true
schema:
title: Task Id
type: string
requestBody:
content:
application/json:
schema:
anyOf:
- $ref: '#/components/schemas/PresignedUrlRequest'
- type: 'null'
title: Request
responses:
'200':
content:
application/json:
schema:
anyOf:
- $ref: '#/components/schemas/PresignedUrlResponse'
- type: 'null'
title: Response Tasks Get System Folder Download Url
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: Get System Folder Download URL
tags:
- Tasks
/tasks/{task_id}/system-folders/{folder_type}/sync-complete:
post:
description: Complete a system folder sync operation and update metadata.
operationId: tasks_system_folder_sync_complete
parameters:
- in: path
name: folder_type
required: true
schema:
$ref: '#/components/schemas/SystemFolderType'
- in: path
name: task_id
required: true
schema:
title: Task Id
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SystemFolderSyncCompleteRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/SystemFolderSyncCompleteResponse'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: Complete System Folder Sync
tags:
- Tasks
/tasks/{task_id}/system-folders/{folder_type}/upload-url:
post:
description: Get a presigned URL for direct upload of a system folder archive to GCS.
operationId: tasks_get_system_folder_upload_url
parameters:
- in: path
name: folder_type
required: true
schema:
$ref: '#/components/schemas/SystemFolderType'
- in: path
name: task_id
required: true
schema:
title: Task Id
type: string
requestBody:
content:
application/json:
schema:
anyOf:
- $ref: '#/components/schemas/PresignedUrlRequest'
- type: 'null'
title: Request
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PresignedUrlResponse'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: Get System Folder Upload URL
tags:
- Tasks
components:
schemas:
UpdateTaskRequest:
properties:
task_metadata:
additionalProperties: true
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: If provided, replaces task_metadata with this value
title: UpdateTaskRequest
type: object
PresignedUrlRequest:
description: Request model for presigned URL generation.
properties:
expiration_seconds:
default: 3600
description: URL expiration time in seconds (default 1 hour, max 7 days).
maximum: 604800
minimum: 60
title: Expiration Seconds
type: integer
title: PresignedUrlRequest
type: object
TextDeltaPart:
description: Incremental text content.
properties:
id:
description: ID of the text block this belongs to
title: Id
type: string
metadata:
anyOf:
- $ref: '#/components/schemas/StreamMetadata'
- type: 'null'
description: Metadata including parentToolUseId for subagents
text:
description: Text delta content
title: Text
type: string
type:
const: text-delta
default: text-delta
title: Type
type: string
required:
- id
- text
title: TextDeltaPart
type: object
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
title: Location
type: array
msg:
title: Message
type: string
type:
title: Error Type
type: string
required:
- loc
- msg
- type
title: ValidationError
type: object
StreamMetadata:
description: Extended metadata for finish events.
properties:
cacheCreationInputTokens:
anyOf:
- type: integer
- type: 'null'
description: Cache creation input tokens
title: Cachecreationinputtokens
cacheReadInputTokens:
anyOf:
- type: integer
- type: 'null'
description: Cache read input tokens
title: Cachereadinputtokens
costUsd:
anyOf:
- type: number
- type: 'null'
description: Total cost in USD
title: Costusd
durationMs:
anyOf:
- type: integer
- type: 'null'
description: Total duration in milliseconds
title: Durationms
parentToolUseId:
anyOf:
- type: string
- type: 'null'
description: Parent tool use ID for subagent context
title: Parenttooluseid
title: StreamMetadata
type: object
VersionStatus:
description: Status of a version in its lifecycle.
enum:
- DEPLOYING
- ACTIVE
- FAILED
- UNHEALTHY
- DRAINING
- RETIRED
- ROLLED_BACK
title: VersionStatus
type: string
TaskResponse:
description: Task response model with optional related data based on relationships
properties:
agents:
anyOf:
- items:
$ref: '#/components/schemas/Agent'
type: array
- type: 'null'
title: Agents associated with this task (only populated when 'agent' view is requested)
created_at:
anyOf:
- format: date-time
type: string
- type: 'null'
title: The timestamp when the task was created
created_version_id:
anyOf:
- type: string
- type: 'null'
title: Version ID when task was created (immutable, for audit)
current_version_id:
anyOf:
- type: string
- type: 'null'
title: Current version for routing (can change on migration)
filesystem_id:
title: Filesystem ID for persistent filesystem storage
type: string
id:
title: Unique Task ID
type: string
name:
anyOf:
- type: string
- type: 'null'
title: Unique name of the task
namespace_id:
title: Namespace ID (denormalized from agent for GCS path construction)
type: string
params:
additionalProperties: true
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Task parameters
status:
anyOf:
- $ref: '#/components/schemas/TaskStatus'
- type: 'null'
title: The current status of the task
status_reason:
anyOf:
- type: string
- type: 'null'
title: The reason for the current task status
task_metadata:
additionalProperties: true
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Task metadata
updated_at:
anyOf:
- format: date-time
type: string
- type: 'null'
title: The timestamp when the task was last updated
required:
- id
- filesystem_id
- namespace_id
title: TaskResponse
type: object
StartPart:
description: Marks the start of a streaming session.
properties:
type:
const: start
default: start
title: Type
type: string
title: StartPart
type: object
TextStreamPartWrapper:
description: Wrapper for TextStreamPart union for proper serialization.
discriminator:
mapping:
error: '#/components/schemas/StreamErrorPart'
finish: '#/components/schemas/FinishPart'
finish-step: '#/components/schemas/FinishStepPart'
handler-complete: '#/components/schemas/HandlerCompletePart'
reasoning-delta: '#/components/schemas/ReasoningDeltaPart'
reasoning-end: '#/components/schemas/ReasoningEndPart'
reasoning-start: '#/components/schemas/ReasoningStartPart'
start: '#/components/schemas/StartPart'
start-step: '#/components/schemas/StartStepPart'
text-delta: '#/components/schemas/TextDeltaPart'
text-end: '#/components/schemas/TextEndPart'
text-start: '#/components/schemas/TextStartPart'
tool-call: '#/components/schemas/ToolCallPart'
tool-input-delta: '#/components/schemas/ToolInputDeltaPart'
tool-input-end: '#/components/schemas/ToolInputEndPart'
tool-input-start: '#/components/schemas/ToolInputStartPart'
tool-result: '#/components/schemas/ToolResultPart'
propertyName: type
oneOf:
- $ref: '#/components/schemas/StartPart'
- $ref: '#/components/schemas/StartStepPart'
- $ref: '#/components/schemas/FinishStepPart'
- $ref: '#/components/schemas/FinishPart'
- $ref: '#/components/schemas/HandlerCompletePart'
- $ref: '#/components/schemas/TextStartPart'
- $ref: '#/components/schemas/TextDeltaPart'
- $ref: '#/components/schemas/TextEndPart'
- $ref: '#/components/schemas/ReasoningStartPart'
- $ref: '#/components/schemas/ReasoningDeltaPart'
- $ref: '#/components/schemas/ReasoningEndPart'
- $ref: '#/components/schemas/ToolInputStartPart'
- $ref: '#/components/schemas/ToolInputDeltaPart'
- $ref: '#/components/schemas/ToolInputEndPart'
- $ref: '#/components/schemas/ToolCallPart'
- $ref: '#/components/schemas/ToolResultPart'
- $ref: '#/components/schemas/StreamErrorPart'
title: TextStreamPartWrapper
StreamUsage:
description: Token usage for streaming events.
properties:
inputTokens:
description: Input tokens used
title: Inputtokens
type: integer
outputTokens:
description: Output tokens used
title: Outputtokens
type: integer
totalTokens:
anyOf:
- type: integer
- type: 'null'
description: Total tokens
title: Totaltokens
required:
- inputTokens
- outputTokens
title: StreamUsage
type: object
SystemFolderSyncCompleteResponse:
description: Response model for system folder sync-complete operation.
properties:
folder_type:
description: The system folder type.
title: Folder Type
type: string
status:
description: 'Result status: ''COMPLETED''.'
title: Status
type: string
sync_id:
description: The sync operation ID (for idempotency).
title: Sync Id
type: string
task_id:
description: The task ID.
title: Task Id
type: string
required:
- task_id
- folder_type
- sync_id
- status
title: SystemFolderSyncCompleteResponse
type: object
MigrateTasksResponse:
description: Response model for task migration operation.
properties:
branch_id:
description: Branch both versions belong to
title: Branch Id
type: string
from_version_id:
anyOf:
- type: string
- type: 'null'
description: Source version (if bulk mode)
title: From Version Id
tasks:
description: Migrated tasks
items:
$ref: '#/components/schemas/TaskResponse'
title: Tasks
type: array
to_version:
$ref: '#/component
# --- truncated at 32 KB (63 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/terminal-use/refs/heads/main/openapi/terminal-use-tasks-api-openapi.yml