x402 Agent

Let agents create and manage MiniUp apps with their wallet.

  • The paying wallet becomes the MiniUp identity.
  • Agents can create apps, upload assets, publish, unpublish, and delete their own apps.
  • Agents can create table APIs and import CSV, Excel, JSON, GeoJSON, shapefile ZIP, Parquet, or GeoParquet files.
  • Paid calls return structured receipts for transaction records.

MiniUp x402 is an API layer for autonomous agents. Lightweight discovery endpoints are free. Actions that create, upload, convert, publish, or otherwise consume server resources are paid with x402 on Base.

How agents should use it

The flow is intentionally small: discover, pay when required, retry, then store the receipt.

1

Discover endpoints

Call GET /api/x402 to read actions, methods, paths, schemas, current prices, and receipt shape.

2

Choose an action

Use free helper endpoints for discovery. Use paid endpoints when creating, modifying, uploading, converting, publishing, or deleting.

3

Pay with x402

Paid endpoints return HTTP 402 with payment requirements. An x402-enabled client signs and retries the same request.

4

Keep the receipt

Successful paid calls return a receipt with wallet, network, transaction hash, price, app metadata, status, timestamp, and receipt hash.

Request pattern

Agents can inspect the free reference first, then use an x402-capable HTTP client for paid calls.

Discovery
GET https://www.miniup.io/api/x402
GET https://www.miniup.io/api/x402/pricing
GET https://www.miniup.io/api/x402/name
Create app body
{
  "name": "agent-demo",
  "html": "<!doctype html><html><body>Hello MiniUp</body></html>",
  "visibility": "private"
}

Receipt shape

Receipts do not include app URLs, admin URLs, private file paths, source code, private prompts, or secret values.

{
  "receiptId": "string",
  "action": "x402.create_app_from_html",
  "wallet": "0x...",
  "network": "eip155:8453",
  "txHash": "0x...",
  "recipient": "0x318a8BAC69c4ec1F9e489CE223B7cE2D719bcD3b",
  "price": "0.007",
  "currency": "USDC",
  "appId": "string",
  "appName": "string",
  "visibility": "private | public",
  "status": "created | updated | published | deleted | failed",
  "createdAt": "ISO timestamp",
  "receiptHash": "sha256:..."
}

Free helper endpoints

Use these for discovery and planning before spending agent wallet funds.

GET/api/x402$0

x402.describe_api

Free machine-readable overview of MiniUp x402 agent endpoints.

Schema
{
  "inputSchema": {
    "type": "object",
    "properties": {}
  },
  "exampleInput": {},
  "exampleOutput": {
    "ok": true,
    "endpoints": []
  }
}
GET/api/x402/pricing$0

x402.list_pricing

Free list of current x402 action prices and endpoint descriptions.

Schema
{
  "inputSchema": {
    "type": "object",
    "properties": {}
  },
  "exampleInput": {},
  "exampleOutput": {
    "pricing": []
  }
}
GET/api/x402/name$0

x402.suggest_site_name

Free helper endpoint that suggests an available MiniUp app name.

Schema
{
  "inputSchema": {
    "type": "object",
    "properties": {}
  },
  "exampleInput": {},
  "exampleOutput": {
    "name": "fresh-sunset"
  }
}
GET/api/x402/apps$0

x402.list_apps

List MiniUp apps owned by the paying wallet identity.

Schema
{
  "inputSchema": {
    "type": "object",
    "properties": {}
  },
  "exampleInput": {},
  "exampleOutput": {
    "apps": [],
    "receipt": {
      "type": "object",
      "properties": {
        "receiptId": {
          "type": "string"
        },
        "action": {
          "type": "string"
        },
        "wallet": {
          "type": "string"
        },
        "network": {
          "type": "string"
        },
        "txHash": {
          "type": "string"
        },
        "recipient": {
          "type": "string"
        },
        "price": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "appId": {
          "type": "string"
        },
        "appName": {
          "type": "string"
        },
        "visibility": {
          "type": "string",
          "enum": [
            "private",
            "public"
          ]
        },
        "status": {
          "type": "string"
        },
        "createdAt": {
          "type": "string"
        },
        "receiptHash": {
          "type": "string"
        }
      }
    }
  }
}

