{"openapi":"3.1.0","info":{"title":"Plinda Engine API","version":"1.0.0","description":"Plinda Engine: collect answers and citations from AI answer engines, search results and web pages. Credits are held when a task is accepted, charged when it completes and refunded when it fails. include.html saves a hosted evidence page (+0.25 credit, charged only when saved) on CHATGPT, GEMINI, PERPLEXITY, COPILOT, BING_COPILOT_SEARCH, META_AI, GOOGLE_AIO, GOOGLE_AIMODE, GOOGLE_SERP; other engines answer 422 EVIDENCE_UNSUPPORTED. WEB_SCRAPE payload.maxAge (seconds, up to 604800) serves a cached read (result.cached)."},"servers":[{"url":"https://promptgale.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key: pk_live_..."}},"schemas":{"TaskType":{"type":"string","enum":["CHATGPT","GEMINI","PERPLEXITY","COPILOT","BING_COPILOT_SEARCH","META_AI","GOOGLE_AIO","GOOGLE_AIMODE","GOOGLE_SERP","GOOGLE_NEWS","BING_SEARCH","BRAVE_SEARCH","GOOGLE_PLACES","WEB_SCRAPE"],"description":"Canonical engine name"},"AnswerPayload":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000},"country":{"type":"string","pattern":"^[A-Za-z]{2}$"},"brand":{"type":"string","minLength":1,"maxLength":200},"brandAliases":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"brandDomains":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"competitors":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"include":{"default":{"markdown":true,"html":false,"rawResponse":false,"screenshot":false,"analysis":false},"type":"object","properties":{"markdown":{"default":true,"type":"boolean"},"html":{"default":false,"type":"boolean"},"rawHtml":{"type":"boolean"},"rawResponse":{"default":false,"type":"boolean"},"screenshot":{"default":false,"type":"boolean"},"analysis":{"default":false,"type":"boolean"}},"additionalProperties":false},"state":{"type":"string","pattern":"^[A-Za-z]{2}$"},"uule":{"type":"string","minLength":6,"maxLength":700},"city":{"type":"string","minLength":1,"maxLength":100},"location":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false}},"required":["prompt"],"additionalProperties":false},"SerpPayload":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":2048},"country":{"type":"string","pattern":"^[A-Za-z]{2}$"},"hl":{"type":"string","minLength":2,"maxLength":10},"page":{"default":1,"type":"integer","minimum":1,"maximum":20},"limit":{"default":10,"type":"integer","minimum":1,"maximum":100},"include":{"type":"object","properties":{"html":{"type":"boolean"},"rawHtml":{"type":"boolean"},"screenshot":{"type":"boolean"}},"additionalProperties":false},"state":{"type":"string","pattern":"^[A-Za-z]{2}$"},"uule":{"type":"string","minLength":6,"maxLength":700},"city":{"type":"string","minLength":1,"maxLength":100},"location":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false}},"required":["query"],"additionalProperties":false},"PlacesPayload":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":500},"country":{"type":"string","pattern":"^[A-Za-z]{2}$"},"hl":{"type":"string","minLength":2,"maxLength":10},"limit":{"default":10,"type":"integer","minimum":1,"maximum":20},"include":{"type":"object","properties":{"html":{"type":"boolean"},"rawHtml":{"type":"boolean"},"screenshot":{"type":"boolean"}},"additionalProperties":false},"state":{"type":"string","pattern":"^[A-Za-z]{2}$"},"uule":{"type":"string","minLength":6,"maxLength":700},"city":{"type":"string","minLength":1,"maxLength":100},"location":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false}},"required":["query"],"additionalProperties":false},"ScrapePayload":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"render":{"default":false,"type":"boolean"},"country":{"type":"string","pattern":"^[A-Za-z]{2}$"},"maxChars":{"type":"integer","minimum":100,"maximum":2000000},"maxAge":{"type":"integer","minimum":0,"maximum":604800},"include":{"type":"object","properties":{"html":{"type":"boolean"},"rawHtml":{"type":"boolean"},"screenshot":{"type":"boolean"}},"additionalProperties":false},"state":{"type":"string","pattern":"^[A-Za-z]{2}$"},"uule":{"type":"string","minLength":6,"maxLength":700},"city":{"type":"string","minLength":1,"maxLength":100},"location":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false}},"required":["url"],"additionalProperties":false},"TaskInput":{"type":"object","required":["taskType","payload"],"additionalProperties":false,"properties":{"taskType":{"type":"string","description":"Engine. Case-insensitive; aliases accepted: GOOGLE, AIMODE, BING, MICROSOFT_COPILOT, BING_COPILOT, COPILOT_SEARCH, BING_AIMODE, WEB_SEARCH, SEARCH, PLACES, GOOGLE_MAPS, MAPS","examples":["CHATGPT","GOOGLE_AIO"]},"payload":{"oneOf":[{"$ref":"#/components/schemas/AnswerPayload"},{"$ref":"#/components/schemas/SerpPayload"},{"$ref":"#/components/schemas/PlacesPayload"},{"$ref":"#/components/schemas/ScrapePayload"}]},"webhookUrl":{"type":"string","format":"uri","description":"Receives task.completed / task.failed (signed)."},"idempotencyKey":{"type":"string","maxLength":200},"priority":{"type":"integer","minimum":0,"maximum":10,"default":0}}},"EngineResult":{"type":"object","properties":{"engine":{"type":"string","enum":["CHATGPT","GEMINI","PERPLEXITY","COPILOT","BING_COPILOT_SEARCH","META_AI","GOOGLE_AIO","GOOGLE_AIMODE","GOOGLE_SERP","GOOGLE_NEWS","BING_SEARCH","BRAVE_SEARCH","GOOGLE_PLACES","WEB_SCRAPE"]},"text":{"type":"string"},"markdown":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"position":{"type":"integer","minimum":1,"maximum":9007199254740991},"url":{"type":"string"},"title":{"type":"string"},"domain":{"type":"string"},"snippet":{"type":"string"},"cited":{"type":"boolean"},"citationNumber":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["position","url","domain","cited"],"additionalProperties":false}},"organic":{"type":"array","items":{"type":"object","properties":{"position":{"type":"integer","minimum":1,"maximum":9007199254740991},"url":{"type":"string"},"title":{"type":"string"},"snippet":{"type":"string"},"domain":{"type":"string"}},"required":["position","url","title","domain"],"additionalProperties":false}},"aiOverviewPresent":{"type":"boolean"},"news":{"type":"array","items":{"type":"object","properties":{"position":{"type":"integer","minimum":1,"maximum":9007199254740991},"url":{"type":"string"},"title":{"type":"string"},"source":{"type":"string"},"date":{"type":"string"}},"required":["position","url","title"],"additionalProperties":false}},"places":{"type":"array","items":{"type":"object","properties":{"position":{"type":"integer","minimum":1,"maximum":9007199254740991},"name":{"type":"string"},"url":{"type":"string"},"placeId":{"type":"string"},"rating":{"type":"number"},"reviews":{"type":"integer","minimum":0,"maximum":9007199254740991},"category":{"type":"string"},"address":{"type":"string"},"phone":{"type":"string"},"website":{"type":"string"},"hours":{"type":"string"},"lat":{"type":"number"},"lng":{"type":"number"},"sponsored":{"type":"boolean"}},"required":["position","name","url"],"additionalProperties":false}},"searchQueries":{"type":"array","items":{"type":"string"}},"relatedQuestions":{"type":"array","items":{"type":"string"}},"model":{"type":"string"},"html":{"type":"string"},"screenshotBase64":{"type":"string"},"htmlUrl":{"type":"string"},"evidence":{"type":"object","properties":{"status":{"type":"string","enum":["ok","failed"]},"url":{"type":"string"},"expiresAt":{"type":"string"},"format":{"type":"string","enum":["snapshot","html+screenshot"]},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"error":{"type":"string"}},"required":["status"],"additionalProperties":false},"page":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"canonical":{"type":"string"},"lang":{"type":"string"},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"openGraph":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"jsonLd":{"type":"array","items":{}},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"alt":{"type":"string"}},"required":["url"],"additionalProperties":false}},"contentType":{"type":"string"}},"required":["url","meta","jsonLd","images"],"additionalProperties":false},"cached":{"type":"boolean"},"cachedAt":{"type":"string"},"analysis":{"type":"object","properties":{"version":{"type":"number","const":1},"status":{"type":"string","enum":["ok","no_answer"]},"method":{"type":"string","enum":["rules","rules+llm"]},"brands":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"mentioned":{"type":"boolean"},"mentions":{"type":"integer","minimum":0,"maximum":9007199254740991},"firstPosition":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"rank":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"cited":{"type":"boolean"},"citedUrls":{"type":"array","items":{"type":"string"}},"role":{"type":"string","enum":["target","competitor"]},"shareOfVoice":{"type":["number","null"]},"recommended":{"type":["boolean","null"]},"sentiment":{"anyOf":[{"type":"string","enum":["positive","neutral","negative"]},{"type":"null"}]},"sentimentReason":{"type":"string"}},"required":["name","mentioned","mentions","firstPosition","rank","cited","citedUrls","role"],"additionalProperties":false}},"brandsNamed":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"rank":{"type":"integer","minimum":1,"maximum":9007199254740991},"mentions":{"type":"integer","minimum":0,"maximum":9007199254740991},"firstPosition":{"type":"integer","minimum":0,"maximum":9007199254740991},"role":{"type":"string","enum":["target","competitor","other"]},"foundIn":{"type":"string","enum":["input","list","bold","heading","llm"]},"recommended":{"type":"boolean"},"shareOfVoice":{"type":"number"},"sentiment":{"anyOf":[{"type":"string","enum":["positive","neutral","negative"]},{"type":"null"}]}},"required":["name","rank","mentions","firstPosition","role","foundIn","recommended","shareOfVoice"],"additionalProperties":false}},"sources":{"type":"array","items":{"type":"object","properties":{"position":{"type":"integer","minimum":1,"maximum":9007199254740991},"url":{"type":"string"},"domain":{"type":"string"},"cited":{"type":"boolean"},"kind":{"type":"string","enum":["owned","competitor","ugc","news","marketplace","review","reference","other"]},"brand":{"type":["string","null"]}},"required":["position","url","domain","cited","kind","brand"],"additionalProperties":false}},"citationKinds":{"type":"object","propertyNames":{"type":"string","enum":["owned","competitor","ugc","news","marketplace","review","reference","other"]},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991},"required":["owned","competitor","ugc","news","marketplace","review","reference","other"]},"llm":{"type":"object","properties":{"status":{"type":"string","enum":["ok","failed","skipped"]},"model":{"type":"string"},"error":{"type":"string"},"costUsd":{"type":"number"},"latencyMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["status"],"additionalProperties":false}},"required":["status","brands"],"additionalProperties":false},"location":{"type":"object","properties":{"country":{"type":"string"},"locale":{"type":"string"},"timezone":{"type":"string"},"exitIp":{"type":"string"},"exitCountry":{"description":"Country of the exit. IP geolocation, except META_AI: the country Meta itself sees for the exit when known (exitCountrySource).","type":"string"},"exitIpCountry":{"description":"META_AI only: IP-geolocation country of the exit, present when it differs from exitCountry (the country Meta sees).","type":"string"},"exitCountrySource":{"description":"META_AI only: source of exitCountry ('meta' = Meta's own geolocation of the exit, 'ip' = IP geolocation).","type":"string","enum":["meta","ip"]},"proxyLabel":{"type":"string"},"googleLocation":{"type":["string","null"]},"state":{"type":"string"},"city":{"type":"string"},"uule":{"type":"string"},"lat":{"type":"number"},"lng":{"type":"number"},"method":{"type":"string","enum":["exit","exit+geo","params"]},"approximate":{"type":"boolean"},"exitCity":{"type":"string"}},"required":["country","locale","timezone"],"additionalProperties":false},"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"meta":{"type":"object","properties":{"captchaSolves":{"type":"integer","minimum":0,"maximum":9007199254740991},"captchaCostUsd":{"type":"number","minimum":0},"attempts":{"type":"integer","minimum":0,"maximum":9007199254740991},"notes":{"type":"array","items":{"type":"string"}},"analysisCostUsd":{"type":"number","minimum":0},"localization":{"type":"object","properties":{"status":{"type":"string","enum":["ok","mismatch","unknown"]},"answerCountry":{"type":["string","null"]}},"required":["status","answerCountry"],"additionalProperties":false},"countryHint":{"type":"boolean"},"countryHintReason":{"type":"string"},"promptGuard":{"type":"object","properties":{"leadIn":{"type":"boolean","const":true},"reason":{"type":"string","enum":["proactive","after_security_block"]}},"required":["leadIn","reason"],"additionalProperties":false}},"required":["captchaSolves","captchaCostUsd"],"additionalProperties":false}},"required":["engine","text","sources","location","durationMs","meta"],"additionalProperties":false},"GridInput":{"type":"object","properties":{"taskType":{"type":"string","minLength":1,"maxLength":64},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"grid":{"type":"object","properties":{"center":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false},"place":{"type":"string","minLength":1,"maxLength":100},"rows":{"type":"integer","minimum":1,"maximum":9},"cols":{"type":"integer","minimum":1,"maximum":9},"spacingKm":{"type":"number","minimum":0.1,"maximum":50}},"required":["rows","cols","spacingKm"],"additionalProperties":false},"idempotencyKey":{"type":"string","minLength":1,"maxLength":200},"webhookUrl":{"type":"string","maxLength":2048,"format":"uri"},"priority":{"default":0,"type":"integer","minimum":0,"maximum":10}},"required":["taskType","payload","grid"],"additionalProperties":false,"description":"Location grid. taskType one of GOOGLE_PLACES, GOOGLE_AIO, GOOGLE_AIMODE, GOOGLE_SERP, CHATGPT, GEMINI, BING_COPILOT_SEARCH. Each point is a task with payload.location; credits = engine price + 1 per point."},"LatLng":{"type":"object","required":["lat","lng"],"properties":{"lat":{"type":"number"},"lng":{"type":"number"}}},"Grid":{"type":"object","properties":{"id":{"type":"string","pattern":"^grd_"},"taskType":{"$ref":"#/components/schemas/TaskType"},"country":{"type":"string"},"center":{"$ref":"#/components/schemas/LatLng"},"place":{"type":["string","null"]},"rows":{"type":"integer"},"cols":{"type":"integer"},"spacingKm":{"type":"number"},"idempotencyKey":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"created":{"type":"integer","description":"POST only: points created by this request."},"summary":{"type":"object","properties":{"total":{"type":"integer"},"queued":{"type":"integer"},"processing":{"type":"integer"},"completed":{"type":"integer"},"failed":{"type":"integer"}}},"points":{"type":"array","description":"Row by row from the north-west corner.","items":{"type":"object","properties":{"row":{"type":"integer"},"col":{"type":"integer"},"key":{"type":"string","description":"Idempotency key of the point task: <gridId>:r<row>c<col>."},"location":{"$ref":"#/components/schemas/LatLng"},"task":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["QUEUED","PROCESSING","COMPLETED","FAILED"]},"credits":{"type":"number"},"error":{}}},"answer":{"type":["string","null"],"description":"Top places, answer text or top results (finished points)."},"result":{"oneOf":[{"$ref":"#/components/schemas/EngineResult"},{"type":"null"}],"description":"With include=result."}}}}}},"BatchInput":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","minItems":1,"maxItems":10000,"items":{"allOf":[{"$ref":"#/components/schemas/TaskInput"}],"description":"A task request (its own idempotencyKey and webhookUrl allowed) plus an optional customId.","properties":{"customId":{"type":"string","maxLength":200,"description":"Your id for the item, echoed in the item list."}}}},"idempotencyKey":{"type":"string","maxLength":256,"description":"Same key within 30 days returns the first batch (200); older: 409."},"webhookUrl":{"type":"string","format":"uri","description":"Gets batch.completed once, and each item task.completed / task.failed unless the item has its own webhookUrl."},"metadata":{"type":"object","description":"Up to 8 KB of JSON, returned with the batch."}}},"BatchCounts":{"type":"object","properties":{"pending":{"type":"integer"},"queued":{"type":"integer"},"processing":{"type":"integer"},"completed":{"type":"integer"},"failed":{"type":"integer"},"rejected":{"type":"integer"}}},"Batch":{"type":"object","required":["id","status","total","counts","progress","credits","createdAt"],"properties":{"id":{"type":"string","pattern":"^bat_"},"status":{"type":"string","enum":["OPEN","COMPLETED"],"description":"COMPLETED when every item is completed, failed or rejected."},"total":{"type":"integer"},"counts":{"$ref":"#/components/schemas/BatchCounts"},"progress":{"type":"object","properties":{"done":{"type":"integer"},"percent":{"type":"number"}}},"credits":{"type":"object","description":"estimated: every item completing; held: admitted items not finished; charged: completed items; pending: items not admitted yet.","properties":{"estimated":{"type":"number"},"held":{"type":"number"},"charged":{"type":"number"},"pending":{"type":"number"}}},"idempotencyKey":{"type":["string","null"]},"webhookUrl":{"type":["string","null"]},"metadata":{},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"type":["string","null"],"format":"date-time"}}},"BatchItem":{"type":"object","properties":{"index":{"type":"integer"},"customId":{"type":["string","null"]},"taskType":{"$ref":"#/components/schemas/TaskType"},"status":{"type":"string","enum":["pending","queued","processing","completed","failed","rejected"]},"taskId":{"type":["string","null"]},"credits":{"type":"number"},"error":{"description":"Rejected items: INSUFFICIENT_CREDITS, RESOURCE_ALREADY_EXISTS or TASK_CANCELLED; failed items: the task error."},"completedAt":{"type":["string","null"],"format":"date-time"},"task":{"oneOf":[{"$ref":"#/components/schemas/Task"},{"type":"null"}],"description":"With include=result."}}},"QueueStatus":{"type":"object","properties":{"queued":{"type":"integer"},"processing":{"type":"integer"},"pendingBatchItems":{"type":"integer","description":"Batch items not queued yet."},"retrying":{"type":"integer","description":"Queued tasks waiting for a retry."},"concurrency":{"type":"object","properties":{"used":{"type":"integer"},"limit":{"type":"integer"}}},"byPriority":{"type":"array","items":{"type":"object","properties":{"priority":{"type":"integer"},"queued":{"type":"integer"}}}},"byEngine":{"type":"array","items":{"type":"object","properties":{"taskType":{"type":"string"},"queued":{"type":"integer"},"processing":{"type":"integer"}}}},"oldestQueuedAt":{"type":["string","null"],"format":"date-time"}}},"UsState":{"type":"object","required":["code","name"],"properties":{"code":{"type":"string","examples":["TX"]},"name":{"type":"string"},"largestCity":{"type":"string"},"timezone":{"type":"string"}}},"Task":{"type":"object","required":["id","taskType","status","country","credits","createdAt"],"properties":{"id":{"type":"string","pattern":"^tsk_[0-9A-Za-z]{24}$"},"taskType":{"$ref":"#/components/schemas/TaskType"},"status":{"type":"string","enum":["QUEUED","PROCESSING","COMPLETED","FAILED"]},"source":{"type":"string","enum":["api","dashboard","mcp"]},"country":{"type":"string"},"priority":{"type":"integer"},"payload":{"type":"object"},"result":{"oneOf":[{"$ref":"#/components/schemas/EngineResult"},{"type":"null"}]},"error":{"oneOf":[{"type":"object","properties":{"code":{"type":"string","enum":["CAPTCHA_UNSOLVED","SIGNIN_WALL","LOGIN_WALL","BLOCKED","TIMEOUT","NO_ANSWER","PROXY_ERROR","NAVIGATION","UNSUPPORTED","INTERNAL","ACCOUNT_LOGGED_OUT","ENGINE_REFUSED","CONSENT_WALL","AGE_GATE","LOCATION_UNSUPPORTED","NO_PROXY","EXITS_UNAVAILABLE","LEASE_EXPIRED","TASK_CANCELLED","INSUFFICIENT_CREDITS"],"description":"Why the task failed (credits refunded). ENGINE_REFUSED: the AI engine answered with a refusal, an error or a rate-limit notice instead of an answer (short text, es/en/pt/fr/de/it) on every attempt; each attempt goes to another exit. CONSENT_WALL: Google's cookie consent dialog could not be dismissed on any attempt. AGE_GATE: Meta AI's birthday check could not be completed (or no guest session was issued) on any attempt. LOCATION_UNSUPPORTED: Meta AI showed its \"not available in your country\" page on every exit tried for the country."},"message":{"type":"string"}}},{"type":"null"}]},"credits":{"type":"number","description":"Price held/charged for this task, in credits."},"attempts":{"type":"integer"},"maxAttempts":{"type":"integer"},"idempotencyKey":{"type":["string","null"]},"webhookUrl":{"type":["string","null"]},"durationMs":{"type":["integer","null"]},"createdAt":{"type":"string","format":"date-time"},"startedAt":{"type":["string","null"],"format":"date-time"},"completedAt":{"type":["string","null"],"format":"date-time"},"usage":{"oneOf":[{"$ref":"#/components/schemas/TaskUsage"},{"type":"null"}]}}},"TaskUsage":{"type":"object","description":"Metering: bytes the task moved through its exit (every engine; browser engines measured in the page, HTTP engines by response sizes). Null until the first attempt ran.","required":["proxyBytes"],"properties":{"proxyBytes":{"type":"object","required":["total","byType","attempts"],"properties":{"total":{"type":"integer","description":"Bytes over all attempts."},"byType":{"type":"object","additionalProperties":{"type":"integer"},"description":"Bytes by resource type (script, document, fetch, websocket, stylesheet, image, http, other...)."},"attempts":{"type":"array","items":{"type":"object","required":["attempt","exitKind","exitLabel","total","byType","at"],"properties":{"attempt":{"type":"integer"},"exitKind":{"type":"string","enum":["residential","direct","vpn","proxy"]},"exitLabel":{"type":"string","description":"Generic exit label (e.g. resi-1, AR-vpn-bue2, direct-AR)."},"total":{"type":"integer"},"byType":{"type":"object","additionalProperties":{"type":"integer"}},"cachedBytes":{"type":"integer","description":"Static assets served from the local cache (not transferred, not in total)."},"code":{"type":"string","description":"Error code of a failed attempt."},"at":{"type":"string","format":"date-time"}}}}}}}},"ErrorResponse":{"type":"object","required":["success","error"],"properties":{"success":{"const":false},"error":{"type":"object","required":["code","message","timestamp"],"properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","MISSING_API_KEY","INVALID_API_KEY","INSUFFICIENT_CREDITS","FORBIDDEN","RESOURCE_NOT_FOUND","RESOURCE_ALREADY_EXISTS","LOCATION_UNSUPPORTED","REGION_UNSUPPORTED","EVIDENCE_UNSUPPORTED","ENGINE_UNAVAILABLE","QUEUE_LIMIT_EXCEEDED","INTERNAL_ERROR","GOOGLE_REDIRECT_UNRESOLVED"]},"message":{"type":"string"},"details":{},"timestamp":{"type":"string","format":"date-time"}}}}}}},"paths":{"/v1/async/task":{"post":{"operationId":"submitTask","summary":"Queue a task","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskInput"}}}},"responses":{"200":{"description":"Existing task for this idempotency key","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"$ref":"#/components/schemas/Task"}}}}}},"201":{"description":"Task accepted","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"$ref":"#/components/schemas/Task"}}}}}},"400":{"description":"Error (400)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error (401)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Error (402)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error (409)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Error (422)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error (429)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/async/task/batch":{"post":{"operationId":"submitBatch","summary":"Queue up to 500 tasks atomically","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["tasks"],"properties":{"tasks":{"type":"array","minItems":1,"maxItems":500,"items":{"$ref":"#/components/schemas/TaskInput"}}}}}}},"responses":{"201":{"description":"Tasks accepted","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"type":"object","properties":{"tasks":{"type":"array","items":{"$ref":"#/components/schemas/Task"}},"created":{"type":"integer"}}}}}}}},"400":{"description":"Error (400)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error (401)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Error (402)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error (409)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Error (422)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error (429)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/async/task/{id}":{"get":{"operationId":"getTask","summary":"Get a task and its result","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Task","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"$ref":"#/components/schemas/Task"}}}}}},"401":{"description":"Error (401)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error (404)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/sync/task":{"post":{"operationId":"runTask","summary":"Queue a task and wait for it (up to 290 s)","description":"Same body, checks and price as POST /v1/async/task. Holds the request up to SYNC_TIMEOUT_MS (default and max 290 s) or `Prefer: wait=<seconds>` (0 = answer at once). Not finished by then: 202 with the task and `Location: /v1/async/task/{id}`; it keeps running and is charged as usual. A repeated idempotencyKey waits on the task that holds the key. `Accept: text/html` with payload.include.html answers the saved page of a completed task (X-Task-Id header); without include.html it is refused (400) before a task is created.","parameters":[{"name":"Prefer","in":"header","required":false,"schema":{"type":"string","examples":["wait=120"]}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string","enum":["application/json","text/html"]}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskInput"}}}},"responses":{"200":{"description":"Finished task (COMPLETED or FAILED)","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"$ref":"#/components/schemas/Task"}}}}}},"202":{"description":"Still running; poll the Location (GET /v1/async/task/{id})","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"$ref":"#/components/schemas/Task"}}}}}},"400":{"description":"Error (400)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error (401)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Error (402)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error (409)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Error (422)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error (429)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/async/task/grid":{"post":{"operationId":"createGrid","summary":"Ask one prompt from every point of a location grid (up to 9 x 9)","description":"Validation, engine status, country and credits are checked for the whole grid first; then every point is queued as a task with payload.location. Sending the same grid again with the same idempotencyKey only creates the missing points.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GridInput"}}}},"responses":{"200":{"description":"Every point existed already","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"$ref":"#/components/schemas/Grid"}}}}}},"201":{"description":"Grid created (points queued)","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"$ref":"#/components/schemas/Grid"}}}}}},"400":{"description":"Error (400)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error (401)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Error (402)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error (409)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Error (422)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error (429)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/async/task/grid/{id}":{"get":{"operationId":"getGrid","summary":"Get a location grid with its points","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"include","in":"query","schema":{"type":"string","enum":["result"]}}],"responses":{"200":{"description":"Grid","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"$ref":"#/components/schemas/Grid"}}}}}},"401":{"description":"Error (401)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error (404)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/states":{"get":{"operationId":"listStates","summary":"US states accepted by payload.state (other countries: empty)","security":[],"parameters":[{"name":"country","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z]{2}$"}}],"responses":{"200":{"description":"States, by name","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/UsState"}}}}}}},"400":{"description":"Error (400)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/tasks":{"get":{"operationId":"listTasks","summary":"List tasks, newest first","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"engine","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string","enum":["QUEUED","PROCESSING","COMPLETED","FAILED"]}},{"name":"includeResult","in":"query","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Page of tasks","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Task"}},"nextCursor":{"type":["string","null"]}}}}}}}},"400":{"description":"Error (400)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error (401)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/credits":{"get":{"operationId":"getCredits","summary":"Credit balance","responses":{"200":{"description":"Balance in credits","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"type":"object","properties":{"available":{"type":"number"},"held":{"type":"number"},"used":{"type":"number"},"granted":{"type":"number"},"availableMilli":{"type":"integer"}}}}}}}},"401":{"description":"Error (401)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/usage":{"get":{"operationId":"getUsage","summary":"Usage per UTC day and engine","parameters":[{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Usage rows","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"type":"object"}}}}}},"400":{"description":"Error (400)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error (401)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/capabilities":{"get":{"operationId":"getCapabilities","summary":"Engines: taskType, aliases, status + note, credits, input fields (required / optional / include), countries policy, location flags, evidence","responses":{"200":{"description":"Capabilities","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"type":"object"}}}}}},"401":{"description":"Error (401)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/countries":{"get":{"operationId":"listCountries","summary":"Countries (all ISO codes) with locale data and exit; with taskType only those the engine accepts","parameters":[{"name":"taskType","in":"query","schema":{"type":"string"},"description":"Engine; aliases accepted."},{"name":"model","in":"query","schema":{"type":"string"},"description":"Alias of taskType."}],"responses":{"200":{"description":"Countries","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"Error (401)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/batches":{"post":{"operationId":"createBatch","summary":"Create a batch of up to 10,000 tasks","description":"Every item is validated first; one invalid item refuses the batch (400, or the shared 4xx code) with details.items (index, code, message; up to 50) and nothing is stored. Items are stored pending and queued as room frees up: each account keeps at most a window of batch tasks queued or running (2 x its concurrency limit by default), accounts and batches take turns, and your single tasks run before your queued batch tasks of the same priority. Credits are held per item when it is queued; an item the account cannot pay for at that moment is rejected with INSUFFICIENT_CREDITS (no task, nothing held). When every item is finished the batch is COMPLETED and webhookUrl gets `{\"event\":\"batch.completed\",\"data\":<Batch>}`, signed like task webhooks over `<batchId>.<timestamp>.<body>` with plinda-webhook-id `batch_<id>`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchInput"}}}},"responses":{"200":{"description":"Batch created earlier with this idempotencyKey (last 30 days), unchanged","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"$ref":"#/components/schemas/Batch"}}}}}},"202":{"description":"Batch stored; items are queued as room frees up","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"$ref":"#/components/schemas/Batch"}}}}}},"400":{"description":"Error (400)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error (401)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error (409)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Error (422)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Error (503)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"operationId":"listBatches","summary":"Recent batches, newest first","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"Batches","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Batch"}}}}}}}}},"401":{"description":"Error (401)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/batches/{id}":{"get":{"operationId":"getBatch","summary":"Batch progress: counts by status, credits held and charged","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Batch","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"$ref":"#/components/schemas/Batch"}}}}}},"401":{"description":"Error (401)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error (404)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/batches/{id}/items":{"get":{"operationId":"listBatchItems","summary":"Batch items in submission order, a page at a time","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"nextCursor of the previous page."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":1000},"description":"Default 100 (max 1,000); with include=result default 20 (max 100)."},{"name":"status","in":"query","schema":{"type":"string","enum":["pending","queued","processing","completed","failed","rejected"]}},{"name":"include","in":"query","schema":{"type":"string","enum":["result"]}}],"responses":{"200":{"description":"Items","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BatchItem"}},"nextCursor":{"type":["string","null"]}}}}}}}},"400":{"description":"Error (400)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error (401)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error (404)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/google/goto":{"post":{"operationId":"resolveGoogleRedirect","summary":"Resolve a Google redirect link to the page it leads to (no credits)","description":"Accepts google.com/goto?url=... (absolute or /goto?url=...) and /url?q=... links. /url links decode without a request; /goto links are requested and the answer is cached for 7 days. Google not answering in time: 502 GOOGLE_REDIRECT_UNRESOLVED with Retry-After when known.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string"}}}}}},"responses":{"200":{"description":"Final URL","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"type":"object","properties":{"url":{"type":"string"},"source":{"type":"string"},"cached":{"type":"boolean"},"method":{"type":"string","enum":["decoded","cache","request"]}}}}}}}},"400":{"description":"Error (400)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error (401)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Error (502)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"operationId":"resolveGoogleRedirectGet","summary":"Same as POST, with ?url=","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Final URL","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"type":"object"}}}}}},"400":{"description":"Error (400)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error (401)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Error (502)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/async/status":{"get":{"operationId":"getQueueStatus","summary":"Your queue: queued and processing tasks, pending batch items, concurrency used and limit","responses":{"200":{"description":"Queue status","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"$ref":"#/components/schemas/QueueStatus"}}}}}},"401":{"description":"Error (401)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/async/queue":{"delete":{"operationId":"clearQueue","summary":"Cancel your queued tasks and pending batch items","description":"Each queued task ends FAILED with TASK_CANCELLED, its held credits are released and its webhook is sent. Running tasks keep running. Works for up to 20 s per call; `queued` is what is still waiting (call again while above 0).","responses":{"200":{"description":"Cancelled","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"type":"object","properties":{"cancelled":{"type":"integer"},"batchItemsCancelled":{"type":"integer"},"creditsReleased":{"type":"number"},"queued":{"type":"integer"}}}}}}}},"401":{"description":"Error (401)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/stats":{"get":{"operationId":"getStats","summary":"Your task counts by status and engine for a window","parameters":[{"name":"hours","in":"query","schema":{"type":"integer","minimum":1,"maximum":720,"default":24}},{"name":"from","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Stats","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"type":"object"}}}}}},"400":{"description":"Error (400)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error (401)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/capacity":{"get":{"operationId":"getCapacity","summary":"Serving capacity per engine: status, mode (guest / accounts), queue depth, workers, usable accounts, exits up","description":"exits.breakers[].provider is a generic exit pool label: `vpn` when there is one pool, `pool-1`, `pool-2`, ... when there are several (stable for a given set of pools). It is not a vendor name.","responses":{"200":{"description":"Capacity","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true},"data":{"type":"object"}}}}}},"401":{"description":"Error (401)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/evidence/{id}":{"get":{"operationId":"getEvidencePage","summary":"Saved evidence page of a task (include.html; CHATGPT, GEMINI, PERPLEXITY, COPILOT, BING_COPILOT_SEARCH, META_AI, GOOGLE_AIO, GOOGLE_AIMODE, GOOGLE_SERP)","description":"Public (no API key; the id is unguessable) until it expires (EVIDENCE_RETENTION_DAYS, default 30). Served with a CSP that blocks scripts, and X-Robots-Tag noindex.","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^ev[0-9A-Za-z]{32}$"}}],"responses":{"200":{"description":"The page","content":{"text/html":{"schema":{"type":"string"}}}},"404":{"description":"Unknown or expired"}}}},"/openapi.json":{"get":{"operationId":"openapi","security":[],"summary":"This document","responses":{"200":{"description":"OpenAPI 3.1"}}}},"/health":{"get":{"operationId":"health","security":[],"responses":{"200":{"description":"Process is up"}}}},"/ready":{"get":{"operationId":"ready","security":[],"responses":{"200":{"description":"Database reachable"},"503":{"description":"Not ready"}}}}}}