{"openapi":"3.1.0","info":{"title":"Poncho API","version":"1.0.0","description":"SIWX-authenticated Poncho endpoints, including resource discovery and programmable chat management.","x-guidance":"Use GET /resources to fetch Poncho native resources. The endpoint is free and SIWX-authenticated; it should not require or trigger payment. The response is paginated, defaults to 100 resources per page, and is sorted by usage count descending. When answering \"what can Poncho do\" questions, summarize the returned resources by capability instead of inventing a static list."},"servers":[{"url":"https://tryponcho.com"}],"tags":[{"name":"Resources"},{"name":"API Keys"},{"name":"Chats"}],"components":{"securitySchemes":{"siwx":{"type":"apiKey","in":"header","name":"SIGN-IN-WITH-X","description":"Sign-In with X wallet proof. Make an unauthenticated request to receive a Payment-Required challenge with a sign-in-with-x extension, then retry with SIGN-IN-WITH-X. No funds move."},"ponchoApiKey":{"type":"http","scheme":"bearer","bearerFormat":"pk_poncho","description":"Poncho API key created in Settings > Developers. Send Authorization: Bearer <pk_poncho_...>."}},"schemas":{"ChatListResponse":{"type":"object","properties":{"chats":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"activityAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"activeRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activeCommandId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activeRunStartedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"starred":{"type":"boolean"},"archived":{"type":"boolean"}},"required":["id","title","createdAt","updatedAt","activityAt","activeRunId","activeCommandId","activeRunStartedAt","starred","archived"]}},"page":{"type":"integer","minimum":0,"maximum":9007199254740991},"pageSize":{"type":"integer","minimum":1,"maximum":100},"totalCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"hasNextPage":{"type":"boolean"}},"required":["chats","page","pageSize","totalCount","hasNextPage"]},"ApiKey":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"keyPreview":{"type":"string"},"lastUsedAt":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","keyPreview","lastUsedAt","createdAt"]},"CreateApiKeyRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80}},"required":["name"],"additionalProperties":false},"CreateApiKeyResponse":{"type":"object","properties":{"apiKey":{"$ref":"#/components/schemas/ApiKey"},"secret":{"type":"string"}},"required":["apiKey","secret"]},"CreateChatRequest":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"messageId":{"type":"string","minLength":1,"maxLength":200},"text":{"default":"","type":"string"},"attachmentRefs":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"filename":{"type":"string","minLength":1},"mediaType":{"type":"string","minLength":1}},"required":["path","filename"]}},"options":{"type":"object","properties":{"model":{"default":"claude-sonnet-4-6[1m]","type":"string","enum":["claude-opus-4-8[1m]","claude-sonnet-4-6[1m]","claude-haiku-4-5"]},"thinking":{"default":"adaptive","type":"string","enum":["adaptive","off","low","medium","high"]}}},"template":{"type":"object","properties":{"slug":{"type":"string","minLength":1,"maxLength":120},"values":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["slug"],"additionalProperties":false}}},"CreateChatResponse":{"type":"object","properties":{"chatId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"commandId":{"type":"string","minLength":1},"messageId":{"type":"string","minLength":1},"state":{"type":"string","enum":["accepted","queued","duplicate","busy","conflicting_duplicate_command","rejected"]},"status":{"type":"string","enum":["running","queued","rejected"]},"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"},"status":{"type":"number"},"type":{"type":"string","enum":["generic","credit_limit"]},"audience":{"type":"string","enum":["user","operator","silent"]},"boundary":{"type":"string"},"cause":{"type":"object","properties":{"boundary":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"},"type":{"type":"string"}}},"why":{"type":"string"},"fix":{"type":"string"},"link":{"type":"string"},"eventId":{"type":"string"},"retry":{"type":"string","enum":["none","safe","after_backoff","after_user_action"]},"source":{"type":"string"}},"required":["message","status","type"]},"stream":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"token":{"type":"string","minLength":1},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["url","token","expiresAt"],"additionalProperties":false},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["chatId","commandId","messageId","state","status","id"]},"ChatSearchResponse":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"chatId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"messageId":{"type":"null"},"source":{"type":"string","const":"title"},"excerpt":{"type":"string"},"chatTitle":{"type":"string"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["chatId","messageId","source","excerpt","chatTitle","updatedAt"]}}},"required":["results"]},"SendChatMessageRequest":{"type":"object","properties":{"messageId":{"type":"string","minLength":1,"maxLength":200},"text":{"default":"","type":"string"},"attachmentRefs":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"filename":{"type":"string","minLength":1},"mediaType":{"type":"string","minLength":1}},"required":["path","filename"]}},"options":{"type":"object","properties":{"model":{"default":"claude-sonnet-4-6[1m]","type":"string","enum":["claude-opus-4-8[1m]","claude-sonnet-4-6[1m]","claude-haiku-4-5"]},"thinking":{"default":"adaptive","type":"string","enum":["adaptive","off","low","medium","high"]}}},"template":{"type":"object","properties":{"slug":{"type":"string","minLength":1,"maxLength":120},"values":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["slug"],"additionalProperties":false}}},"SendChatMessageResponse":{"type":"object","properties":{"chatId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"commandId":{"type":"string","minLength":1},"messageId":{"type":"string","minLength":1},"state":{"type":"string","enum":["accepted","queued","duplicate","busy","conflicting_duplicate_command","rejected"]},"status":{"type":"string","enum":["running","queued","rejected"]},"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"},"status":{"type":"number"},"type":{"type":"string","enum":["generic","credit_limit"]},"audience":{"type":"string","enum":["user","operator","silent"]},"boundary":{"type":"string"},"cause":{"type":"object","properties":{"boundary":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"},"type":{"type":"string"}}},"why":{"type":"string"},"fix":{"type":"string"},"link":{"type":"string"},"eventId":{"type":"string"},"retry":{"type":"string","enum":["none","safe","after_backoff","after_user_action"]},"source":{"type":"string"}},"required":["message","status","type"]},"stream":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"token":{"type":"string","minLength":1},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["url","token","expiresAt"],"additionalProperties":false}},"required":["chatId","commandId","messageId","state","status"]},"ChatResultResponse":{"type":"object","properties":{"chatId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"commandId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"activeRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["running","finished","pending","idle"]},"chat":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string"},"isAdvanced":{"type":"boolean"},"sandboxId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","title","isAdvanced","sandboxId","createdAt","updatedAt"],"additionalProperties":false},"snapshot":{"type":"object","properties":{"chatId":{"type":"string","minLength":1},"cursor":{"type":"string","minLength":1},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant","system"]},"ordinal":{"type":"integer","minimum":0,"maximum":9007199254740991},"parts":{"type":"array","items":{}},"metadata":{"type":"object","properties":{"chatId":{"type":"string","minLength":1},"runId":{"type":"string","minLength":1},"commandId":{"type":"string","minLength":1},"sandboxId":{"type":"string","minLength":1},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"createdAtSource":{"type":"string","enum":["client","sandbox_accept","server_finish"]},"finishReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"transcriptSchemaVersion":{"type":"number","const":2}},"required":["chatId","createdAt","createdAtSource","transcriptSchemaVersion"],"additionalProperties":{}}},"required":["id","role","ordinal","parts","metadata"],"additionalProperties":{}}},"window":{"type":"object","properties":{"startOrdinal":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"endOrdinal":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"hasMoreBefore":{"type":"boolean"},"hasMoreAfter":{"type":"boolean"}},"required":["startOrdinal","endOrdinal","hasMoreBefore","hasMoreAfter"],"additionalProperties":false},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"messageCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["chatId","cursor","messages","window","revision","messageCount"],"additionalProperties":false},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"role":{"type":"string","enum":["user","assistant","system"]},"ordinal":{"type":"integer","minimum":0,"maximum":9007199254740991},"parts":{"type":"array","items":{}},"metadata":{"type":"object","properties":{"chatId":{"type":"string","minLength":1},"runId":{"type":"string","minLength":1},"commandId":{"type":"string","minLength":1},"sandboxId":{"type":"string","minLength":1},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"createdAtSource":{"type":"string","enum":["client","sandbox_accept","server_finish"]},"finishReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"transcriptSchemaVersion":{"type":"number","const":2}},"required":["chatId","createdAt","createdAtSource","transcriptSchemaVersion"],"additionalProperties":{}}},"required":["id","role","ordinal","parts","metadata"],"additionalProperties":{}}}},"required":["chatId","commandId","activeRunId","status","chat","snapshot"]},"ChatGrepRequest":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":500,"description":"Literal text to find, or a JavaScript regular expression when regex is true."},"regex":{"default":false,"type":"boolean"},"caseSensitive":{"default":false,"type":"boolean"},"roles":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["user","assistant","system"]}},"limit":{"default":20,"type":"integer","minimum":1,"maximum":50},"contextMessages":{"default":1,"type":"integer","minimum":0,"maximum":5},"startOrdinal":{"type":"integer","minimum":0,"maximum":9007199254740991},"endOrdinal":{"type":"integer","minimum":0,"maximum":9007199254740991},"maxScanMessages":{"default":1000,"type":"integer","minimum":1,"maximum":5000},"maxCharsPerResult":{"default":1200,"type":"integer","minimum":200,"maximum":4000}},"required":["query"]},"ChatGrepResponse":{"type":"object","properties":{"chatId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"matchedMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"matchCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"matches":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"excerpt":{"type":"string"},"messageId":{"type":"string"},"ordinal":{"type":"integer","minimum":0,"maximum":9007199254740991},"role":{"type":"string","enum":["user","assistant","system"]},"contextAfter":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"excerpt":{"type":"string"},"messageId":{"type":"string"},"ordinal":{"type":"integer","minimum":0,"maximum":9007199254740991},"role":{"type":"string","enum":["user","assistant","system"]}},"required":["createdAt","excerpt","messageId","ordinal","role"]}},"contextBefore":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"excerpt":{"type":"string"},"messageId":{"type":"string"},"ordinal":{"type":"integer","minimum":0,"maximum":9007199254740991},"role":{"type":"string","enum":["user","assistant","system"]}},"required":["createdAt","excerpt","messageId","ordinal","role"]}},"matchCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"snippets":{"type":"array","items":{"type":"string"}}},"required":["createdAt","excerpt","messageId","ordinal","role","contextAfter","contextBefore","matchCount","snippets"]}},"messageCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"returnedMatchCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"scan":{"type":"object","properties":{"maxScanBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"maxScanMessages":{"type":"integer","minimum":1,"maximum":9007199254740991},"range":{"type":"object","properties":{"endOrdinal":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"startOrdinal":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["endOrdinal","startOrdinal"]},"scanLimitReached":{"type":"boolean"},"scannedBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"scannedMessageCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["maxScanBytes","maxScanMessages","range","scanLimitReached","scannedBytes","scannedMessageCount"]},"search":{"type":"object","properties":{"caseSensitive":{"type":"boolean"},"query":{"type":"string"},"regex":{"type":"boolean"},"roles":{"type":"array","items":{"type":"string","enum":["user","assistant","system"]}}},"required":["caseSensitive","query","regex","roles"]}},"required":["chatId","matchedMessageCount","matchCount","matches","messageCount","returnedMatchCount","revision","scan","search"]}}},"paths":{"/api/resources":{"get":{"operationId":"listPonchoResources","summary":"Poncho Native Resources","description":"List the resources that Poncho natively supports. This endpoint is free and uses SIWX wallet authentication only. Use it when a user asks what Poncho can do, what tools are available, or which capabilities Poncho supports.","tags":["Resources"],"security":[{"siwx":[]}],"parameters":[{"in":"query","name":"page","required":false,"schema":{"type":"integer","minimum":1,"default":1},"description":"One-based page number."},{"in":"query","name":"limit","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":100},"description":"Number of resources per page. Defaults to 100 and cannot exceed 100."}],"responses":{"200":{"description":"Poncho native resources sorted by usage.","content":{"application/json":{"schema":{"type":"object","properties":{"resources":{"type":"array","items":{"type":"object","properties":{"origin":{"type":"string","format":"uri"},"description":{"type":"string"},"usageCount":{"type":"integer","minimum":0}},"required":["origin","description","usageCount"]}},"page":{"type":"integer","minimum":1},"limit":{"type":"integer","minimum":1,"maximum":100},"hasNextPage":{"type":"boolean"}},"required":["resources","page","limit","hasNextPage"]}}}},"400":{"description":"Invalid request."},"401":{"description":"Invalid SIWX proof."},"402":{"description":"SIWX authentication challenge."}}}},"/api/v1/api-keys":{"post":{"operationId":"createPonchoApiKey","summary":"Create a Poncho API key","description":"Create a Poncho API key for the authenticated workspace. Authenticate with SIGN-IN-WITH-X for a wallet linked to the target workspace. API keys cannot create other API keys.","tags":["API Keys"],"security":[{"siwx":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}}},"responses":{"201":{"description":"API key created. The secret is returned once and must be stored by the caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponse"}}}},"400":{"description":"Invalid request."},"401":{"description":"Invalid SIWX proof."},"402":{"description":"SIWX authentication challenge."},"403":{"description":"Wallet is not authorized."},"409":{"description":"Wallet matched more than one workspace."}}}},"/api/v1/chats":{"get":{"operationId":"listPonchoChats","summary":"List Poncho chats","description":"List chats in the authenticated Poncho workspace. Authenticate with SIGN-IN-WITH-X for a wallet linked to a Poncho workspace, or with a Poncho API key.","tags":["Chats"],"security":[{"siwx":[]},{"ponchoApiKey":[]}],"parameters":[{"in":"query","name":"cursor","required":false,"schema":{"type":"integer","minimum":0,"default":0},"description":"Zero-based page cursor."},{"in":"query","name":"limit","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"description":"Number of chats to return."}],"responses":{"200":{"description":"Paginated chat list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatListResponse"}}}},"401":{"description":"Invalid API key, Privy token, or SIWX proof."},"402":{"description":"SIWX authentication challenge."},"403":{"description":"Wallet or API key is not authorized."}}},"post":{"operationId":"createPonchoChat","summary":"Create a Poncho chat and send the first message","description":"Create a chat in the Poncho frontend and immediately submit its first non-interactive message. The chat displays exactly like a UI-created chat. Authenticate with SIGN-IN-WITH-X for a wallet linked to a Poncho workspace, or with a Poncho API key.","tags":["Chats"],"security":[{"siwx":[]},{"ponchoApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChatRequest"}}}},"responses":{"202":{"description":"Chat created and first message accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChatResponse"}}}},"401":{"description":"Invalid API key, Privy token, or SIWX proof."},"402":{"description":"SIWX authentication challenge."},"403":{"description":"Wallet or API key is not authorized."},"409":{"description":"Chat command conflicts."},"503":{"description":"Sandbox is not ready."}}}},"/api/v1/chats/search":{"get":{"operationId":"searchPonchoChats","summary":"Search Poncho chat titles","description":"Search non-archived chat titles in the authenticated Poncho workspace with case-insensitive substring matching. Use this to find candidate chat IDs before calling transcript grep.","tags":["Chats"],"security":[{"siwx":[]},{"ponchoApiKey":[]}],"parameters":[{"in":"query","name":"query","required":true,"schema":{"type":"string","minLength":1},"description":"Case-insensitive substring to match against chat titles."},{"in":"query","name":"limit","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":10},"description":"Maximum title matches to return."}],"responses":{"200":{"description":"Matching chat titles with highlighted title excerpts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSearchResponse"}}}},"401":{"description":"Invalid API key, Privy token, or SIWX proof."},"402":{"description":"SIWX authentication challenge."},"403":{"description":"Wallet or API key is not authorized."}}}},"/api/v1/chats/{chatId}/messages":{"post":{"operationId":"sendPonchoChatMessage","summary":"Send a message to a Poncho chat","description":"Submit a non-interactive chat command. The API returns acceptance status immediately; poll the result endpoint for hardened chat progress and final messages.","tags":["Chats"],"security":[{"siwx":[]},{"ponchoApiKey":[]}],"parameters":[{"in":"path","name":"chatId","required":true,"schema":{"type":"string","format":"uuid"},"description":"Poncho chat id."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendChatMessageRequest"}}}},"responses":{"202":{"description":"Message accepted and running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendChatMessageResponse"}}}},"401":{"description":"Invalid API key, Privy token, or SIWX proof."},"402":{"description":"SIWX authentication challenge."},"403":{"description":"Wallet or API key is not authorized."},"409":{"description":"Chat is busy or command conflicts."},"503":{"description":"Sandbox is not ready."}}}},"/api/v1/chats/{chatId}/result":{"get":{"operationId":"getPonchoChatResult","summary":"Get chat run status and result","description":"Return the current hardened chat status and transcript snapshot. Pass commandId to scope messages to one API-submitted command.","tags":["Chats"],"security":[{"siwx":[]},{"ponchoApiKey":[]}],"parameters":[{"in":"path","name":"chatId","required":true,"schema":{"type":"string","format":"uuid"},"description":"Poncho chat id."},{"in":"query","name":"commandId","required":false,"schema":{"type":"string"},"description":"Optional command id returned by sendPonchoChatMessage."},{"in":"query","name":"pageCount","required":false,"schema":{"type":"integer","minimum":1,"maximum":20},"description":"Number of transcript pages to include."}],"responses":{"200":{"description":"Chat status and transcript snapshot.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatResultResponse"}}}},"401":{"description":"Invalid API key, Privy token, or SIWX proof."},"402":{"description":"SIWX authentication challenge."},"403":{"description":"Wallet or API key is not authorized."},"404":{"description":"Chat not found."}}}},"/api/v1/chats/{chatId}/grep":{"post":{"operationId":"grepPonchoChat","summary":"Search a Poncho chat transcript","description":"Search the durable transcript for one authenticated Poncho chat by literal text or JavaScript regex. Returns matching message ordinals, plugins, timestamps, snippets, and optional nearby context. Use this to find or recall information from earlier in a chat without relying on visible context.","tags":["Chats"],"security":[{"siwx":[]},{"ponchoApiKey":[]}],"parameters":[{"in":"path","name":"chatId","required":true,"schema":{"type":"string","format":"uuid"},"description":"Poncho chat id."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatGrepRequest"}}}},"responses":{"200":{"description":"Transcript search results.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatGrepResponse"}}}},"401":{"description":"Invalid API key, Privy token, or SIWX proof."},"402":{"description":"SIWX authentication challenge."},"403":{"description":"Wallet or API key is not authorized."},"404":{"description":"Chat or transcript not found."}}}}}}