{"uid":"cap_rANt3IbH-1IXj3dlqhvOb","slug":"x402-hosting-project-upload-session-creator-0ce4f15c","name":"x402-hosting Project Upload Session Creator","description":"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.","url":"https://api.x402-hosting.com/v1/projects/:id/uploads","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input","output"],"properties":{"input":{"type":"object","required":["type","method","queryParams"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"headers":{"type":"object","required":["Idempotency-Key"],"properties":{"Idempotency-Key":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"additionalProperties":true},"pathParams":{"type":"object","required":["id"],"properties":{"id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"additionalProperties":false},"queryParams":{"type":"object","required":["size","sha256","contentType"],"properties":{"size":{"type":"integer","minimum":1},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"contentType":{"type":"string","const":"application/zip"}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type","example"],"properties":{"type":{"type":"string","const":"json"},"example":{"type":"object","required":["uploadId","objectKey","uploadUrl","expiresAt","headers","operationId"],"properties":{"headers":{"type":"object","additionalProperties":{"type":"string"}},"uploadId":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"expiresAt":{"type":"string"},"objectKey":{"type":"string"},"uploadUrl":{"type":"string"},"operationId":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_u3LLi2BJ5V9KsQxtG-kiP","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Creates a presigned upload session for deploying a zipped project artifact to a hosted project slot, returning an upload URL and session metadata.","exampleAgentPrompt":"I just built my Next.js project and zipped it up — it's 4,200,000 bytes and the SHA-256 hash is a3f1...c9d2. Can you create a deployment upload session for project ID 3a1b2c3d-0000-4000-a000-000000000001 on x402-hosting so I can get a presigned URL to push the file?","exampleUseCases":[{"title":"Agent deploys fresh Next.js build","prompt":"I've finished building my Next.js site, zipped the output into a 3.2 MB file with SHA-256 hash e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 — please start a deployment upload session for project ID d4e5f6a7-1234-4000-b000-000000000002 on x402-hosting so I can get the URL to upload it."},{"title":"CI pipeline deploys on every push","prompt":"Every time a new commit lands, I want to automatically start a deployment upload session on x402-hosting for project aabb1122-aaaa-4000-8000-aabbccddeeff, using the zipped build artifact — the file is 8,500,000 bytes and its SHA-256 is abc123...def456. Kick off the session for me."},{"title":"Re-deploy after content update","prompt":"My blog content changed, I've regenerated the static Next.js build, zipped it at 1,100,000 bytes with hash f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2 — can you open a new upload session for project 99887766-5544-4321-b210-000000000009 on x402-hosting with a fresh idempotency key?"}],"resultDescription":"Returns a JSON object containing: a unique upload ID (UUID), an object key identifying where the artifact will be stored, a presigned upload URL valid for a limited time window (see expiresAt), required HTTP headers to include when PUTing the file, and an operation ID (UUID) for tracking the deployment operation.","failureModes":["Invalid project UUID in path → 400/404 with project not found","SHA-256 pattern mismatch (not 64 hex chars) → 400 validation error","contentType not exactly 'application/zip' → 400 validation error","size less than 1 → 400 validation error","Missing or malformed Idempotency-Key header → 400 error","Payment not completed via x402 → 402 Payment Required","Upload URL expired before use → presigned URL returns 403 on PUT","Duplicate idempotency key with different params → conflict error"],"whenToPreferThis":"Use this endpoint as the first step in deploying a project on x402-hosting — specifically when you have a zipped Next.js build artifact and need a presigned URL to upload it. This is the correct endpoint when you already have a project ID and want to initiate the upload phase of a deployment workflow. Prefer this over generic S3 or file-hosting APIs when your deployment target is x402-hosting and you want to pay per-call via USDC over the x402 protocol.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:37:27.543Z","isFirstParty":false}