# Ozmium ERC-4626 Morpho Vault Withdraw Calldata

> Ozmium ERC-4626 Morpho Vault Withdraw Calldata is a paid API for AI agents from ozmium.org, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Generates ERC-4626 compliant calldata to withdraw a specified asset amount from a Morpho vault on behalf of an owner, returning executable transaction steps.

## Facts

- Endpoint: POST https://ozmium.org/v1/tx/earn/withdraw
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ozmium-erc-4626-morpho-vault-withdraw-calldata-4ce436ca
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_X6fuSYkcN0ATMqEp-J5QK

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 ozmium-erc-4626-morpho-vault-withdraw-calldata-4ce436ca -d '<json body>'
```

Example prompt: Generate the withdraw calldata to pull 500 USDC (in atomic units: 500000000) from the Morpho vault at 0xBEEF...1234 for owner wallet 0xABCD...5678 so I can submit the transaction.

## When to prefer this

Use this endpoint when you need to generate ERC-4626 compliant withdraw calldata specifically for Morpho vaults on Base mainnet, particularly when working within the Ozmium agent ecosystem that also handles Morpho Blue borrowing, collateral, and Gains Network trading. Prefer this over manual ABI encoding when you need ready-to-submit transaction steps without managing contract ABIs directly.

## Known failure modes

- Invalid vault address returns error — vault must be a valid ERC-4626 Morpho vault contract
- Assets amount exceeds owner's available balance causes transaction to revert on-chain
- Malformed owner address (not a valid Ethereum address) returns validation error
- Assets value of zero or negative returns bad request error
- Vault not supported or not recognized by Ozmium returns 404 or error response
- Payment of $0.02 USDC not provided or invalid causes x402 payment required response

## How this service works

ERC-4626 withdraw calldata for a Morpho vault (assets to receiver, owner-signed). POST /v1/tx/earn/withdraw { vault, assets (atomic), owner }. Returns { to, data, value } steps.

## Output

Returns an array of transaction steps, each containing: 'to' (the target contract address), 'data' (the hex-encoded calldata), and 'value' (ETH value to send). These steps can be submitted sequentially to execute the ERC-4626 withdrawal from the Morpho vault.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "owner": {
   "type": "string"
  },
  "vault": {
   "type": "string"
  },
  "assets": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ozmium-erc-4626-morpho-vault-withdraw-calldata-4ce436ca/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from ozmium.org](https://www.zero.xyz/host/ozmium.org/llms.txt)
