Run a paid micro-task
execute_taskRun one paid micro-task. Requires a confirmed x402 payment first; forwards to the paid /task endpoint and returns its answer.
Return codes: HTTP 200 executed; HTTP 402 payment missing, unconfirmed, or wrong amount (body carries the x402 challenge - pay and retry); HTTP 400 bad input, no charge; HTTP 500 internal error, no charge.
Behavior: charges once per confirmed payment; reusing the same x_payment hash is safe and will not double-charge. No authentication beyond the payment.
Parameters: the prompt must match the task type; x_payment is the confirmed
hash from verify_payment. Unknown tasks are rejected before any charge.
When to use: follow list_tasks, price_task, pay, verify_payment, then
this.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"task": "<task>",
"prompt": "<prompt>",
"x_payment": "<x_payment>"
},
"name": "execute_task"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | Yes | Name of the micro-task to run, e.g. 'summarize'. Must be a task NAME from the list_tasks tool - not a task ID, specification, or free text. TEXT: summarize, extract, keywords, sentiment, translate, rewrite, proofread. CODE: python_debug, code_lint, code_refactor, code_explain, code_review. DATA: json_minify, json_query, csv_to_json, hash, base64, convert. MEDIA: describe_image, probe_media. | |
| prompt | Yes | Input for the task: the text to summarize, the JSON to convert, the code to review, the URL to probe, etc. Format depends on the task type. | |
| x_payment | Yes | Base transaction hash (0x-prefixed) of the confirmed USDC payment for this task, from the verify_payment step. Required. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| result | No | task result on HTTP 200 | |
| job_key | No | job id for get_job_status | |
| how_to_pay | No |