{"slug":"1gateway-dev-v1-agent-run-cf9600","title":"Use when an agent must compute, parse a CSV or draw a chart with real code","host":"1gateway.dev","method":"GET","resource":"https://1gateway.dev/v1/agent/run","category":"code","description":"Use when an agent must compute, parse a CSV or draw a chart with real code. Input: language (python|node), code (64 KB), stdin, files (5 /v1/files ids), background. Output: exitCode, stdout, stderr, /workspace/out files (5, 2 MB, base64). 30 s in the response ($0.005), or background=true: 10 min, id","price_listed":0.005,"price_asked":0.005,"state":"answering","state_label":"Answering","checks_7d":6,"answered_7d":6,"latency_ms_median":28,"reported_calls_30d":4,"reported_payers_30d":1,"networks":["eip155:137","eip155:143","eip155:42161","eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"method":"GET","queryParams":{"code":"print(sum(range(10)))","language":"python"},"type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"method":{"enum":["GET"],"type":"string"},"queryParams":{"additionalProperties":false,"properties":{"background":{"description":"true: run up to 10 minutes in the background ($0.008); the answer is an id and a one-time secret, a…","enum":["true","false"],"type":"string"},"code":{"description":"Program source, max 64 KB; runs as /workspace/main.py or main.js; write result files to /workspace/…","maxLength":65536,"type":"string"},"credit_budget":{"description":"With Authorization: Bearer <credit session>: USD cap (0.001-20, default 0.10) for 1gateway API call…","maxLength":12,"type":"string"},"files":{"description":"Up to 5 ids of your own /v1/files uploads (same paying wallet), copied to /workspace/in/<filename>;…","maxLength":400,"type":"string"},"language":{"description":"python (3.14, default) or node (24)","enum":["python","node"],"type":"string"},"notify_email":{"description":"Background only (+$0.002): email when the run ends, to an address that already allowed mail from yo…","maxLength":254,"type":"string"},"stdin":{"description":"Text fed to the program's standard input, max 256 KB","maxLength":262144,"type":"string"},"webhook":{"description":"Background only: signed POST (x-1gateway-signature, key = hex(SHA-256(secret))) when the run ends","maxLength":2048,"pattern":"^https://","type":"string"}},"required":["code"],"type":"object"},"type":{"const":"http","type":"string"}},"required":["type","method"],"type":"object"},"output":{"properties":{"example":{"additionalProperties":true,"properties":{"durationMs":{"type":"integer"},"exitCode":{"type":"integer"},"files":{"items":{},"type":"array"},"filesOmitted":{"items":{},"type":"array"},"language":{"type":"string"},"stderr":{"type":"string"},"stderrTruncated":{"type":"boolean"},"stdout":{"type":"string"},"stdoutTruncated":{"type":"boolean"},"timedOut":{"type":"boolean"}},"required":["language","exitCode","timedOut","durationMs","stdout","stderr","stdoutTruncated","stderrTruncated","files","filesOmitted"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-11-26","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.005,"price_match":true,"latency_ms":56,"error":null},{"day":"2026-11-25","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.005,"price_match":true,"latency_ms":28,"error":null},{"day":"2026-11-24","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.005,"price_match":true,"latency_ms":28,"error":null},{"day":"2026-11-23","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.005,"price_match":true,"latency_ms":14,"error":null},{"day":"2026-11-22","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.005,"price_match":true,"latency_ms":29,"error":null},{"day":"2026-11-21","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.005,"price_match":true,"latency_ms":19,"error":null}],"description_full":"Use when an agent must compute, parse a CSV or draw a chart with real code. Input: language (python|node), code (64 KB), stdin, files (5 /v1/files ids), background. Output: exitCode, stdout, stderr, /workspace/out files (5, 2 MB, base64). 30 s in the response ($0.005), or background=true: 10 min, id + secret now, result at GET /v1/agent/run/{id} ($0.008). HTTP(S) allowed. Python: pandas, numpy, matplotlib; Node: lodash. Example: POST {\"code\":\"print(2+2)\"}","last_updated":"2026-11-23T01:00:52.193Z","schemes":["exact"]}