Paid API endpoints

These actions consume MiniUp resources and are paid by default. Admins can adjust prices in the MiniUp admin area.

POST/api/x402/apps$0.007

x402.create_app_from_html

Create a MiniUp app from complete HTML supplied by an agent.

Usage and schema
{
  "method": "POST",
  "path": "/api/x402/apps",
  "bodyType": "json",
  "inputSchema": {
    "type": "object",
    "properties": {
      "name": {
        "type": "string",
        "description": "Desired MiniUp app slug."
      },
      "html": {
        "type": "string",
        "description": "Complete HTML document for index.html."
      },
      "password": {
        "type": "string",
        "description": "Optional password. Providing it makes the app private."
      },
      "visibility": {
        "type": "string",
        "enum": [
          "private",
          "public"
        ]
      }
    },
    "required": [
      "name",
      "html"
    ]
  },
  "exampleInput": {
    "name": "agent-demo",
    "html": "<!doctype html><html></html>",
    "visibility": "private"
  },
  "exampleOutput": {
    "app": {
      "appId": "agent-demo",
      "status": "created"
    },
    "receipt": {
      "type": "object",
      "properties": {
        "receiptId": {
          "type": "string"
        },
        "action": {
          "type": "string"
        },
        "wallet": {
          "type": "string"
        },
        "network": {
          "type": "string"
        },
        "txHash": {
          "type": "string"
        },
        "recipient": {
          "type": "string"
        },
        "price": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "appId": {
          "type": "string"
        },
        "appName": {
          "type": "string"
        },
        "visibility": {
          "type": "string",
          "enum": [
            "private",
            "public"
          ]
        },
        "status": {
          "type": "string"
        },
        "createdAt": {
          "type": "string"
        },
        "receiptHash": {
          "type": "string"
        }
      }
    }
  }
}
POST/api/x402/apps/:siteId/files$0.003

x402.update_app_file

Create or replace a file in an app owned by the paying wallet.

Usage and schema
{
  "method": "POST",
  "path": "/api/x402/apps/:siteId/files",
  "bodyType": "json",
  "inputSchema": {
    "type": "object",
    "properties": {
      "path": {
        "type": "string",
        "description": "Relative file path inside the app."
      },
      "content": {
        "type": "string",
        "description": "File contents as UTF-8 text."
      },
      "contentType": {
        "type": "string"
      }
    },
    "required": [
      "path",
      "content"
    ]
  },
  "exampleInput": {
    "path": "index.html",
    "content": "<!doctype html><html></html>"
  },
  "exampleOutput": {
    "app": {
      "appId": "agent-demo",
      "status": "updated"
    },
    "receipt": {
      "type": "object",
      "properties": {
        "receiptId": {
          "type": "string"
        },
        "action": {
          "type": "string"
        },
        "wallet": {
          "type": "string"
        },
        "network": {
          "type": "string"
        },
        "txHash": {
          "type": "string"
        },
        "recipient": {
          "type": "string"
        },
        "price": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "appId": {
          "type": "string"
        },
        "appName": {
          "type": "string"
        },
        "visibility": {
          "type": "string",
          "enum": [
            "private",
            "public"
          ]
        },
        "status": {
          "type": "string"
        },
        "createdAt": {
          "type": "string"
        },
        "receiptHash": {
          "type": "string"
        }
      }
    }
  }
}
PATCH/api/x402/apps/:siteId$0.001

x402.update_app_meta

Update app privacy/password metadata for an app owned by the paying wallet.

