# Sarachai Image Upload

> Sarachai Image Upload is a paid API for AI agents from sarachai.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-14).

Upload an image file and receive a permanent public URL for that image

## Facts

- Endpoint: POST https://sarachai.com/api/x402/upload
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sarachai-image-upload-c27d45d2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gOgupU-giaZkKKHCZBO8b

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 sarachai-image-upload-c27d45d2 -d '<json body>'
```

Example prompt: Upload this JPEG photo to Sarachai and give me back the permanent public URL I can share — the file is sunset-photo.jpg and I want to title it 'Sunset at the Beach'.

## When to prefer this

Choose this endpoint when you need a simple, permanent, publicly accessible URL for an image file (JPEG, PNG, WebP, GIF, or SVG) and do not require complex CDN configuration, image transformation, or private access controls. It is well-suited for agents that need to host one-off or small batches of images (under the 20/day per wallet limit) and want an immediate URL in return. Avoid if you need bulk uploads exceeding 20 images per 24 hours, non-image file types, or guaranteed storage availability (service has a total cap).

## Known failure modes

- 429 Too Many Requests when the wallet has exceeded 20 uploads in a 24-hour period
- 507 Insufficient Storage when the total service storage cap has been reached
- 400 Bad Request if the file field is missing or the MIME type is not one of image/jpeg, image/png, image/webp, image/gif, image/svg+xml
- 413 Payload Too Large if the file exceeds 10MB
- Payment failure if the $0.02 USDC payment via x402 cannot be processed

## How this service works

Upload an image, get back a permanent public URL. multipart/form-data with a required 'file' field (image/jpeg, image/png, image/webp, image/gif, image/svg+xml), max 10MB, and an optional 'title' field. Limits: 20 uploads per wallet per 24h (429 past that), and a total service storage cap — 507 once full.

## Output

Returns a JSON object with the permanent public URL of the uploaded image, along with metadata including a unique ID, slug, image dimensions (width and height in pixels), the stored file name, file size in bytes, and the MIME type.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "properties": {}
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "example"
   ],
   "properties": {
    "example": {
     "id": "clx1a2b3c4d5e6f7g8h9",
     "url": "https://sarachai.com/api/images/sunset-photo.jpg",
     "slug": "sunset-photo",
     "width": 1920,
     "height": 1080,
     "fileName": "1699999999-sunset-photo.jpg",
     "fileSize": 245678,
     "mimeType": "image/jpeg"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "body": {
  "id": "clx1a2b3c4d5e6f7g8h9",
  "url": "https://sarachai.com/api/images/sunset-photo.jpg",
  "slug": "sunset-photo",
  "width": 1920,
  "height": 1080,
  "fileName": "1699999999-sunset-photo.jpg",
  "fileSize": 245678,
  "mimeType": "image/jpeg"
 },
 "type": "http",
 "bodyType": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sarachai-image-upload-c27d45d2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from sarachai.com](https://www.zero.xyz/host/sarachai.com/llms.txt)
