{"openapi":"3.1.0","info":{"title":"Screenshotly API","version":"2.2.0","description":"Synchronous and queued website capture over HTTP."},"servers":[{"url":"https://screenshotly.app"}],"security":[{"ApiKey":[]}],"paths":{"/api/screenshot":{"post":{"operationId":"capture","summary":"Capture immediately","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureRequest"}}}},"responses":{"200":{"description":"Capture bytes or persisted capture metadata","headers":{"X-Screenshot-Duration":{"schema":{"type":"integer"}},"X-Screenshot-Size":{"schema":{"type":"integer"}},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}}},"content":{"image/png":{"schema":{"type":"string","format":"binary"}},"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/webp":{"schema":{"type":"string","format":"binary"}},"application/pdf":{"schema":{"type":"string","format":"binary"}},"text/html":{"schema":{"type":"string"}},"video/webm":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"type":"object","required":["success","url","format","size","duration"],"properties":{"success":{"type":"boolean","const":true},"url":{"type":"string","format":"uri"},"format":{"type":"string","enum":["png","jpeg","webp","pdf","html","webm"],"default":"png"},"size":{"type":"integer"},"duration":{"type":"integer"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan does not include a requested feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage or throughput limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Capture failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/jobs":{"get":{"operationId":"listJobs","summary":"List recent capture jobs","responses":{"200":{"description":"Recent jobs","content":{"application/json":{"schema":{"type":"object","properties":{"jobs":{"type":"array","items":{"$ref":"#/components/schemas/CaptureJob"}}}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createJob","summary":"Queue a capture job","parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureRequest"}}}},"responses":{"202":{"description":"Job accepted","content":{"application/json":{"schema":{"type":"object","required":["id","status","replayed","statusUrl"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["QUEUED","RUNNING","SUCCEEDED","FAILED","CANCELED"]},"replayed":{"type":"boolean"},"statusUrl":{"type":"string"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan does not include a requested feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage or throughput limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Capture failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/jobs/batch":{"post":{"operationId":"createBatch","summary":"Queue up to 20 capture jobs","parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","maxLength":180}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["captures"],"properties":{"captures":{"type":"array","minItems":1,"maxItems":20,"items":{"$ref":"#/components/schemas/CaptureRequest"}}}}}}},"responses":{"202":{"description":"Jobs accepted","content":{"application/json":{"schema":{"type":"object","properties":{"jobs":{"type":"array","items":{"type":"object","required":["id","status","replayed","statusUrl"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["QUEUED","RUNNING","SUCCEEDED","FAILED","CANCELED"]},"replayed":{"type":"boolean"},"statusUrl":{"type":"string"}}}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan does not include a requested feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Usage or throughput limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Capture failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/jobs/{id}":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"get":{"operationId":"getJob","summary":"Get a capture job","responses":{"200":{"description":"Job status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureJob"}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Job not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"cancelJob","summary":"Cancel a queued or running job","responses":{"200":{"description":"Job canceled","content":{"application/json":{"schema":{"type":"object","required":["id","status"],"properties":{"id":{"type":"string"},"status":{"type":"string","const":"CANCELED"}}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Job not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"CaptureRequest":{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","format":"uri","maxLength":2048},"format":{"type":"string","enum":["png","jpeg","webp","pdf","html","webm"],"default":"png"},"device":{"type":"string","enum":["desktop","laptop","tablet","mobile"]},"width":{"type":"integer","minimum":320,"maximum":3840},"height":{"type":"integer","minimum":240,"maximum":3840},"fullPage":{"type":"boolean","default":false},"videoDuration":{"type":"integer","minimum":1,"maximum":15,"default":5},"quality":{"type":"number","minimum":0,"maximum":100,"default":100},"delay":{"type":"integer","minimum":0,"maximum":10000},"selector":{"type":"string","maxLength":1000},"mockup":{"type":"string"},"aiRemoval":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean","default":false},"types":{"type":"array","items":{"type":"string","enum":["cookie-banner","newsletter","chat-widget","social-overlay","ad"]}},"confidence":{"type":"number","minimum":0,"maximum":1,"default":0.8}}},"blockAds":{"type":"boolean","default":false},"stealth":{"type":"boolean","default":false},"cache":{"type":"boolean","default":false},"cacheTtl":{"type":"integer","minimum":60,"maximum":86400,"default":3600},"geolocation":{"type":"object","additionalProperties":false,"required":["latitude","longitude"],"properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180}}},"proxyRegion":{"type":"string","enum":["us","eu","apac"]},"scroll":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean","default":false},"direction":{"type":"string","enum":["vertical","horizontal"],"default":"vertical"},"distance":{"type":"integer","minimum":100,"maximum":50000},"speed":{"type":"integer","minimum":100,"maximum":5000,"default":500}}},"storage":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean","default":false}}},"webhook":{"type":"object","additionalProperties":false,"properties":{"url":{"type":"string","format":"uri","maxLength":2048},"method":{"type":"string","enum":["POST","PUT"],"default":"POST"},"headers":{"type":"object","maxProperties":50,"additionalProperties":{"type":"string","maxLength":4096}},"secret":{"type":"string","maxLength":4096}}},"headers":{"type":"object","maxProperties":50,"additionalProperties":{"type":"string","maxLength":4096}},"cookies":{"type":"array","maxItems":50,"items":{"type":"object","additionalProperties":false,"required":["name","value"],"properties":{"name":{"type":"string","minLength":1,"maxLength":256},"value":{"type":"string","maxLength":4096},"domain":{"type":"string","maxLength":253},"path":{"type":"string","default":"/"},"httpOnly":{"type":"boolean"},"secure":{"type":"boolean"}}}},"waitForSelector":{"type":"string","maxLength":1000},"waitForNetworkIdle":{"type":"boolean","default":false},"javascript":{"type":"string","maxLength":5000},"darkMode":{"type":"boolean","default":false},"clip":{"type":"object","additionalProperties":false,"required":["x","y","width","height"],"properties":{"x":{"type":"number","minimum":0},"y":{"type":"number","minimum":0},"width":{"type":"number","exclusiveMinimum":0},"height":{"type":"number","exclusiveMinimum":0}}},"deviceScaleFactor":{"type":"number","minimum":1,"maximum":3,"default":1},"hideSelectors":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":1000}},"userAgent":{"type":"string","maxLength":1000},"timezone":{"type":"string","maxLength":100}}},"CaptureJob":{"type":"object","required":["id","status","format","attempts","createdAt"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["QUEUED","RUNNING","SUCCEEDED","FAILED","CANCELED"]},"format":{"type":"string","enum":["png","jpeg","webp","pdf","html","webm"]},"attempts":{"type":"integer"},"maxAttempts":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"startedAt":{"type":["string","null"],"format":"date-time"},"completedAt":{"type":["string","null"],"format":"date-time"},"duration":{"type":["integer","null"]},"errorCode":{"type":["string","null"]},"errorMessage":{"type":["string","null"]},"resultUrl":{"type":"string","format":"uri"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{},"minimumPlan":{"type":"string"},"retryAfter":{"type":"number"}}}}}}