Usage and schema
{
  "method": "PATCH",
  "path": "/api/x402/apps/:siteId",
  "bodyType": "json",
  "inputSchema": {
    "type": "object",
    "properties": {
      "visibility": {
        "type": "string",
        "enum": [
          "private",
          "public"
        ]
      },
      "password": {
        "type": "string",
        "description": "Optional password when visibility is private."
      }
    }
  },
  "exampleInput": {
    "visibility": "private",
    "password": "new-password"
  },
  "exampleOutput": {
    "app": {
      "appId": "agent-demo",
      "status": "updated"
    },
    "receipt": {
      "type": "object",
      "properties": {
        "receiptId": {
          "type": "string"
        },
        "action": {
          "type": "string"
        },
        "wallet": {
          "type": "string"
        },
        "network": {
          "type": "string"
        },
        "txHash": {
          "type": "string"
        },
        "recipient": {
          "type": "string"
        },
        "price": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "appId": {
          "type": "string"
        },
        "appName": {
          "type": "string"
        },
        "visibility": {
          "type": "string",
          "enum": [
            "private",
            "public"
          ]
        },
        "status": {
          "type": "string"
        },
        "createdAt": {
          "type": "string"
        },
        "receiptHash": {
          "type": "string"
        }
      }
    }
  }
}
POST/api/x402/apps/:siteId/publish$0.002

x402.publish_app

Publish or re-enable an app owned by the paying wallet.

Usage and schema
{
  "method": "POST",
  "path": "/api/x402/apps/:siteId/publish",
  "bodyType": "json",
  "inputSchema": {
    "type": "object",
    "properties": {}
  },
  "exampleInput": {},
  "exampleOutput": {
    "app": {
      "appId": "agent-demo",
      "status": "published"
    },
    "receipt": {
      "type": "object",
      "properties": {
        "receiptId": {
          "type": "string"
        },
        "action": {
          "type": "string"
        },
        "wallet": {
          "type": "string"
        },
        "network": {
          "type": "string"
        },
        "txHash": {
          "type": "string"
        },
        "recipient": {
          "type": "string"
        },
        "price": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "appId": {
          "type": "string"
        },
        "appName": {
          "type": "string"
        },
        "visibility": {
          "type": "string",
          "enum": [
            "private",
            "public"
          ]
        },
        "status": {
          "type": "string"
        },
        "createdAt": {
          "type": "string"
        },
        "receiptHash": {
          "type": "string"
        }
      }
    }
  }
}
POST/api/x402/apps/:siteId/unpublish$0.001

x402.unpublish_app

Disable public serving for an app owned by the paying wallet.

Usage and schema
{
  "method": "POST",
  "path": "/api/x402/apps/:siteId/unpublish",
  "bodyType": "json",
  "inputSchema": {
    "type": "object",
    "properties": {}
  },
  "exampleInput": {},
  "exampleOutput": {
    "app": {
      "appId": "agent-demo",
      "status": "updated"
    },
    "receipt": {
      "type": "object",
      "properties": {
        "receiptId": {
          "type": "string"
        },
        "action": {
          "type": "string"
        },
        "wallet": {
          "type": "string"
        },
        "network": {
          "type": "string"
        },
        "txHash": {
          "type": "string"
        },
        "recipient": {
          "type": "string"
        },
        "price": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "appId": {
          "type": "string"
        },
        "appName": {
          "type": "string"
        },
        "visibility": {
          "type": "string",
          "enum": [
            "private",
            "public"
          ]
        },
        "status": {
          "type": "string"
        },
        "createdAt": {
          "type": "string"
        },
        "receiptHash": {
          "type": "string"
        }
      }
    }
  }
}
DELETE/api/x402/apps/:siteId$0.001

x402.delete_app

Delete an app and its MiniUp data assets owned by the paying wallet.

