[{"data":1,"prerenderedAt":1002},["ShallowReactive",2],{"navigation_docs":3,"-docs-responses-and-errors":102,"-docs-responses-and-errors-surround":997},[4,8,12,16,20,24,28,32,36,40,44,82,86,90,94,98],{"title":5,"path":6,"stem":7},"Overview","\u002Fdocs","docs\u002Findex",{"title":9,"path":10,"stem":11},"Quickstart","\u002Fdocs\u002Fquickstart","docs\u002F01.quickstart",{"title":13,"path":14,"stem":15},"Authentication and keys","\u002Fdocs\u002Fauthentication","docs\u002F02.authentication",{"title":17,"path":18,"stem":19},"Images","\u002Fdocs\u002Fimages","docs\u002F03.images",{"title":21,"path":22,"stem":23},"Texts","\u002Fdocs\u002Ftexts","docs\u002F04.texts",{"title":25,"path":26,"stem":27},"Migrating from SightEngine","\u002Fdocs\u002Fmigrating-from-sightengine","docs\u002F05.migrating-from-sightengine",{"title":29,"path":30,"stem":31},"Workflows","\u002Fdocs\u002Fworkflows","docs\u002F06.workflows",{"title":33,"path":34,"stem":35},"Responses and errors","\u002Fdocs\u002Fresponses-and-errors","docs\u002F07.responses-and-errors",{"title":37,"path":38,"stem":39},"Limits and quotas","\u002Fdocs\u002Flimits-and-quotas","docs\u002F08.limits-and-quotas",{"title":41,"path":42,"stem":43},"The journal and ref","\u002Fdocs\u002Fjournal-and-ref","docs\u002F09.journal-and-ref",{"title":45,"path":46,"stem":47,"children":48,"page":81},"Integration guides","\u002Fdocs\u002Fintegration-guides","docs\u002F10.integration-guides",[49,53,57,61,65,69,73,77],{"title":50,"path":51,"stem":52},"Node.js and TypeScript","\u002Fdocs\u002Fintegration-guides\u002Fnodejs","docs\u002F10.integration-guides\u002F1.nodejs",{"title":54,"path":55,"stem":56},"Python","\u002Fdocs\u002Fintegration-guides\u002Fpython","docs\u002F10.integration-guides\u002F2.python",{"title":58,"path":59,"stem":60},"PHP","\u002Fdocs\u002Fintegration-guides\u002Fphp","docs\u002F10.integration-guides\u002F3.php",{"title":62,"path":63,"stem":64},"Go","\u002Fdocs\u002Fintegration-guides\u002Fgo","docs\u002F10.integration-guides\u002F4.go",{"title":66,"path":67,"stem":68},"Supabase Edge Functions","\u002Fdocs\u002Fintegration-guides\u002Fsupabase-edge-functions","docs\u002F10.integration-guides\u002F5.supabase-edge-functions",{"title":70,"path":71,"stem":72},"Cloudflare Workers","\u002Fdocs\u002Fintegration-guides\u002Fcloudflare-workers","docs\u002F10.integration-guides\u002F6.cloudflare-workers",{"title":74,"path":75,"stem":76},"Nuxt and Next","\u002Fdocs\u002Fintegration-guides\u002Fnuxt-and-next","docs\u002F10.integration-guides\u002F7.nuxt-and-next",{"title":78,"path":79,"stem":80},"Moderate an AI agent","\u002Fdocs\u002Fintegration-guides\u002Fmoderate-ai-agents","docs\u002F10.integration-guides\u002F8.moderate-ai-agents",false,{"title":83,"path":84,"stem":85},"AI coding agents","\u002Fdocs\u002Fai-agents","docs\u002F11.ai-agents",{"title":87,"path":88,"stem":89},"Best practices","\u002Fdocs\u002Fbest-practices","docs\u002F12.best-practices",{"title":91,"path":92,"stem":93},"Privacy and data","\u002Fdocs\u002Fprivacy-and-data","docs\u002F13.privacy-and-data",{"title":95,"path":96,"stem":97},"API reference","\u002Fdocs\u002Fapi-reference","docs\u002F14.api-reference",{"title":99,"path":100,"stem":101},"Changelog","\u002Fdocs\u002Fchangelog","docs\u002F15.changelog",{"id":103,"title":33,"body":104,"description":990,"extension":991,"links":992,"meta":993,"navigation":994,"path":34,"seo":995,"stem":35,"__hash__":996},"docs\u002Fdocs\u002F07.responses-and-errors.md",{"type":105,"value":106,"toc":984},"minimark",[107,112,121,316,327,406,418,422,425,556,571,844,848,888,892,980],[108,109,111],"h2",{"id":110},"a-successful-answer","A successful answer",[113,114,115,116,120],"p",{},"A check answers ",[117,118,119],"code",{},"200"," with this JSON. Every plan gets every field.",[122,123,124,140],"table",{},[125,126,127],"thead",{},[128,129,130,134,137],"tr",{},[131,132,133],"th",{},"Field",[131,135,136],{},"Type",[131,138,139],{},"Description",[141,142,143,161,173,186,208,221,234,246,259,271,283,303],"tbody",{},[128,144,145,151,154],{},[146,147,148],"td",{},[117,149,150],{},"status",[146,152,153],{},"string",[146,155,156,157,160],{},"Always ",[117,158,159],{},"success",".",[128,162,163,168,170],{},[146,164,165],{},[117,166,167],{},"workflow",[146,169,153],{},[146,171,172],{},"The workflow the content was checked against.",[128,174,175,180,183],{},[146,176,177],{},[117,178,179],{},"workflow_version",[146,181,182],{},"integer",[146,184,185],{},"The version of the workflow that decided.",[128,187,188,193,195],{},[146,189,190],{},[117,191,192],{},"summary.action",[146,194,153],{},[146,196,197,200,201,204,205,160],{},[117,198,199],{},"reject"," when a reject threshold is reached, else ",[117,202,203],{},"review"," when a review threshold is, else ",[117,206,207],{},"accept",[128,209,210,215,218],{},[146,211,212],{},[117,213,214],{},"summary.reject_prob",[146,216,217],{},"number",[146,219,220],{},"The highest score among the rejected categories, 0 when none is.",[128,222,223,228,231],{},[146,224,225],{},[117,226,227],{},"summary.reject_reason",[146,229,230],{},"array",[146,232,233],{},"Why the content is rejected, highest score first.",[128,235,236,241,243],{},[146,237,238],{},[117,239,240],{},"summary.review_reason",[146,242,230],{},[146,244,245],{},"Why the content goes to review, highest score first.",[128,247,248,253,256],{},[146,249,250],{},[117,251,252],{},"scores",[146,254,255],{},"object",[146,257,258],{},"The best score per category the workflow checks, from 0 to 1.",[128,260,261,266,268],{},[146,262,263],{},[117,264,265],{},"unchecked",[146,267,230],{},[146,269,270],{},"The categories of the workflow this server could not check. Absent when every one was checked.",[128,272,273,278,280],{},[146,274,275],{},[117,276,277],{},"time_ms",[146,279,182],{},[146,281,282],{},"The time spent checking, in milliseconds.",[128,284,285,290,292],{},[146,286,287],{},[117,288,289],{},"request_id",[146,291,153],{},[146,293,294,295,298,299,160],{},"The id of this request, also in ",[117,296,297],{},"X-Request-Id"," and in the ",[300,301,302],"a",{"href":42},"journal",[128,304,305,310,313],{},[146,306,307],{},[117,308,309],{},"ref",[146,311,312],{},"string or null",[146,314,315],{},"Your own id for the content, as you sent it.",[113,317,318,319,322,323,326],{},"A reason in ",[117,320,321],{},"reject_reason"," or ",[117,324,325],{},"review_reason"," has:",[122,328,329,337],{},[125,330,331],{},[128,332,333,335],{},[131,334,133],{},[131,336,139],{},[141,338,339,356,366,376,386,396],{},[128,340,341,346],{},[146,342,343],{},[117,344,345],{},"id",[146,347,348,349,322,352,355],{},"The category id, such as ",[117,350,351],{},"nudity",[117,353,354],{},"pii_iban",". It is stable: map it to your own messages.",[128,357,358,363],{},[146,359,360],{},[117,361,362],{},"text",[146,364,365],{},"A short English title.",[128,367,368,373],{},[146,369,370],{},[117,371,372],{},"message",[146,374,375],{},"A full English sentence that can be shown to a user.",[128,377,378,383],{},[146,379,380],{},[117,381,382],{},"score",[146,384,385],{},"The score the category got.",[128,387,388,393],{},[146,389,390],{},[117,391,392],{},"threshold",[146,394,395],{},"The threshold it reached.",[128,397,398,403],{},[146,399,400],{},[117,401,402],{},"source",[146,404,405],{},"The tool that produced the score.",[407,408,409,410,412,413,322,415,417],"tip",{},"Match on ",[117,411,345],{},", never on ",[117,414,362],{},[117,416,372],{},". They are English defaults and may be reworded.",[108,419,421],{"id":420},"errors","Errors",[113,423,424],{},"An error answers with the HTTP status and this envelope:",[426,427,432],"pre",{"className":428,"code":429,"language":430,"meta":431,"style":431},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"status\": \"failure\",\n  \"error\": {\n    \"type\": \"unsupported_media\",\n    \"code\": 415,\n    \"message\": \"The file is not a JPEG, PNG, WebP or GIF image.\"\n  }\n}\n","json","",[117,433,434,443,470,485,508,525,544,550],{"__ignoreMap":431},[435,436,439],"span",{"class":437,"line":438},"line",1,[435,440,442],{"class":441},"sMK4o","{\n",[435,444,446,449,452,455,458,461,465,467],{"class":437,"line":445},2,[435,447,448],{"class":441},"  \"",[435,450,150],{"class":451},"spNyl",[435,453,454],{"class":441},"\"",[435,456,457],{"class":441},":",[435,459,460],{"class":441}," \"",[435,462,464],{"class":463},"sfazB","failure",[435,466,454],{"class":441},[435,468,469],{"class":441},",\n",[435,471,473,475,478,480,482],{"class":437,"line":472},3,[435,474,448],{"class":441},[435,476,477],{"class":451},"error",[435,479,454],{"class":441},[435,481,457],{"class":441},[435,483,484],{"class":441}," {\n",[435,486,488,491,495,497,499,501,504,506],{"class":437,"line":487},4,[435,489,490],{"class":441},"    \"",[435,492,494],{"class":493},"sBMFI","type",[435,496,454],{"class":441},[435,498,457],{"class":441},[435,500,460],{"class":441},[435,502,503],{"class":463},"unsupported_media",[435,505,454],{"class":441},[435,507,469],{"class":441},[435,509,511,513,515,517,519,523],{"class":437,"line":510},5,[435,512,490],{"class":441},[435,514,117],{"class":493},[435,516,454],{"class":441},[435,518,457],{"class":441},[435,520,522],{"class":521},"sbssI"," 415",[435,524,469],{"class":441},[435,526,528,530,532,534,536,538,541],{"class":437,"line":527},6,[435,529,490],{"class":441},[435,531,372],{"class":493},[435,533,454],{"class":441},[435,535,457],{"class":441},[435,537,460],{"class":441},[435,539,540],{"class":463},"The file is not a JPEG, PNG, WebP or GIF image.",[435,542,543],{"class":441},"\"\n",[435,545,547],{"class":437,"line":546},7,[435,548,549],{"class":441},"  }\n",[435,551,553],{"class":437,"line":552},8,[435,554,555],{"class":441},"}\n",[113,557,558,559,562,563,566,567,570],{},"Switch on ",[117,560,561],{},"error.type",": it is stable. ",[117,564,565],{},"error.code"," repeats the HTTP status, and ",[117,568,569],{},"error.message"," is English text for you, not for your users.",[122,572,573,587],{},[125,574,575],{},[128,576,577,581,584],{},[131,578,579],{},[117,580,561],{},[131,582,583],{},"Status",[131,585,586],{},"When",[141,588,589,602,615,631,650,662,674,690,705,718,730,742,759,773,788,801,814,828],{},[128,590,591,596,599],{},[146,592,593],{},[117,594,595],{},"unauthorized",[146,597,598],{},"401",[146,600,601],{},"The key is missing, malformed, invalid, revoked or expired.",[128,603,604,609,612],{},[146,605,606],{},[117,607,608],{},"forbidden",[146,610,611],{},"403",[146,613,614],{},"The key may not check this kind of content or use this workflow, or the request came from a browser.",[128,616,617,622,624],{},[146,618,619],{},[117,620,621],{},"organization_suspended",[146,623,611],{},[146,625,626,627,160],{},"An operator suspended the organization. Write to ",[300,628,630],{"href":629},"mailto:contact@sway.events","contact@sway.events",[128,632,633,638,641],{},[146,634,635],{},[117,636,637],{},"bad_request",[146,639,640],{},"400",[146,642,643,644,646,647,649],{},"An empty body, a text that is not JSON or has no ",[117,645,362],{},", a refused ",[117,648,309],{},", or a form that lacks a field.",[128,651,652,657,659],{},[146,653,654],{},[117,655,656],{},"unknown_workflow",[146,658,640],{},[146,660,661],{},"There is no workflow of that name.",[128,663,664,669,671],{},[146,665,666],{},[117,667,668],{},"corrupt_media",[146,670,640],{},[146,672,673],{},"The file does not decode.",[128,675,676,681,683],{},[146,677,678],{},[117,679,680],{},"url_refused",[146,682,640],{},[146,684,685,686,689],{},"The ",[117,687,688],{},"url"," of an image is not public, too large, too slow or not an image.",[128,691,692,696,699],{},[146,693,694],{},[117,695,503],{},[146,697,698],{},"415",[146,700,701,702,160],{},"Not a JPEG, PNG, WebP or GIF image, or a text sent without ",[117,703,704],{},"Content-Type: application\u002Fjson",[128,706,707,712,715],{},[146,708,709],{},[117,710,711],{},"body_too_large",[146,713,714],{},"413",[146,716,717],{},"A request body over 15 MB.",[128,719,720,725,727],{},[146,721,722],{},[117,723,724],{},"image_too_large",[146,726,714],{},[146,728,729],{},"More than 50 megapixels (12 on the free plan), or a side over 16,384 pixels.",[128,731,732,737,739],{},[146,733,734],{},[117,735,736],{},"text_too_long",[146,738,714],{},[146,740,741],{},"More than 20,000 characters (5,000 on the free plan).",[128,743,744,749,752],{},[146,745,746],{},[117,747,748],{},"rate_limited",[146,750,751],{},"429",[146,753,754,755,758],{},"Too many requests: wait ",[117,756,757],{},"Retry-After"," seconds.",[128,760,761,766,768],{},[146,762,763],{},[117,764,765],{},"too_many_concurrent",[146,767,751],{},[146,769,770,771,758],{},"Too many checks at once: wait ",[117,772,757],{},[128,774,775,780,782],{},[146,776,777],{},[117,778,779],{},"quota_exceeded",[146,781,751],{},[146,783,784,785,160],{},"The free plan's included checks are used, or the spending cap is reached. See ",[300,786,787],{"href":38},"limits and quotas",[128,789,790,795,798],{},[146,791,792],{},[117,793,794],{},"request_timeout",[146,796,797],{},"408",[146,799,800],{},"A SightEngine-compatible form took more than 10 seconds to arrive.",[128,802,803,808,811],{},[146,804,805],{},[117,806,807],{},"workflow_unavailable",[146,809,810],{},"503",[146,812,813],{},"The workflow has no rule for this kind of content, or none this server can check.",[128,815,816,821,823],{},[146,817,818],{},[117,819,820],{},"busy",[146,822,810],{},[146,824,825,826,160],{},"The server is busy, or the share of it the free plans use is: retry after ",[117,827,757],{},[128,829,830,835,838],{},[146,831,832],{},[117,833,834],{},"internal",[146,836,837],{},"500",[146,839,840,841,843],{},"A bug on our side. Quote the ",[117,842,289],{}," when you write to us.",[108,845,847],{"id":846},"what-to-do-with-an-error","What to do with an error",[849,850,851,859,865,870,878],"ul",{},[852,853,854,858],"li",{},[855,856,857],"strong",{},"400, 413, 415",": the request is wrong or the content cannot be accepted. Do not retry; refuse the content or fix the call.",[852,860,861,864],{},[855,862,863],{},"401, 403",": a configuration problem. Log it, without the key, and alert your team.",[852,866,867,869],{},[855,868,797],{},": send the form again once, from a faster connection if you can.",[852,871,872,877],{},[855,873,874,875],{},"429, 503 with ",[117,876,757],{},": wait that many seconds, and retry at most twice.",[852,879,880,883,884,887],{},[855,881,882],{},"500, a timeout or a network error",": fail closed, as ",[300,885,886],{"href":88},"best practices"," explains.",[108,889,891],{"id":890},"headers-on-every-response","Headers on every response",[122,893,894,903],{},[125,895,896],{},[128,897,898,901],{},[131,899,900],{},"Header",[131,902,139],{},[141,904,905,914,924,934,944,954,966],{},[128,906,907,911],{},[146,908,909],{},[117,910,297],{},[146,912,913],{},"The id of the request. Quote it in a support message.",[128,915,916,921],{},[146,917,918],{},[117,919,920],{},"RateLimit-Limit",[146,922,923],{},"The burst size of your plan: how many requests the bucket holds.",[128,925,926,931],{},[146,927,928],{},[117,929,930],{},"RateLimit-Remaining",[146,932,933],{},"How many requests are left in the bucket.",[128,935,936,941],{},[146,937,938],{},[117,939,940],{},"RateLimit-Reset",[146,942,943],{},"Seconds until the bucket is full again.",[128,945,946,951],{},[146,947,948],{},[117,949,950],{},"X-Quota-Used",[146,952,953],{},"Checks counted in the current period.",[128,955,956,961],{},[146,957,958],{},[117,959,960],{},"X-Quota-Limit",[146,962,963,964,160],{},"Checks the period allows before ",[117,965,779],{},[128,967,968,972],{},[146,969,970],{},[117,971,757],{},[146,973,974,975,977,978,160],{},"Seconds to wait, on ",[117,976,751],{}," and ",[117,979,810],{},[981,982,983],"style",{},"html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":431,"searchDepth":445,"depth":445,"links":985},[986,987,988,989],{"id":110,"depth":445,"text":111},{"id":420,"depth":445,"text":421},{"id":846,"depth":445,"text":847},{"id":890,"depth":445,"text":891},"Every field of an answer, the error envelope with its types, and the headers on every response.","md",null,{},true,{"title":33,"description":990},"kmO1feNFq-VM-gJm-9cz2gTQ0RYZ7szMPKN5WZ_dfgE",[998,1000],{"title":29,"path":30,"stem":31,"description":999,"children":-1},"A workflow decides which categories are checked and how strictly, with thresholds, custom categories and versions.",{"title":37,"path":38,"stem":39,"description":1001,"children":-1},"What each plan includes, how fast you may call the API, and what happens when a limit is reached.",1792436179911]