Skip to content
Get started

Continue a worker

POST/api/workers/{workerId}

Send another instruction to an existing worker.

Path ParametersExpand Collapse
workerId: string
Body ParametersJSONExpand Collapse
input: string
minLength1
budget: optional "low" or "standard" or "high" or "unlimited"
One of the following:
"low"
"standard"
"high"
"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"
output: array of object { id, content, role, 2 more }
id: string
content: array of object { text, type }
text: string
type: "output_text"
role: "assistant"
status: "completed"
type: "message"
output_text: string
running: boolean
sources: array of object { id, title, type, url }
id: string
title: string
type: "url"
url: string
status: "running" or "completed" or "pending"
One of the following:
"running"
"completed"
"pending"
costs: optional object { internalCostUsd, modelCostUsd, sandboxCostUsd, toolCostUsd }
internalCostUsd: number
minimum0
modelCostUsd: number
minimum0
sandboxCostUsd: number
minimum0
toolCostUsd: number
minimum0
usage: optional object { cacheReadTokens, cacheWriteTokens, costUsd, 6 more }
cacheReadTokens: number
minimum0
cacheWriteTokens: number
minimum0
costUsd: number
minimum0
inputTokens: number
minimum0
outputTokens: number
minimum0
reasoningTokens: number
minimum0
steps: number
minimum0
totalTokens: number
minimum0
credits: optional number
minimum0

Continue a worker

curl https://v3.handinger.com/api/workers/$WORKER_ID \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $HANDINGER_API_KEY" \
    -d '{
          "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
  }
}