{"openapi":"3.1.0","info":{"title":"RedditShot API","version":"0.1.0","description":"Render clean Reddit topic and top-comment screenshots without Reddit navigation or sidebars."},"servers":[{"url":"https://redditshot.gokoding.com"}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API key","description":"Use the RedditShot API key as a Bearer token."}},"schemas":{"RenderSuccess":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RenderResult"},"error":{"nullable":true}},"required":["success","data","error"]},"RenderResult":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["processing","succeeded","failed"]},"redditPostId":{"type":"string"},"redditUrl":{"type":"string","format":"uri"},"title":{"type":"string"},"assets":{"type":"array","items":{"$ref":"#/components/schemas/RenderAsset"}},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["id","status","redditPostId","redditUrl","assets","createdAt","expiresAt"]},"RenderAsset":{"type":"object","properties":{"kind":{"type":"string","enum":["topic","comment"]},"fileName":{"type":"string"},"url":{"type":"string","format":"uri"},"contentType":{"type":"string","enum":["image/jpeg"]},"width":{"type":"number","enum":[1200]},"commentId":{"type":"string"},"score":{"type":"number"}},"required":["kind","fileName","url","contentType","width"]},"ApiError":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"data":{"nullable":true},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"issues":{"type":"array","items":{"nullable":true}}},"required":["code","message"]}},"required":["success","data","error"]},"RenderRequest":{"type":"object","properties":{"redditUrl":{"type":"string","minLength":1,"maxLength":2000,"description":"A Reddit post URL or Reddit post ID"},"commentCount":{"type":"integer","minimum":0,"maximum":3,"default":3},"includeMedia":{"type":"boolean","default":true}},"required":["redditUrl"]}},"parameters":{}},"paths":{"/api/v1/renders":{"post":{"operationId":"createRedditRender","tags":["Renders"],"summary":"Render a Reddit post and top comments","security":[{"BearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":8,"maxLength":200},"required":false,"name":"idempotency-key","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderRequest"}}}},"responses":{"200":{"description":"Existing idempotent render","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderSuccess"}}}},"201":{"description":"Render created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderSuccess"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"get":{"operationId":"listRedditRenders","tags":["Renders"],"summary":"List recent renders","security":[{"BearerAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Recent renders","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"$ref":"#/components/schemas/RenderResult"}},"error":{"nullable":true}},"required":["success","data","error"]}}}}}}},"/api/v1/renders/{id}":{"get":{"operationId":"getRedditRender","tags":["Renders"],"summary":"Get a render","security":[{"BearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Render details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderSuccess"}}}},"404":{"description":"Render not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"operationId":"deleteRedditRender","tags":["Renders"],"summary":"Delete a render and its assets","security":[{"BearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Render deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"deleted":{"type":"boolean","enum":[true]}},"required":["id","deleted"]},"error":{"nullable":true}},"required":["success","data","error"]}}}},"404":{"description":"Render not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}