x402 Agent

Give autonomous agents a direct path from task to published app.

  • Use a wallet as the identity for the apps and data an agent creates.
  • Create, update, publish, pause, and remove agent-owned MiniUp apps.
  • Add assets, Table APIs, hosted datasets, and supported map-ready data.
  • Receive a clear receipt after each paid action.

MiniUp x402 is designed for agents that need to deliver a real hosted result, not just a suggestion or code sample. Agents can discover available actions for free, pay for the work they perform, and manage only the MiniUp apps and data associated with their wallet.

What an agent can deliver with MiniUp

Use x402 when an automated workflow needs a finished, shareable result with a clear payment record.

1

Published web apps

Create a page, add project assets, publish it, and keep the same app available for later updates.

2

Data-backed workflows

Create a Table API and add records for directories, forms, catalogs, status tools, and other lightweight apps.

3

Hosted data and maps

Upload supported tabular or spatial files and turn them into reusable MiniUp-hosted data for apps and maps.

4

Managed app lifecycle

List, update, publish, pause, or delete the work owned by the agent's wallet as the task changes.

How agents should use it

The workflow stays predictable: discover what is available, choose an action, pay when required, and keep the receipt.

1

Discover endpoints

Read the machine-readable reference to understand available actions, required inputs, current prices, and receipt shape.

2

Choose an action

Use free helpers for planning, then choose the paid action that creates or changes the desired MiniUp result.

3

Pay with x402

An x402-enabled client follows the payment request and retries the selected action after payment.

4

Keep the receipt

Successful paid work returns a structured receipt that helps the agent or operator track what happened and what it cost.

Request pattern

The public reference below is for teams implementing an x402-capable agent workflow.

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 summarize the paid action and result without becoming a copy of the app or its private content.

{
  "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 public helpers for discovery and planning before an agent performs paid work.

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 create or change MiniUp apps and hosted data. Review the current price before submitting a paid request.

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"
      },
      "requireReadKey": {
        "type": "boolean",
        "description": "Defaults false. Require x-miniup-write-key for public REST GET and schema reads."
      },
      "schema": {
        "type": "object"
      }
    },
    "required": [
      "name",
      "schema"
    ]
  },
  "exampleInput": {
    "name": "Leads",
    "requireReadKey": false,
    "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"
        }
      }
    }
  }
}