# x402-hosting Project Upload Session Creator

> x402-hosting Project Upload Session Creator is a paid API for AI agents from api.x402-hosting.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Creates a presigned upload session for deploying a zipped project artifact to a hosted project slot, returning an upload URL and session metadata.

## Facts

- Endpoint: POST https://api.x402-hosting.com/v1/projects/:id/uploads
- 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/x402-hosting-project-upload-session-creator-0ce4f15c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rANt3IbH-1IXj3dlqhvOb

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 x402-hosting-project-upload-session-creator-0ce4f15c -d '<json body>'
```

Example prompt: 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?

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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
    }
   },
 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-hosting-project-upload-session-creator-0ce4f15c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x402-hosting.com](https://www.zero.xyz/host/api.x402-hosting.com/llms.txt)
