[{"data":1,"prerenderedAt":1071},["ShallowReactive",2],{"navigation_docs":3,"-docs-responses-and-errors":114,"-docs-responses-and-errors-surround":1066},[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":1059,"extension":1060,"links":1061,"meta":1062,"navigation":1063,"path":34,"seo":1064,"stem":35,"__hash__":1065},"docs\u002Fdocs\u002F07.responses-and-errors.md",{"type":117,"value":118,"toc":1053},"minimark",[119,124,133,328,339,408,420,424,427,558,573,893,913,917,957,961,1049],[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,707,720,732,744,761,775,790,803,816,830,846,862,877],{},[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,698,701],{},[158,695,696],{},[129,697,505],{},[158,699,700],{},"415",[158,702,703,704,172],{},"Not a JPEG, PNG, WebP or GIF image, or a text sent without ",[129,705,706],{},"Content-Type: application\u002Fjson",[140,708,709,714,717],{},[158,710,711],{},[129,712,713],{},"body_too_large",[158,715,716],{},"413",[158,718,719],{},"A request body over 15 MB.",[140,721,722,727,729],{},[158,723,724],{},[129,725,726],{},"image_too_large",[158,728,716],{},[158,730,731],{},"More than 50 megapixels (12 until your first top-up), or a side over 16,384 pixels.",[140,733,734,739,741],{},[158,735,736],{},[129,737,738],{},"text_too_long",[158,740,716],{},[158,742,743],{},"More than 20,000 characters (5,000 until your first top-up).",[140,745,746,751,754],{},[158,747,748],{},[129,749,750],{},"rate_limited",[158,752,753],{},"429",[158,755,756,757,760],{},"Too many requests: wait ",[129,758,759],{},"Retry-After"," seconds.",[140,762,763,768,770],{},[158,764,765],{},[129,766,767],{},"too_many_concurrent",[158,769,753],{},[158,771,772,773,760],{},"Too many checks at once: wait ",[129,774,759],{},[140,776,777,782,784],{},[158,778,779],{},[129,780,781],{},"quota_exceeded",[158,783,753],{},[158,785,786,787,172],{},"The balance is empty (or, on a monthly or yearly plan, the spending cap is reached). See ",[312,788,789],{"href":38},"limits and quotas",[140,791,792,797,800],{},[158,793,794],{},[129,795,796],{},"request_timeout",[158,798,799],{},"408",[158,801,802],{},"A SightEngine-compatible form took more than 10 seconds to arrive.",[140,804,805,810,813],{},[158,806,807],{},[129,808,809],{},"workflow_unavailable",[158,811,812],{},"503",[158,814,815],{},"The workflow has no rule for this kind of content, or none this server can check.",[140,817,818,823,825],{},[158,819,820],{},[129,821,822],{},"busy",[158,824,812],{},[158,826,827,828,172],{},"The server is busy, or the share of it that organizations which never topped up use is: retry after ",[129,829,759],{},[140,831,832,837,840],{},[158,833,834],{},[129,835,836],{},"internal",[158,838,839],{},"500",[158,841,842,843,845],{},"A bug on our side. Quote the ",[129,844,301],{}," when you write to us.",[140,847,848,853,856],{},[158,849,850],{},[129,851,852],{},"fraud_not_enabled",[158,854,855],{},"404",[158,857,858,861],{},[129,859,860],{},"\u002Ffraud\u002Fv1"," only: your organization has not turned fraud prevention on.",[140,863,864,869,872],{},[158,865,866],{},[129,867,868],{},"fraud_unavailable",[158,870,871],{},"502",[158,873,874,876],{},[129,875,860],{}," only: your fraud instance did not answer. Retry in a few seconds.",[140,878,879,884,886],{},[158,880,881],{},[129,882,883],{},"fraud_waking",[158,885,812],{},[158,887,888,890,891,172],{},[129,889,860],{}," only: your paused free instance is starting, in seconds. Retry after ",[129,892,759],{},[125,894,895,896,899,900,902,903,905,906,908,909,172],{},"A key without the ",[129,897,898],{},"fraud"," scope gets ",[129,901,610],{}," (403) on the routes that need it, and an empty balance gets ",[129,904,781],{}," (429) on a fraud call too. The other answers of ",[129,907,860],{}," come from your instance, in openfraud's envelope: see ",[312,910,912],{"href":911},"\u002Fdocs\u002Ffraud-prevention#errors","fraud prevention",[120,914,916],{"id":915},"what-to-do-with-an-error","What to do with an error",[918,919,920,928,934,939,947],"ul",{},[921,922,923,927],"li",{},[924,925,926],"strong",{},"400, 413, 415",": the request is wrong or the content cannot be accepted. Do not retry; refuse the content or fix the call.",[921,929,930,933],{},[924,931,932],{},"401, 403",": a configuration problem. Log it, without the key, and alert your team.",[921,935,936,938],{},[924,937,799],{},": send the form again once, from a faster connection if you can.",[921,940,941,946],{},[924,942,943,944],{},"429, 503 with ",[129,945,759],{},": wait that many seconds, and retry at most twice.",[921,948,949,952,953,956],{},[924,950,951],{},"500, a timeout or a network error",": fail closed, as ",[312,954,955],{"href":88},"best practices"," explains.",[120,958,960],{"id":959},"headers-on-every-response","Headers on every response",[134,962,963,972],{},[137,964,965],{},[140,966,967,970],{},[143,968,969],{},"Header",[143,971,151],{},[153,973,974,983,993,1003,1013,1023,1035],{},[140,975,976,980],{},[158,977,978],{},[129,979,309],{},[158,981,982],{},"The id of the request. Quote it in a support message.",[140,984,985,990],{},[158,986,987],{},[129,988,989],{},"RateLimit-Limit",[158,991,992],{},"The burst size your limits allow: how many requests the bucket holds.",[140,994,995,1000],{},[158,996,997],{},[129,998,999],{},"RateLimit-Remaining",[158,1001,1002],{},"How many requests are left in the bucket.",[140,1004,1005,1010],{},[158,1006,1007],{},[129,1008,1009],{},"RateLimit-Reset",[158,1011,1012],{},"Seconds until the bucket is full again.",[140,1014,1015,1020],{},[158,1016,1017],{},[129,1018,1019],{},"X-Quota-Used",[158,1021,1022],{},"Checks counted in the current period.",[140,1024,1025,1030],{},[158,1026,1027],{},[129,1028,1029],{},"X-Quota-Limit",[158,1031,1032,1033,172],{},"Checks the period allows before ",[129,1034,781],{},[140,1036,1037,1041],{},[158,1038,1039],{},[129,1040,759],{},[158,1042,1043,1044,1046,1047,172],{},"Seconds to wait, on ",[129,1045,753],{}," and ",[129,1048,812],{},[1050,1051,1052],"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":1054},[1055,1056,1057,1058],{"id":122,"depth":447,"text":123},{"id":422,"depth":447,"text":423},{"id":915,"depth":447,"text":916},{"id":959,"depth":447,"text":960},"Every field of an answer, the error envelope with its types, and the headers on every response.","md",null,{},true,{"title":33,"description":1059},"ptOnPvkHmupXUu6zqoJoWEjfUVwJV-fjrK_3JhUy84I",[1067,1069],{"title":29,"path":30,"stem":31,"description":1068,"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":1070,"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.",1792938462114]