Usage and schema
{
  "method": "DELETE",
  "path": "/api/x402/apps/:siteId",
  "bodyType": null,
  "inputSchema": {
    "type": "object",
    "properties": {}
  },
  "exampleInput": {},
  "exampleOutput": {
    "app": {
      "appId": "agent-demo",
      "status": "deleted"
    },
    "receipt": {
      "type": "object",
      "properties": {
        "receiptId": {
          "type": "string"
        },
        "action": {
          "type": "string"
        },
        "wallet": {
          "type": "string"
        },
        "network": {
          "type": "string"
        },
        "txHash": {
          "type": "string"
        },
        "recipient": {
          "type": "string"
        },
        "price": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "appId": {
          "type": "string"
        },
        "appName": {
          "type": "string"
        },
        "visibility": {
          "type": "string",
          "enum": [
            "private",
            "public"
          ]
        },
        "status": {
          "type": "string"
        },
        "createdAt": {
          "type": "string"
        },
        "receiptHash": {
          "type": "string"
        }
      }
    }
  }
}
POST/api/x402/apps/:siteId/upload-urls$0.001

x402.create_site_upload_urls

Create presigned upload URLs for app assets such as images, PDFs, CSS, and JS.

Usage and schema
{
  "method": "POST",
  "path": "/api/x402/apps/:siteId/upload-urls",
  "bodyType": "json",
  "inputSchema": {
    "type": "object",
    "properties": {
      "files": {
        "type": "array",
        "items": {
          "type": "object"
        }
      }
    },
    "required": [
      "files"
    ]
  },
  "exampleInput": {
    "files": [
      {
        "path": "assets/logo.png",
        "size": 12000,
        "type": "image/png"
      }
    ]
  },
  "exampleOutput": {
    "uploadToken": "string",
    "files": [],
    "receipt": {
      "type": "object",
      "properties": {
        "receiptId": {
          "type": "string"
        },
        "action": {
          "type": "string"
        },
        "wallet": {
          "type": "string"
        },
        "network": {
          "type": "string"
        },
        "txHash": {
          "type": "string"
        },
        "recipient": {
          "type": "string"
        },
        "price": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "appId": {
          "type": "string"
        },
        "appName": {
          "type": "string"
        },
        "visibility": {
          "type": "string",
          "enum": [
            "private",
            "public"
          ]
        },
        "status": {
          "type": "string"
        },
        "createdAt": {
          "type": "string"
        },
        "receiptHash": {
          "type": "string"
        }
      }
    }
  }
}
POST/api/x402/apps/:siteId/upload-urls/finalize$0.001

x402.finalize_site_upload

Finalize previously uploaded app assets and update the app manifest.

Usage and schema
{
  "method": "POST",
  "path": "/api/x402/apps/:siteId/upload-urls/finalize",
  "bodyType": "json",
  "inputSchema": {
    "type": "object",
    "properties": {
      "uploadToken": {
        "type": "string"
      },
      "entryPoint": {
        "type": "string"
      },
      "files": {
        "type": "array",
        "items": {
          "type": "object"
        }
      }
    },
    "required": [
      "uploadToken",
      "entryPoint",
      "files"
    ]
  },
  "exampleInput": {
    "uploadToken": "token",
    "entryPoint": "index.html",
    "files": [
      {
        "path": "index.html",
        "size": 1000
      }
    ]
  },
  "exampleOutput": {
    "app": {
      "appId": "agent-demo",
      "status": "updated"
    },
    "receipt": {
      "type": "object",
      "properties": {
        "receiptId": {
          "type": "string"
        },
        "action": {
          "type": "string"
        },
        "wallet": {
          "type": "string"
        },
        "network": {
          "type": "string"
        },
        "txHash": {
          "type": "string"
        },
        "recipient": {
          "type": "string"
        },
        "price": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "appId": {
          "type": "string"
        },
        "appName": {
          "type": "string"
        },
        "visibility": {
          "type": "string",
          "enum": [
            "private",
            "public"
          ]
        },
        "status": {
          "type": "string"
        },
        "createdAt": {
          "type": "string"
        },
        "receiptHash": {
          "type": "string"
        }
      }
    }
  }
}
POST/api/x402/apps/:siteId/tables$0.008

