{"openapi":"3.1.0","info":{"title":"Sarachai Web — Paid APIs","description":"Pay-per-call file upload/hosting and raw LLM chat completions. No API key, no account.","version":"1.0.0","x-guidance":"Two routes, both no API key / no account, paid via x402 (Base) or MPP (Tempo):\nPOST /api/x402/upload as multipart/form-data with a 'file' field (image/jpeg, image/png, image/webp, image/gif, or image/svg+xml, max 10MB). $0.02 per call. Response: { id, slug, url, fileName, fileSize, mimeType, width, height }.\nPOST /api/x402/chat with a JSON body { messages: [{ role, content }] } — a pure LLM passthrough, no system prompt or site context injected, so include your own 'system' message in the array if you want one. $0.01 per call. Response: { role, content }.","contact":{"email":"sarachaii@gmail.com"}},"servers":[{"url":"https://sarachai.com"}],"tags":[{"name":"Chat"},{"name":"Upload"}],"paths":{"/api/x402/upload":{"post":{"operationId":"upload","summary":"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.","tags":["Upload"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.02"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}]},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string"},"fileName":{"type":"string"},"fileSize":{"type":"number"},"mimeType":{"type":"string"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","slug","url","fileName","fileSize","mimeType","width","height"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"Image file — image/jpeg, image/png, image/webp, image/gif, or image/svg+xml, max 10MB."},"title":{"type":"string","description":"Optional display title for the uploaded image."}},"required":["file"]}}}}}},"/api/x402/chat":{"post":{"operationId":"chat","summary":"Pure LLM chat completion — no system prompt, no RAG, no site context injected; whatever you send is exactly what the model sees. Send { messages: [{ role, content }] }, role one of system/user/assistant, max 40 messages, 4000 chars each.","tags":["Chat"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"type":"string","minLength":1,"maxLength":4000}},"required":["role","content"]}}},"required":["messages"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","const":"assistant"},"content":{"type":"string"}},"required":["role","content"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}}}}