[{"data":1,"prerenderedAt":1083},["ShallowReactive",2],{"navigation_docs":3,"-docs-responses-and-errors":114,"-docs-responses-and-errors-surround":1078},[4,8,12,16,20,24,28,32,36,40,44,82,86,90,94,98,102,106,110],{"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},"Fraud prevention","\u002Fdocs\u002Ffraud-prevention","docs\u002F16.fraud-prevention",{"title":103,"path":104,"stem":105},"Device token and challenges","\u002Fdocs\u002Fdevice-and-challenges","docs\u002F17.device-and-challenges",{"title":107,"path":108,"stem":109},"MCP server","\u002Fdocs\u002Fmcp-server","docs\u002F18.mcp-server",{"title":111,"path":112,"stem":113},"Changelog","\u002Fdocs\u002Fchangelog","docs\u002F99.changelog",{"id":115,"title":33,"body":116,"description":1071,"extension":1072,"links":1073,"meta":1074,"navigation":1075,"path":34,"seo":1076,"stem":35,"__hash__":1077},"docs\u002Fdocs\u002F07.responses-and-errors.md",{"type":117,"value":118,"toc":1065},"minimark",[119,124,133,328,339,408,420,424,427,558,573,905,925,929,969,973,1061],[120,121,123],"h2",{"id":122},"a-successful-answer","A successful answer",[125,126,127,128,132],"p",{},"A check answers ",[129,130,131],"code",{},"200"," with this JSON. Every plan gets every field.",[134,135,136,152],"table",{},[137,138,139],"thead",{},[140,141,142,146,149],"tr",{},[143,144,145],"th",{},"Field",[143,147,148],{},"Type",[143,150,151],{},"Description",[153,154,155,173,185,198,220,233,246,258,271,283,295,315],"tbody",{},[140,156,157,163,166],{},[158,159,160],"td",{},[129,161,162],{},"status",[158,164,165],{},"string",[158,167,168,169,172],{},"Always ",[129,170,171],{},"success",".",[140,174,175,180,182],{},[158,176,177],{},[129,178,179],{},"workflow",[158,181,165],{},[158,183,184],{},"The workflow the content was checked against.",[140,186,187,192,195],{},[158,188,189],{},[129,190,191],{},"workflow_version",[158,193,194],{},"integer",[158,196,197],{},"The version of the workflow that decided.",[140,199,200,205,207],{},[158,201,202],{},[129,203,204],{},"summary.action",[158,206,165],{},[158,208,209,212,213,216,217,172],{},[129,210,211],{},"reject"," when a reject threshold is reached, else ",[129,214,215],{},"review"," when a review threshold is, else ",[129,218,219],{},"accept",[140,221,222,227,230],{},[158,223,224],{},[129,225,226],{},"summary.reject_prob",[158,228,229],{},"number",[158,231,232],{},"The highest score among the rejected categories, 0 when none is.",[140,234,235,240,243],{},[158,236,237],{},[129,238,239],{},"summary.reject_reason",[158,241,242],{},"array",[158,244,245],{},"Why the content is rejected, highest score first.",[140,247,248,253,255],{},[158,249,250],{},[129,251,252],{},"summary.review_reason",[158,254,242],{},[158,256,257],{},"Why the content goes to review, highest score first.",[140,259,260,265,268],{},[158,261,262],{},[129,263,264],{},"scores",[158,266,267],{},"object",[158,269,270],{},"The best score per category the workflow checks, from 0 to 1.",[140,272,273,278,280],{},[158,274,275],{},[129,276,277],{},"unchecked",[158,279,242],{},[158,281,282],{},"The categories of the workflow this server could not check. Absent when every one was checked.",[140,284,285,290,292],{},[158,286,287],{},[129,288,289],{},"time_ms",[158,291,194],{},[158,293,294],{},"The time spent checking, in milliseconds.",[140,296,297,302,304],{},[158,298,299],{},[129,300,301],{},"request_id",[158,303,165],{},[158,305,306,307,310,311,172],{},"The id of this request, also in ",[129,308,309],{},"X-Request-Id"," and in the ",[312,313,314],"a",{"href":42},"journal",[140,316,317,322,325],{},[158,318,319],{},[129,320,321],{},"ref",[158,323,324],{},"string or null",[158,326,327],{},"Your own id for the content, as you sent it.",[125,329,330,331,334,335,338],{},"A reason in ",[129,332,333],{},"reject_reason"," or ",[129,336,337],{},"review_reason"," has:",[134,340,341,349],{},[137,342,343],{},[140,344,345,347],{},[143,346,145],{},[143,348,151],{},[153,350,351,368,378,388,398],{},[140,352,353,358],{},[158,354,355],{},[129,356,357],{},"id",[158,359,360,361,334,364,367],{},"The category id, such as ",[129,362,363],{},"nudity",[129,365,366],{},"pii_iban",". It is stable: map it to your own messages.",[140,369,370,375],{},[158,371,372],{},[129,373,374],{},"text",[158,376,377],{},"A short English title.",[140,379,380,385],{},[158,381,382],{},[129,383,384],{},"message",[158,386,387],{},"A full English sentence that can be shown to a user.",[140,389,390,395],{},[158,391,392],{},[129,393,394],{},"score",[158,396,397],{},"The score the category got.",[140,399,400,405],{},[158,401,402],{},[129,403,404],{},"threshold",[158,406,407],{},"The threshold it reached.",[409,410,411,412,414,415,334,417,419],"tip",{},"Match on ",[129,413,357],{},", never on ",[129,416,374],{},[129,418,384],{},". They are English defaults and may be reworded.",[120,421,423],{"id":422},"errors","Errors",[125,425,426],{},"An error answers with the HTTP status and this envelope:",[428,429,434],"pre",{"className":430,"code":431,"language":432,"meta":433,"style":433},"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","",[129,435,436,445,472,487,510,527,546,552],{"__ignoreMap":433},[437,438,441],"span",{"class":439,"line":440},"line",1,[437,442,444],{"class":443},"sMK4o","{\n",[437,446,448,451,454,457,460,463,467,469],{"class":439,"line":447},2,[437,449,450],{"class":443},"  \"",[437,452,162],{"class":453},"spNyl",[437,455,456],{"class":443},"\"",[437,458,459],{"class":443},":",[437,461,462],{"class":443}," \"",[437,464,466],{"class":465},"sfazB","failure",[437,468,456],{"class":443},[437,470,471],{"class":443},",\n",[437,473,475,477,480,482,484],{"class":439,"line":474},3,[437,476,450],{"class":443},[437,478,479],{"class":453},"error",[437,481,456],{"class":443},[437,483,459],{"class":443},[437,485,486],{"class":443}," {\n",[437,488,490,493,497,499,501,503,506,508],{"class":439,"line":489},4,[437,491,492],{"class":443},"    \"",[437,494,496],{"class":495},"sBMFI","type",[437,498,456],{"class":443},[437,500,459],{"class":443},[437,502,462],{"class":443},[437,504,505],{"class":465},"unsupported_media",[437,507,456],{"class":443},[437,509,471],{"class":443},[437,511,513,515,517,519,521,525],{"class":439,"line":512},5,[437,514,492],{"class":443},[437,516,129],{"class":495},[437,518,456],{"class":443},[437,520,459],{"class":443},[437,522,524],{"class":523},"sbssI"," 415",[437,526,471],{"class":443},[437,528,530,532,534,536,538,540,543],{"class":439,"line":529},6,[437,531,492],{"class":443},[437,533,384],{"class":495},[437,535,456],{"class":443},[437,537,459],{"class":443},[437,539,462],{"class":443},[437,541,542],{"class":465},"The file is not a JPEG, PNG, WebP or GIF image.",[437,544,545],{"class":443},"\"\n",[437,547,549],{"class":439,"line":548},7,[437,550,551],{"class":443},"  }\n",[437,553,555],{"class":439,"line":554},8,[437,556,557],{"class":443},"}\n",[125,559,560,561,564,565,568,569,572],{},"Switch on ",[129,562,563],{},"error.type",": it is stable. ",[129,566,567],{},"error.code"," repeats the HTTP status, and ",[129,570,571],{},"error.message"," is English text for you, not for your users.",[134,574,575,589],{},[137,576,577],{},[140,578,579,583,586],{},[143,580,581],{},[129,582,563],{},[143,584,585],{},"Status",[143,587,588],{},"When",[153,590,591,604,617,633,652,664,676,692,704,719,732,744,756,773,787,802,815,828,842,858,874,889],{},[140,592,593,598,601],{},[158,594,595],{},[129,596,597],{},"unauthorized",[158,599,600],{},"401",[158,602,603],{},"The key is missing, malformed, invalid, revoked or expired.",[140,605,606,611,614],{},[158,607,608],{},[129,609,610],{},"forbidden",[158,612,613],{},"403",[158,615,616],{},"The key may not check this kind of content or use this workflow, or the request came from a browser.",[140,618,619,624,626],{},[158,620,621],{},[129,622,623],{},"organization_suspended",[158,625,613],{},[158,627,628,629,172],{},"An operator suspended the organization. Write to ",[312,630,632],{"href":631},"mailto:contact@sway.events","contact@sway.events",[140,634,635,640,643],{},[158,636,637],{},[129,638,639],{},"bad_request",[158,641,642],{},"400",[158,644,645,646,648,649,651],{},"An empty body, a text that is not JSON or has no ",[129,647,374],{},", a refused ",[129,650,321],{},", or a form that lacks a field.",[140,653,654,659,661],{},[158,655,656],{},[129,657,658],{},"unknown_workflow",[158,660,642],{},[158,662,663],{},"There is no workflow of that name.",[140,665,666,671,673],{},[158,667,668],{},[129,669,670],{},"corrupt_media",[158,672,642],{},[158,674,675],{},"The file does not decode.",[140,677,678,683,685],{},[158,679,680],{},[129,681,682],{},"url_refused",[158,684,642],{},[158,686,687,688,691],{},"The ",[129,689,690],{},"url"," of an image is not public, too large, too slow or not an image.",[140,693,694,699,701],{},[158,695,696],{},[129,697,698],{},"key_in_query",[158,700,642],{},[158,702,703],{},"The key was sent in the query string, which proxies and logs keep: send it in a header, and replace that key.",[140,705,706,710,713],{},[158,707,708],{},[129,709,505],{},[158,711,712],{},"415",[158,714,715,716,172],{},"Not a JPEG, PNG, WebP or GIF image, or a text sent without ",[129,717,718],{},"Content-Type: application\u002Fjson",[140,720,721,726,729],{},[158,722,723],{},[129,724,725],{},"body_too_large",[158,727,728],{},"413",[158,730,731],{},"A request body over 15 MB.",[140,733,734,739,741],{},[158,735,736],{},[129,737,738],{},"image_too_large",[158,740,728],{},[158,742,743],{},"More than 50 megapixels (12 until your first top-up), or a side over 16,384 pixels.",[140,745,746,751,753],{},[158,747,748],{},[129,749,750],{},"text_too_long",[158,752,728],{},[158,754,755],{},"More than 20,000 characters (5,000 until your first top-up).",[140,757,758,763,766],{},[158,759,760],{},[129,761,762],{},"rate_limited",[158,764,765],{},"429",[158,767,768,769,772],{},"Too many requests: wait ",[129,770,771],{},"Retry-After"," seconds.",[140,774,775,780,782],{},[158,776,777],{},[129,778,779],{},"too_many_concurrent",[158,781,765],{},[158,783,784,785,772],{},"Too many checks at once: wait ",[129,786,771],{},[140,788,789,794,796],{},[158,790,791],{},[129,792,793],{},"quota_exceeded",[158,795,765],{},[158,797,798,799,172],{},"The balance is empty (or, on a monthly or yearly plan, the spending cap is reached). See ",[312,800,801],{"href":38},"limits and quotas",[140,803,804,809,812],{},[158,805,806],{},[129,807,808],{},"request_timeout",[158,810,811],{},"408",[158,813,814],{},"A SightEngine-compatible form took more than 10 seconds to arrive.",[140,816,817,822,825],{},[158,818,819],{},[129,820,821],{},"workflow_unavailable",[158,823,824],{},"503",[158,826,827],{},"The workflow has no rule for this kind of content, or none this server can check.",[140,829,830,835,837],{},[158,831,832],{},[129,833,834],{},"busy",[158,836,824],{},[158,838,839,840,172],{},"The server is busy, or your organization's share of it is, or the share that organizations which never topped up use is: retry after ",[129,841,771],{},[140,843,844,849,852],{},[158,845,846],{},[129,847,848],{},"internal",[158,850,851],{},"500",[158,853,854,855,857],{},"A bug on our side. Quote the ",[129,856,301],{}," when you write to us.",[140,859,860,865,868],{},[158,861,862],{},[129,863,864],{},"fraud_not_enabled",[158,866,867],{},"404",[158,869,870,873],{},[129,871,872],{},"\u002Ffraud\u002Fv1"," only: your organization has not turned fraud prevention on.",[140,875,876,881,884],{},[158,877,878],{},[129,879,880],{},"fraud_unavailable",[158,882,883],{},"502",[158,885,886,888],{},[129,887,872],{}," only: your fraud instance did not answer. Retry in a few seconds.",[140,890,891,896,898],{},[158,892,893],{},[129,894,895],{},"fraud_waking",[158,897,824],{},[158,899,900,902,903,172],{},[129,901,872],{}," only: your paused free instance is starting, in seconds. Retry after ",[129,904,771],{},[125,906,907,908,911,912,914,915,917,918,920,921,172],{},"A key without the ",[129,909,910],{},"fraud"," scope gets ",[129,913,610],{}," (403) on the routes that need it, and an empty balance gets ",[129,916,793],{}," (429) on a fraud call too. The other answers of ",[129,919,872],{}," come from your instance, in openfraud's envelope: see ",[312,922,924],{"href":923},"\u002Fdocs\u002Ffraud-prevention#errors","fraud prevention",[120,926,928],{"id":927},"what-to-do-with-an-error","What to do with an error",[930,931,932,940,946,951,959],"ul",{},[933,934,935,939],"li",{},[936,937,938],"strong",{},"400, 413, 415",": the request is wrong or the content cannot be accepted. Do not retry; refuse the content or fix the call.",[933,941,942,945],{},[936,943,944],{},"401, 403",": a configuration problem. Log it, without the key, and alert your team.",[933,947,948,950],{},[936,949,811],{},": send the form again once, from a faster connection if you can.",[933,952,953,958],{},[936,954,955,956],{},"429, 503 with ",[129,957,771],{},": wait that many seconds, and retry at most twice.",[933,960,961,964,965,968],{},[936,962,963],{},"500, a timeout or a network error",": fail closed, as ",[312,966,967],{"href":88},"best practices"," explains.",[120,970,972],{"id":971},"headers-on-every-response","Headers on every response",[134,974,975,984],{},[137,976,977],{},[140,978,979,982],{},[143,980,981],{},"Header",[143,983,151],{},[153,985,986,995,1005,1015,1025,1035,1047],{},[140,987,988,992],{},[158,989,990],{},[129,991,309],{},[158,993,994],{},"The id of the request. Quote it in a support message.",[140,996,997,1002],{},[158,998,999],{},[129,1000,1001],{},"RateLimit-Limit",[158,1003,1004],{},"The burst size your limits allow: how many requests the bucket holds.",[140,1006,1007,1012],{},[158,1008,1009],{},[129,1010,1011],{},"RateLimit-Remaining",[158,1013,1014],{},"How many requests are left in the bucket.",[140,1016,1017,1022],{},[158,1018,1019],{},[129,1020,1021],{},"RateLimit-Reset",[158,1023,1024],{},"Seconds until the bucket is full again.",[140,1026,1027,1032],{},[158,1028,1029],{},[129,1030,1031],{},"X-Quota-Used",[158,1033,1034],{},"Checks counted in the current period.",[140,1036,1037,1042],{},[158,1038,1039],{},[129,1040,1041],{},"X-Quota-Limit",[158,1043,1044,1045,172],{},"Checks the period allows before ",[129,1046,793],{},[140,1048,1049,1053],{},[158,1050,1051],{},[129,1052,771],{},[158,1054,1055,1056,1058,1059,172],{},"Seconds to wait, on ",[129,1057,765],{}," and ",[129,1060,824],{},[1062,1063,1064],"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":433,"searchDepth":447,"depth":447,"links":1066},[1067,1068,1069,1070],{"id":122,"depth":447,"text":123},{"id":422,"depth":447,"text":423},{"id":927,"depth":447,"text":928},{"id":971,"depth":447,"text":972},"Every field of an answer, the error envelope with its types, and the headers on every response.","md",null,{},true,{"title":33,"description":1071},"gZXhn3EVsQDGzXkGvlDRtN1_Z-TAxvFQdiXmyANgrJI",[1079,1081],{"title":29,"path":30,"stem":31,"description":1080,"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":1082,"children":-1},"What a check costs, how the prepaid balance works, how fast you may call the API, and what happens when a limit is reached.",1793698847782]