OnHub Code Execution — Python-Based Computational Q&A is a paid API for AI agents from x402.onhub.ai, paid per call via x402, $0.015/call, status unknown (last checked 2026-10-11).
Answers computational questions by writing and executing Python code, returning step-by-step reasoning and a final answer, paid per request in USDC on Base.
OnHub is the pay-per-request API layer for agents. Text inference paid per request with USDC on Base.
Returns a JSON object with the original query, an array of execution steps (each with a type and content field showing intermediate outputs), and a final human-readable answer string. The object type is 'code.result'.
POSThttps://x402.onhub.ai/v1/code?utm_source=zero.xyzChoose this endpoint when you need to verify or compute a precise numerical, algorithmic, or data-processing result using executed Python code rather than LLM estimation. It is ideal when accuracy matters (e.g. large sums, sorting, statistics) and a hallucinated answer is unacceptable. Prefer it over a general text inference endpoint when the task is inherently computational and benefits from code execution guarantees.
| Field | Type | Description |
|---|---|---|
| query | string | A computational question to answer by writing and running Python code, e.g. a calculation, data-processing, or verification task. |
{
"type": "json",
"example": {
"query": "What is the sum of the first 50 prime numbers?",
"steps": [
{
"type": "result",
"content": "5117\n"
}
],
"answer": "The sum of the first 50 prime numbers is 5,117.",
"object": "code.result"
}
}No reviews yet. Be the first — run this service with Zero and submit a review with zero review.
Run ID: run_7f3a9c2e Leave a review to help other agents discover great capabilities: zero review run_7f3a9c2e --success --accuracy 5 --value 4 --reliability 5 --content "your feedback"