x402.create_table_api

Create a structured table-backed API for an app owned by the paying wallet.

Usage and schema
{
  "method": "POST",
  "path": "/api/x402/apps/:siteId/tables",
  "bodyType": "json",
  "inputSchema": {
    "type": "object",
    "properties": {
      "name": {
        "type": "string"
      },
      "slug": {
        "type": "string"
      },
      "schema": {
        "type": "object"
      }
    },
    "required": [
      "name",
      "schema"
    ]
  },
  "exampleInput": {
    "name": "Leads",
    "schema": {
      "fields": [
        {
          "name": "email",
          "label": "Email",
          "type": "string"
        }
      ]
    }
  },
  "exampleOutput": {
    "table": {
      "id": "string",
      "slug": "leads"
    },
    "receipt": {
      "type": "object",
      "properties": {
        "receiptId": {
          "type": "string"
        },
        "action": {
          "type": "string"
        },
        "wallet": {
          "type": "string"
        },
        "network": {
          "type": "string"
        },
        "txHash": {
          "type": "string"
        },
        "recipient": {
          "type": "string"
        },
        "price": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "appId": {
          "type": "string"
        },
        "appName": {
          "type": "string"
        },
        "visibility": {
          "type": "string",
          "enum": [
            "private",
            "public"
          ]
        },
        "status": {
          "type": "string"
        },
        "createdAt": {
          "type": "string"
        },
        "receiptHash": {
          "type": "string"
        }
      }
    }
  }
}
POST/api/x402/tables/:tableId/records$0.001

x402.insert_table_records

Insert records into a table owned by the paying wallet.

Usage and schema
{
  "method": "POST",
  "path": "/api/x402/tables/:tableId/records",
  "bodyType": "json",
  "inputSchema": {
    "type": "object",
    "properties": {
      "records": {
        "type": "array",
        "items": {
          "type": "object"
        }
      }
    },
    "required": [
      "records"
    ]
  },
  "exampleInput": {
    "records": [
      {
        "email": "agent@example.com"
      }
    ]
  },
  "exampleOutput": {
    "inserted": 1,
    "receipt": {
      "type": "object",
      "properties": {
        "receiptId": {
          "type": "string"
        },
        "action": {
          "type": "string"
        },
        "wallet": {
          "type": "string"
        },
        "network": {
          "type": "string"
        },
        "txHash": {
          "type": "string"
        },
        "recipient": {
          "type": "string"
        },
        "price": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "appId": {
          "type": "string"
        },
        "appName": {
          "type": "string"
        },
        "visibility": {
          "type": "string",
          "enum": [
            "private",
            "public"
          ]
        },
        "status": {
          "type": "string"
        },
        "createdAt": {
          "type": "string"
        },
        "receiptHash": {
          "type": "string"
        }
      }
    }
  }
}
POST/api/x402/apps/:siteId/data-files/upload-url$0.001

x402.create_data_file_upload_url

Create a presigned upload URL for CSV, XLSX, JSON, GeoJSON, Shapefile ZIP, Parquet, or GeoParquet.

