# Delx EVM Gas Limit Headroom

> Delx EVM Gas Limit Headroom is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-13).

Computes whether a given gas limit provides sufficient headroom over an estimated gas usage, returning the surplus gas amount and fraction.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/evm-gas-limit-headroom
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-evm-gas-limit-headroom-7228fd50
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_sXeJeNv7n-VRu8gc4rz0k

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability delx-evm-gas-limit-headroom-7228fd50 -d '<json body>'
```

Example prompt: Before I submit this transaction, check if a gas limit of 21000 is sufficient for an estimated gas usage of 17800 — tell me if there's enough headroom and by how much.

## When to prefer this

Use this endpoint when an AI agent needs a lightweight, stateless preflight check to confirm an EVM transaction's gas limit safely covers the estimated gas before submission. It is ideal for automated agent pipelines that must guard against out-of-gas failures without building custom arithmetic. Prefer this over manual calculation when you need a structured, auditable result including the headroom fraction and a confirmation that no data is retained.

## Known failure modes

- Missing or non-integer gas_limit or estimated_gas values cause validation errors
- Estimated gas exceeding gas limit returns sufficient: false with negative or zero headroom
- Malformed request body returns HTTP 400 or similar client error
- Payment failure via x402 protocol results in 402 response before computation occurs

## How this service works

EVM Gas Limit Headroom: EVM Gas Limit Headroom calculates gas-limit headroom above an estimated gas amount from bounded caller-supplied values without an external provider. Call EVM Gas Limit Headroom before signing, submitting, replacing, or accepting an EVM/Base transaction assembled from caller-owned data. Returns normalized transaction evidence, calculated budget or shape findings, and a fail-closed preflight status for EVM Gas Limit Headroom as versioned deterministic JSON. Price: $0.001 U…

## Output

Returns a JSON object indicating whether the gas limit is sufficient (boolean), the absolute headroom in gas units, and the headroom as a fraction of the gas limit. Also includes audit evidence fields confirming no data retention and no external calls were made.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "gas_limit": {
   "type": "integer",
   "description": "Gas Limit supplied to EVM Gas Limit Headroom; used only for this bounded calculation and processed in memory without retention."
  },
  "estimated_gas": {
   "type": "integer",
   "description": "Estimated Gas supplied to EVM Gas Limit Headroom; used only for this bounded calculation and processed in memory without retention."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "sufficient": true,
   "headroom_gas": 4200,
   "headroom_fraction": 0.2
  },
  "schema": "delx/util-evm-gas-limit-headroom/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "dd71c79c3c5455d122b7167969700e4587770c75519ca55c82bfc04e7433381e",
   "external_calls": 0
  },
  "operation": "evm_preflight:evm_gas_limit_headroom"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-evm-gas-limit-headroom-7228fd50/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
