{"uid":"cap_gOgupU-giaZkKKHCZBO8b","slug":"sarachai-image-upload-c27d45d2","name":"Sarachai Image Upload","description":"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.","url":"https://sarachai.com/api/x402/upload","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","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"}}}}},"responseSchema":{"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"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_mN0OHlh4Lv_zaU8mec9x5","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Upload an image file and receive a permanent public URL for that image","exampleAgentPrompt":"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'.","exampleUseCases":[{"title":"Avatar hosting for user profiles","prompt":"Upload this PNG profile picture to Sarachai image hosting and give me the permanent public URL so I can save it as the user's avatar in our database."},{"title":"Product image for e-commerce listing","prompt":"I need to host this product photo — it's a 2MB JPEG of a blue sneaker — on Sarachai so I can embed the permanent URL in our online store listing."},{"title":"Blog post illustration upload","prompt":"Take this SVG illustration I made for my article and upload it to Sarachai so I can use the public link in my blog post."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:35:04.895Z","isFirstParty":false}