Usage and schema
{
  "method": "POST",
  "path": "/api/x402/apps/:siteId/data-files/upload-url",
  "bodyType": "json",
  "inputSchema": {
    "type": "object",
    "properties": {
      "fileName": {
        "type": "string"
      },
      "fileSize": {
        "type": "number"
      },
      "fileType": {
        "type": "string"
      }
    },
    "required": [
      "fileName",
      "fileSize"
    ]
  },
  "exampleInput": {
    "fileName": "data.csv",
    "fileSize": 12000,
    "fileType": "text/csv"
  },
  "exampleOutput": {
    "strategy": "simple",
    "uploadToken": "string",
    "receipt": {
      "type": "object",
      "properties": {
        "receiptId": {
          "type": "string"
        },
        "action": {
          "type": "string"
        },
        "wallet": {
          "type": "string"
        },
        "network": {
          "type": "string"
        },
        "txHash": {
          "type": "string"
        },
        "recipient": {
          "type": "string"
        },
        "price": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "appId": {
          "type": "string"
        },
        "appName": {
          "type": "string"
        },
        "visibility": {
          "type": "string",
          "enum": [
            "private",
            "public"
          ]
        },
        "status": {
          "type": "string"
        },
        "createdAt": {
          "type": "string"
        },
        "receiptHash": {
          "type": "string"
        }
      }
    }
  }
}
POST/api/x402/apps/:siteId/data-files/complete-upload$0.001

x402.complete_data_file_multipart_upload

Complete a multipart data-file upload before conversion.

Usage and schema
{
  "method": "POST",
  "path": "/api/x402/apps/:siteId/data-files/complete-upload",
  "bodyType": "json",
  "inputSchema": {
    "type": "object",
    "properties": {
      "uploadId": {
        "type": "string"
      },
      "key": {
        "type": "string"
      },
      "parts": {
        "type": "array",
        "items": {
          "type": "object"
        }
      }
    },
    "required": [
      "uploadId",
      "key",
      "parts"
    ]
  },
  "exampleInput": {
    "uploadId": "string",
    "key": "string",
    "parts": [
      {
        "ETag": "etag",
        "PartNumber": 1
      }
    ]
  },
  "exampleOutput": {
    "success": true,
    "receipt": {
      "type": "object",
      "properties": {
        "receiptId": {
          "type": "string"
        },
        "action": {
          "type": "string"
        },
        "wallet": {
          "type": "string"
        },
        "network": {
          "type": "string"
        },
        "txHash": {
          "type": "string"
        },
        "recipient": {
          "type": "string"
        },
        "price": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "appId": {
          "type": "string"
        },
        "appName": {
          "type": "string"
        },
        "visibility": {
          "type": "string",
          "enum": [
            "private",
            "public"
          ]
        },
        "status": {
          "type": "string"
        },
        "createdAt": {
          "type": "string"
        },
        "receiptHash": {
          "type": "string"
        }
      }
    }
  }
}
POST/api/x402/apps/:siteId/data-files/convert$0.01

x402.convert_data_file_to_api

Convert an uploaded data file to a MiniUp parquet-backed API dataset.

Usage and schema
{
  "method": "POST",
  "path": "/api/x402/apps/:siteId/data-files/convert",
  "bodyType": "json",
  "inputSchema": {
    "type": "object",
    "properties": {
      "key": {
        "type": "string"
      },
      "fileName": {
        "type": "string"
      },
      "name": {
        "type": "string"
      },
      "slug": {
        "type": "string"
      },
      "replaceExisting": {
        "type": "boolean"
      }
    },
    "required": [
      "key",
      "fileName"
    ]
  },
  "exampleInput": {
    "key": "staging/data-files/app/token/source.csv",
    "fileName": "data.csv",
    "name": "Data"
  },
  "exampleOutput": {
    "asset": {
      "id": "string",
      "slug": "data"
    },
    "receipt": {
      "type": "object",
      "properties": {
        "receiptId": {
          "type": "string"
        },
        "action": {
          "type": "string"
        },
        "wallet": {
          "type": "string"
        },
        "network": {
          "type": "string"
        },
        "txHash": {
          "type": "string"
        },
        "recipient": {
          "type": "string"
        },
        "price": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "appId": {
          "type": "string"
        },
        "appName": {
          "type": "string"
        },
        "visibility": {
          "type": "string",
          "enum": [
            "private",
            "public"
          ]
        },
        "status": {
          "type": "string"
        },
        "createdAt": {
          "type": "string"
        },
        "receiptHash": {
          "type": "string"
        }
      }
    }
  }
}