# Alchemy Agent Proxy - Swap POST Endpoint

> Alchemy Agent Proxy - Swap POST Endpoint is a paid API for AI agents from agent-proxy.alchemy.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-14).

Proxies HTTP POST/PUT/PATCH requests to Alchemy swap APIs, enabling paid programmatic access to DeFi token swap operations via the x402 payment protocol

## Facts

- Endpoint: POST https://agent-proxy.alchemy.com/v1/x402/4013ed2b4f50e768/abc-test-123/
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-proxy-alchemy-com-d5c391ed
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_42mCdvu0Emd2YMJRHVlLb

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 agent-proxy-alchemy-com-d5c391ed -d '<json body>'
```

Example prompt: Submit a swap transaction to Alchemy's agent proxy — send a POST with a JSON body containing the swap parameters so I can execute a token trade on-chain.

## When to prefer this

Use this endpoint when you need to programmatically submit write-type swap operations (POST/PUT/PATCH) through Alchemy's agent proxy infrastructure with x402 micropayment billing. Prefer this over direct Alchemy API calls when operating in an agentic context that supports the x402 payment protocol.

## Known failure modes

- Payment not fulfilled — x402 payment required before request is processed
- Invalid body type — must be one of json, form-data, or text
- Invalid HTTP method — only POST, PUT, PATCH are accepted
- Missing required 'input' field in request body
- Underlying Alchemy swap API returns an error (e.g. insufficient liquidity, bad token pair)
- Network timeout or proxy connectivity issue

## How this service works

sfdsa

## Output

Returns the proxied response from Alchemy's swap API, which may include transaction data, swap confirmation details, or error information depending on the underlying swap endpoint called.

## Example request

```json
{
 "input": {
  "body": {
   "tokenIn": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
   "amountIn": "1000000",
   "slippage": 0.5,
   "tokenOut": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [],
     "properties": {}
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-proxy-alchemy-com-d5c391ed/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-proxy.alchemy.com](https://www.zero.xyz/host/agent-proxy.alchemy.com/llms.txt)
