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"
}'| Field | Required | Description |
|---|---|---|
action_id | yes | The <site>.<action> to run. |
params | yes | The parameters the action accepts (see its schema in the catalog). |
identity | no | A 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.