Skip to content
Get started

Continue a worker

$ handinger workers continue
POST/api/workers/{workerId}

Send another instruction to an existing worker.

ParametersExpand Collapse
--worker-id: string

Worker id returned by the create worker endpoint.

--input: string
--budget: optional "low" or "standard" or "high" or "unlimited"
--stream: optional boolean
ReturnsExpand Collapse
worker: object { id, created_at, error, 12 more }
id: string
created_at: number
error: unknown
files: array of object { filename, mediaType, url }
filename: string
mediaType: string
url: string
incomplete_details: unknown
messages: array of unknown
metadata: map[unknown]
object: "worker"
"worker"
output: array of object { id, content, role, 2 more }
id: string
content: array of object { text, type }
text: string
type: "output_text"
"output_text"
role: "assistant"
"assistant"
status: "completed"
"completed"
type: "message"
"message"
output_text: string
running: boolean
sources: array of object { id, title, type, url }
id: string
title: string
type: "url"
"url"
url: string
status: "running" or "completed" or "pending"
"running"
"completed"
"pending"
costs: optional object { internalCostUsd, modelCostUsd, sandboxCostUsd, toolCostUsd }
internalCostUsd: number
modelCostUsd: number
sandboxCostUsd: number
toolCostUsd: number
usage: optional object { cacheReadTokens, cacheWriteTokens, costUsd, 6 more }
cacheReadTokens: number
cacheWriteTokens: number
costUsd: number
inputTokens: number
outputTokens: number
reasoningTokens: number
steps: number
totalTokens: number
credits: optional number

Continue a worker

handinger workers continue \
  --api-key 'My API Key' \
  --worker-id t_org_123_w_01HZY2ZJQ8G7K42W2D7WF6V4GM \
  --input x
{
  "id": "id",
  "created_at": 0,
  "error": null,
  "files": [
    {
      "filename": "filename",
      "mediaType": "mediaType",
      "url": "url"
    }
  ],
  "incomplete_details": null,
  "messages": [
    {}
  ],
  "metadata": {
    "foo": "bar"
  },
  "object": "worker",
  "output": [
    {
      "id": "id",
      "content": [
        {
          "text": "text",
          "type": "output_text"
        }
      ],
      "role": "assistant",
      "status": "completed",
      "type": "message"
    }
  ],
  "output_text": "output_text",
  "running": true,
  "sources": [
    {
      "id": "id",
      "title": "title",
      "type": "url",
      "url": "url"
    }
  ],
  "status": "running",
  "costs": {
    "internalCostUsd": 0,
    "modelCostUsd": 0,
    "sandboxCostUsd": 0,
    "toolCostUsd": 0
  },
  "usage": {
    "cacheReadTokens": 0,
    "cacheWriteTokens": 0,
    "costUsd": 0,
    "inputTokens": 0,
    "outputTokens": 0,
    "reasoningTokens": 0,
    "steps": 0,
    "totalTokens": 0,
    "credits": 0
  }
}
Returns Examples
{
  "id": "id",
  "created_at": 0,
  "error": null,
  "files": [
    {
      "filename": "filename",
      "mediaType": "mediaType",
      "url": "url"
    }
  ],
  "incomplete_details": null,
  "messages": [
    {}
  ],
  "metadata": {
    "foo": "bar"
  },
  "object": "worker",
  "output": [
    {
      "id": "id",
      "content": [
        {
          "text": "text",
          "type": "output_text"
        }
      ],
      "role": "assistant",
      "status": "completed",
      "type": "message"
    }
  ],
  "output_text": "output_text",
  "running": true,
  "sources": [
    {
      "id": "id",
      "title": "title",
      "type": "url",
      "url": "url"
    }
  ],
  "status": "running",
  "costs": {
    "internalCostUsd": 0,
    "modelCostUsd": 0,
    "sandboxCostUsd": 0,
    "toolCostUsd": 0
  },
  "usage": {
    "cacheReadTokens": 0,
    "cacheWriteTokens": 0,
    "costUsd": 0,
    "inputTokens": 0,
    "outputTokens": 0,
    "reasoningTokens": 0,
    "steps": 0,
    "totalTokens": 0,
    "credits": 0
  }
}