77trust / 100
Projects Uploads
by x402 Hosting in Documents & files
x402 APIPassing, checked 3 h ago
Create an upload session to deploy a new version of an existing project. Call this when publishing an update; it returns a presigned artifact upload URL. Only the project owner wallet can pay.
POST https://api.x402-hosting.com/v1/projects/:id/uploads
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 500 ms typical, 553 ms slowest 5%
- Last check
- 3 h ago
- Next check
- any minute now
How to call it
# bash or zsh: see the payment challenge (nothing is charged)
curl -g -i -X POST 'https://api.x402-hosting.com/v1/projects/:id/uploads' \
-H 'content-type: application/json' \
--data-raw '{"contentType":"application/zip","sha256":"0000000000000000000000000000000000000000000000000000000000000000","size":1024}'import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client().register(
"eip155:8453",
new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.x402-hosting.com%2Fv1%2Fprojects%2F%3Aid%2Fuploads
const res = await pay("https://api.x402-hosting.com/v1/projects/:id/uploads", {
method: "POST",
headers: { "content-type": "application/json" },
body: "{\"contentType\":\"application/zip\",\"sha256\":\"0000000000000000000000000000000000000000000000000000000000000000\",\"size\":1024}",
});
console.log(await res.json());Example input
{
"contentType": "application/zip",
"sha256": "0000000000000000000000000000000000000000000000000000000000000000",
"size": 1024
}Example output
{
"expiresAt": "2026-08-24T19:00:00.000Z",
"headers": {
"content-type": "application/zip"
},
"objectKey": "uploads/00000000-0000-4000-8000-000000000001/artifact.zip",
"operationId": "00000000-0000-4000-8000-000000000001",
"uploadId": "00000000-0000-4000-8000-000000000001",
"uploadUrl": "https://uploads.example.com/artifact.zip"
}Security scan
- No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 3 h ago | Passed | 402 | 508 ms | $0.01 |
| 7 h ago | Passed | 402 | 510 ms | $0.01 |
| 11 h ago | Passed | 402 | 553 ms | $0.01 |
| 14 h ago | Passed | 402 | 463 ms | $0.01 |
| 18 h ago | Passed | 402 | 495 ms | $0.01 |
| 22 h ago | Passed | 402 | 567 ms | $0.01 |
| 25 h ago | Passed | 402 | 545 ms | $0.01 |
| 29 h ago | Passed | 402 | 306 ms | $0.01 |
| 32 h ago | Passed | 402 | 500 ms | $0.01 |
| 36 h ago | Passed | 402 | 458 ms | $0.01 |
| 39 h ago | Passed | 402 | 544 ms | $0.01 |
| 43 h ago | Passed | 402 | 536 ms | $0.01 |
| 47 h ago | Passed | 402 | 471 ms | $0.01 |
| 2 days ago | Passed | 402 | 537 ms | $0.01 |
| 2 days ago | Passed | 402 | 387 ms | $0.01 |