Tasks & jobs

Run an action and retrieve its typed result.

Running an action is two steps: submit a task, then poll the job for its result.

Submit a task

curl -X POST https://api.openwire.sh/v1/wire/task \
  -H "X-API-Key: $ANAKIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action_id": "amazon.search_products",
    "params": { "query": "keyboard", "limit": 5 },
    "identity": "id_personal"
  }'
FieldRequiredDescription
action_idyesThe <site>.<action> to run.
paramsyesThe parameters the action accepts (see its schema in the catalog).
identitynoA saved identity for actions that need a logged-in account.

The response returns immediately with a job_id:

{ "job_id": "job_a8f3c2", "status": "queued", "poll": "/v1/wire/jobs/job_a8f3c2" }

Poll the job

curl https://api.openwire.sh/v1/wire/jobs/job_a8f3c2 \
  -H "X-API-Key: $ANAKIN_API_KEY"
{
  "job_id": "job_a8f3c2",
  "status": "completed",
  "latency_ms": 178,
  "credits": 2,
  "result": { "items": [ { "title": "Keychron Q1 Pro", "price": 199.00 } ] }
}

Statuses are queued, running, completed, or failed. Failed jobs are never billed.

Credits

Each action lists its per-call credit cost in the catalog. Credits are deducted only when a job completes successfully. They don't expire while your account is active.