[{"data":1,"prerenderedAt":1476},["ShallowReactive",2],{"navigation_docs":3,"-docs-migrating-from-openai-moderation":122,"-docs-migrating-from-openai-moderation-surround":1471},[4,8,12,16,20,24,28,32,36,40,44,48,90,94,98,102,106,110,114,118],{"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},"Migrating from the OpenAI moderation API","\u002Fdocs\u002Fmigrating-from-openai-moderation","docs\u002F050.migrating-from-openai-moderation",{"title":33,"path":34,"stem":35},"Workflows","\u002Fdocs\u002Fworkflows","docs\u002F06.workflows",{"title":37,"path":38,"stem":39},"Responses and errors","\u002Fdocs\u002Fresponses-and-errors","docs\u002F07.responses-and-errors",{"title":41,"path":42,"stem":43},"Limits and quotas","\u002Fdocs\u002Flimits-and-quotas","docs\u002F08.limits-and-quotas",{"title":45,"path":46,"stem":47},"The journal and ref","\u002Fdocs\u002Fjournal-and-ref","docs\u002F09.journal-and-ref",{"title":49,"path":50,"stem":51,"children":52,"page":89},"Integration guides","\u002Fdocs\u002Fintegration-guides","docs\u002F10.integration-guides",[53,57,61,65,69,73,77,81,85],{"title":54,"path":55,"stem":56},"Node.js and TypeScript","\u002Fdocs\u002Fintegration-guides\u002Fnodejs","docs\u002F10.integration-guides\u002F1.nodejs",{"title":58,"path":59,"stem":60},"Python","\u002Fdocs\u002Fintegration-guides\u002Fpython","docs\u002F10.integration-guides\u002F2.python",{"title":62,"path":63,"stem":64},"PHP","\u002Fdocs\u002Fintegration-guides\u002Fphp","docs\u002F10.integration-guides\u002F3.php",{"title":66,"path":67,"stem":68},"Go","\u002Fdocs\u002Fintegration-guides\u002Fgo","docs\u002F10.integration-guides\u002F4.go",{"title":70,"path":71,"stem":72},"Supabase Edge Functions","\u002Fdocs\u002Fintegration-guides\u002Fsupabase-edge-functions","docs\u002F10.integration-guides\u002F5.supabase-edge-functions",{"title":74,"path":75,"stem":76},"Cloudflare Workers","\u002Fdocs\u002Fintegration-guides\u002Fcloudflare-workers","docs\u002F10.integration-guides\u002F6.cloudflare-workers",{"title":78,"path":79,"stem":80},"Nuxt and Next","\u002Fdocs\u002Fintegration-guides\u002Fnuxt-and-next","docs\u002F10.integration-guides\u002F7.nuxt-and-next",{"title":82,"path":83,"stem":84},"Moderate an AI agent","\u002Fdocs\u002Fintegration-guides\u002Fmoderate-ai-agents","docs\u002F10.integration-guides\u002F8.moderate-ai-agents",{"title":86,"path":87,"stem":88},"n8n","\u002Fdocs\u002Fintegration-guides\u002Fn8n","docs\u002F10.integration-guides\u002F9.n8n",false,{"title":91,"path":92,"stem":93},"AI coding agents","\u002Fdocs\u002Fai-agents","docs\u002F11.ai-agents",{"title":95,"path":96,"stem":97},"Best practices","\u002Fdocs\u002Fbest-practices","docs\u002F12.best-practices",{"title":99,"path":100,"stem":101},"Privacy and data","\u002Fdocs\u002Fprivacy-and-data","docs\u002F13.privacy-and-data",{"title":103,"path":104,"stem":105},"API reference","\u002Fdocs\u002Fapi-reference","docs\u002F14.api-reference",{"title":107,"path":108,"stem":109},"Fraud prevention","\u002Fdocs\u002Ffraud-prevention","docs\u002F16.fraud-prevention",{"title":111,"path":112,"stem":113},"Device token and challenges","\u002Fdocs\u002Fdevice-and-challenges","docs\u002F17.device-and-challenges",{"title":115,"path":116,"stem":117},"MCP server","\u002Fdocs\u002Fmcp-server","docs\u002F18.mcp-server",{"title":119,"path":120,"stem":121},"Changelog","\u002Fdocs\u002Fchangelog","docs\u002F99.changelog",{"id":123,"title":29,"body":124,"description":1464,"extension":1465,"links":1466,"meta":1467,"navigation":1468,"path":30,"seo":1469,"stem":31,"__hash__":1470},"docs\u002Fdocs\u002F050.migrating-from-openai-moderation.md",{"type":125,"value":126,"toc":1455},"minimark",[127,145,167,174,303,313,316,321,331,416,448,455,459,466,510,545,561,577,590,594,600,625,644,653,670,676,682,1040,1052,1056,1065,1088,1259,1285,1300,1304,1389,1393,1403,1417,1425,1436,1440,1444,1451],[128,129,130,131,135,136,139,140,144],"p",{},"openshield is not a drop-in replacement for the OpenAI moderation API. Call ",[132,133,134],"code",{},"POST \u002Fv1\u002Ftext"," or ",[132,137,138],{},"POST \u002Fv1\u002Fimage",", then map the decision. Only the ",[141,142,143],"a",{"href":26},"SightEngine workflow routes"," follow another provider's format.",[128,146,147,148,151,152,155,156,159,160,163,164,166],{},"The OpenAI moderation API classifies text and images on ",[132,149,150],{},"POST https:\u002F\u002Fapi.openai.com\u002Fv1\u002Fmoderations",", usually with the model ",[132,153,154],{},"omni-moderation-latest",". It returns ",[132,157,158],{},"flagged",", per-category booleans, scores, and ",[132,161,162],{},"category_applied_input_types",", and you apply your own policy on those signals. As of 17 November 2026, OpenAI's guide states that this endpoint is free to use, that the model accepts text and images and does not classify audio, and that image files can be up to 20 MB. Its pricing table lists ",[132,165,154],{}," as Free.",[128,168,169,170,173],{},"openshield has its own host, paths, bodies and answer. A client written for ",[132,171,172],{},"\u002Fv1\u002Fmoderations"," needs a new request and a new way to read the decision.",[175,176,177,190],"table",{},[178,179,180],"thead",{},[181,182,183,187],"tr",{},[184,185,186],"th",{},"OpenAI moderation API (as of 2026-11-17)",[184,188,189],{},"openshield",[191,192,193,208,225,242,284,292],"tbody",{},[181,194,195,200],{},[196,197,198],"td",{},[132,199,150],{},[196,201,202,135,205],{},[132,203,204],{},"POST https:\u002F\u002Fapi.openshield.dev\u002Fv1\u002Ftext",[132,206,207],{},"POST https:\u002F\u002Fapi.openshield.dev\u002Fv1\u002Fimage",[181,209,210,217],{},[196,211,212,213,216],{},"One call may send a string, an array of strings, or a mix of text and ",[132,214,215],{},"image_url"," objects",[196,218,219,220,224],{},"One text ",[221,222,223],"strong",{},"or"," one image per call. Split mixed inputs into two requests.",[181,226,227,232],{},[196,228,229],{},[132,230,231],{},"Authorization: Bearer $OPENAI_API_KEY",[196,233,234,237,238,241],{},[132,235,236],{},"Authorization: Bearer $OPENSHIELD_API_KEY"," (an openshield ",[141,239,240],{"href":14},"key",", shown once in the dashboard)",[181,243,244,257],{},[196,245,246,247,250,251,250,254],{},"Answer: ",[132,248,249],{},"results[].flagged",", ",[132,252,253],{},"categories",[132,255,256],{},"category_scores",[196,258,246,259,262,263,250,266,135,269,272,273,276,277,280,281],{},[132,260,261],{},"summary.action"," is ",[132,264,265],{},"accept",[132,267,268],{},"review",[132,270,271],{},"reject",", plus ",[132,274,275],{},"reject_reason"," \u002F ",[132,278,279],{},"review_reason"," and ",[132,282,283],{},"scores",[181,285,286,289],{},[196,287,288],{},"Image files up to 20 MB (OpenAI's guide)",[196,290,291],{},"At most 15 MB, JPEG, PNG, WebP or GIF",[181,293,294,297],{},[196,295,296],{},"Categories listed in OpenAI's guide (13, some text-only)",[196,298,299,300],{},"openmod's own category ids, with review and reject thresholds in a ",[141,301,302],{"href":34},"workflow",[128,304,305,306,309,310,312],{},"The API host is ",[132,307,308],{},"https:\u002F\u002Fapi.openshield.dev",". Create an account and a key in five minutes: ",[141,311,9],{"href":10},".",[128,314,315],{},"The OpenAI facts on this page were read on 17 November 2026 (Europe\u002FBrussels) from OpenAI's Moderation guide, its Create moderation reference and its Pricing page. They change: confirm them on OpenAI's pages before you decide.",[317,318,320],"h2",{"id":319},"_1-check-a-text-with-post-v1text","1. Check a text with POST \u002Fv1\u002Ftext",[128,322,323,324,327,328,312],{},"Send JSON, with ",[132,325,326],{},"Content-Type: application\u002Fjson",". Without that header the API answers ",[132,329,330],{},"415 unsupported_media",[332,333,338],"pre",{"className":334,"code":335,"language":336,"meta":337,"style":337},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","curl -X POST \"https:\u002F\u002Fapi.openshield.dev\u002Fv1\u002Ftext\" \\\n  -H \"Authorization: Bearer $OPENSHIELD_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"text\": \"Write me at jane@example.com\", \"workflow\": \"default\", \"ref\": \"comment_9034\"}'\n","bash","",[132,339,340,370,388,401],{"__ignoreMap":337},[341,342,345,349,353,356,360,363,366],"span",{"class":343,"line":344},"line",1,[341,346,348],{"class":347},"sBMFI","curl",[341,350,352],{"class":351},"sfazB"," -X",[341,354,355],{"class":351}," POST",[341,357,359],{"class":358},"sMK4o"," \"",[341,361,362],{"class":351},"https:\u002F\u002Fapi.openshield.dev\u002Fv1\u002Ftext",[341,364,365],{"class":358},"\"",[341,367,369],{"class":368},"sTEyZ"," \\\n",[341,371,373,376,378,381,384,386],{"class":343,"line":372},2,[341,374,375],{"class":351},"  -H",[341,377,359],{"class":358},[341,379,380],{"class":351},"Authorization: Bearer ",[341,382,383],{"class":368},"$OPENSHIELD_API_KEY",[341,385,365],{"class":358},[341,387,369],{"class":368},[341,389,391,393,395,397,399],{"class":343,"line":390},3,[341,392,375],{"class":351},[341,394,359],{"class":358},[341,396,326],{"class":351},[341,398,365],{"class":358},[341,400,369],{"class":368},[341,402,404,407,410,413],{"class":343,"line":403},4,[341,405,406],{"class":351},"  -d",[341,408,409],{"class":358}," '",[341,411,412],{"class":351},"{\"text\": \"Write me at jane@example.com\", \"workflow\": \"default\", \"ref\": \"comment_9034\"}",[341,414,415],{"class":358},"'\n",[128,417,418,421,422,425,426,428,429,432,433,436,437,440,441,444,445,447],{},[132,419,420],{},"text"," is required: at most 5,000 characters until your first top-up, and up to 20,000 after, by tier (",[141,423,424],{"href":42},"limits","). ",[132,427,302],{}," defaults to ",[132,430,431],{},"default",". ",[132,434,435],{},"ref"," is your own id, 1 to 128 characters, echoed in the answer and kept in the ",[141,438,439],{"href":46},"journal",". The optional ",[132,442,443],{},"context"," field says where the text comes from; ",[141,446,21],{"href":22}," describes it.",[128,449,450,451,454],{},"If you used to send an array of strings in one OpenAI call, make one ",[132,452,453],{},"\u002Fv1\u002Ftext"," request per string.",[317,456,458],{"id":457},"_2-check-an-image-with-post-v1image","2. Check an image with POST \u002Fv1\u002Fimage",[128,460,461,462,465],{},"Send the raw bytes as the body, or a public ",[132,463,464],{},"url"," query parameter and an empty body. The format is recognised from the bytes: JPEG, PNG, WebP or GIF (the first frame).",[332,467,469],{"className":334,"code":468,"language":336,"meta":337,"style":337},"curl -X POST \"https:\u002F\u002Fapi.openshield.dev\u002Fv1\u002Fimage?workflow=default&ref=avatar_4821\" \\\n  -H \"Authorization: Bearer $OPENSHIELD_API_KEY\" \\\n  --data-binary @photo.jpg\n",[132,470,471,488,502],{"__ignoreMap":337},[341,472,473,475,477,479,481,484,486],{"class":343,"line":344},[341,474,348],{"class":347},[341,476,352],{"class":351},[341,478,355],{"class":351},[341,480,359],{"class":358},[341,482,483],{"class":351},"https:\u002F\u002Fapi.openshield.dev\u002Fv1\u002Fimage?workflow=default&ref=avatar_4821",[341,485,365],{"class":358},[341,487,369],{"class":368},[341,489,490,492,494,496,498,500],{"class":343,"line":372},[341,491,375],{"class":351},[341,493,359],{"class":358},[341,495,380],{"class":351},[341,497,383],{"class":368},[341,499,365],{"class":358},[341,501,369],{"class":368},[341,503,504,507],{"class":343,"line":390},[341,505,506],{"class":351},"  --data-binary",[341,508,509],{"class":351}," @photo.jpg\n",[332,511,513],{"className":334,"code":512,"language":336,"meta":337,"style":337},"curl -X POST \"https:\u002F\u002Fapi.openshield.dev\u002Fv1\u002Fimage?url=https%3A%2F%2Fexample.com%2Fphoto.jpg\" \\\n  -H \"Authorization: Bearer $OPENSHIELD_API_KEY\"\n",[132,514,515,532],{"__ignoreMap":337},[341,516,517,519,521,523,525,528,530],{"class":343,"line":344},[341,518,348],{"class":347},[341,520,352],{"class":351},[341,522,355],{"class":351},[341,524,359],{"class":358},[341,526,527],{"class":351},"https:\u002F\u002Fapi.openshield.dev\u002Fv1\u002Fimage?url=https%3A%2F%2Fexample.com%2Fphoto.jpg",[341,529,365],{"class":358},[341,531,369],{"class":368},[341,533,534,536,538,540,542],{"class":343,"line":372},[341,535,375],{"class":351},[341,537,359],{"class":358},[341,539,380],{"class":351},[341,541,383],{"class":368},[341,543,544],{"class":358},"\"\n",[128,546,547,548,550,551,280,554,557,558,312],{},"Limits: at most 15 MB, 50 megapixels (12 until your first top-up) and 16,384 pixels on a side. A public URL is downloaded for you, with the guards in ",[141,549,17],{"href":18},": ",[132,552,553],{},"http",[132,555,556],{},"https"," only, 3 redirects, 10 seconds, and ",[132,559,560],{},"Content-Type: image\u002F*",[128,562,563,564,567,568,571,572,574,575,312],{},"If you used to send a Base64 ",[132,565,566],{},"data:"," image URL in OpenAI's ",[132,569,570],{},"image_url.url",", decode it and send the bytes in the body instead, or host the file at a public ",[132,573,556],{}," address and pass ",[132,576,464],{},[128,578,579,580,582,583,586,587,589],{},"If one OpenAI call mixed a caption and an image, send the caption to ",[132,581,453],{}," and the image to ",[132,584,585],{},"\u002Fv1\u002Fimage",", each with the same ",[132,588,435],{}," if you want them tied in the journal.",[317,591,593],{"id":592},"_3-map-the-decision","3. Map the decision",[128,595,596,597,599],{},"Act on ",[132,598,261],{},":",[601,602,603,609,614],"ul",{},[604,605,606,608],"li",{},[132,607,265],{},": go on.",[604,610,611,613],{},[132,612,268],{},": keep the content hidden until a person approves it. openshield does not review content for you.",[604,615,616,618,619,622,623,312],{},[132,617,271],{},": refuse it, and tell the user why with a message you choose from ",[132,620,621],{},"reject_reason[0].id",". Match on the id, never on the English ",[132,624,420],{},[128,626,627,629,630,633,634,550,636,638,639,641,642,312],{},[132,628,261],{}," has exactly those three values, as in the OpenAPI ",[132,631,632],{},"Action"," enum and ",[141,635,37],{"href":38},[132,637,271],{}," when a reject threshold is reached, else ",[132,640,268],{}," when a review threshold is, else ",[132,643,265],{},[128,645,646,647,649,650,599],{},"A starting map from an OpenAI-style ",[132,648,158],{}," boolean, for code that used to switch on ",[132,651,652],{},"results[0].flagged",[601,654,655,660,665],{},[604,656,657,659],{},[132,658,271],{},": treat as flagged, and refuse.",[604,661,662,664],{},[132,663,268],{},": treat as flagged for a queue, and do not publish yet.",[604,666,667,669],{},[132,668,265],{},": treat as not flagged.",[128,671,672,673,675],{},"That is a starting map only. OpenAI's ",[132,674,158],{}," is a single boolean from its own model; openshield's action follows the review and reject thresholds you set per category in a workflow. Tune the workflow rather than hard-coding score cut-offs in your client.",[128,677,678,679,681],{},"An example answer, for a text that holds an email address (the sample of the ",[141,680,9],{"href":10},"):",[332,683,687],{"className":684,"code":685,"language":686,"meta":337,"style":337},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"status\": \"success\",\n  \"workflow\": \"default\",\n  \"workflow_version\": 1,\n  \"summary\": {\n    \"action\": \"review\",\n    \"reject_prob\": 0,\n    \"reject_reason\": [],\n    \"review_reason\": [\n      {\n        \"id\": \"pii_email\",\n        \"text\": \"Email address\",\n        \"message\": \"This content contains an email address.\",\n        \"score\": 1,\n        \"threshold\": 1\n      }\n    ]\n  },\n  \"scores\": { \"pii_email\": 1 },\n  \"time_ms\": 4,\n  \"request_id\": \"0192b7c4-5f3a-7c1e-9a52-3d8f1e6b0a47\",\n  \"ref\": \"comment_9034\"\n}\n","json",[132,688,689,694,717,735,752,767,788,805,819,833,839,861,881,902,918,933,939,945,951,978,995,1016,1034],{"__ignoreMap":337},[341,690,691],{"class":343,"line":344},[341,692,693],{"class":358},"{\n",[341,695,696,699,703,705,707,709,712,714],{"class":343,"line":372},[341,697,698],{"class":358},"  \"",[341,700,702],{"class":701},"spNyl","status",[341,704,365],{"class":358},[341,706,599],{"class":358},[341,708,359],{"class":358},[341,710,711],{"class":351},"success",[341,713,365],{"class":358},[341,715,716],{"class":358},",\n",[341,718,719,721,723,725,727,729,731,733],{"class":343,"line":390},[341,720,698],{"class":358},[341,722,302],{"class":701},[341,724,365],{"class":358},[341,726,599],{"class":358},[341,728,359],{"class":358},[341,730,431],{"class":351},[341,732,365],{"class":358},[341,734,716],{"class":358},[341,736,737,739,742,744,746,750],{"class":343,"line":403},[341,738,698],{"class":358},[341,740,741],{"class":701},"workflow_version",[341,743,365],{"class":358},[341,745,599],{"class":358},[341,747,749],{"class":748},"sbssI"," 1",[341,751,716],{"class":358},[341,753,755,757,760,762,764],{"class":343,"line":754},5,[341,756,698],{"class":358},[341,758,759],{"class":701},"summary",[341,761,365],{"class":358},[341,763,599],{"class":358},[341,765,766],{"class":358}," {\n",[341,768,770,773,776,778,780,782,784,786],{"class":343,"line":769},6,[341,771,772],{"class":358},"    \"",[341,774,775],{"class":347},"action",[341,777,365],{"class":358},[341,779,599],{"class":358},[341,781,359],{"class":358},[341,783,268],{"class":351},[341,785,365],{"class":358},[341,787,716],{"class":358},[341,789,791,793,796,798,800,803],{"class":343,"line":790},7,[341,792,772],{"class":358},[341,794,795],{"class":347},"reject_prob",[341,797,365],{"class":358},[341,799,599],{"class":358},[341,801,802],{"class":748}," 0",[341,804,716],{"class":358},[341,806,808,810,812,814,816],{"class":343,"line":807},8,[341,809,772],{"class":358},[341,811,275],{"class":347},[341,813,365],{"class":358},[341,815,599],{"class":358},[341,817,818],{"class":358}," [],\n",[341,820,822,824,826,828,830],{"class":343,"line":821},9,[341,823,772],{"class":358},[341,825,279],{"class":347},[341,827,365],{"class":358},[341,829,599],{"class":358},[341,831,832],{"class":358}," [\n",[341,834,836],{"class":343,"line":835},10,[341,837,838],{"class":358},"      {\n",[341,840,842,845,848,850,852,854,857,859],{"class":343,"line":841},11,[341,843,844],{"class":358},"        \"",[341,846,847],{"class":748},"id",[341,849,365],{"class":358},[341,851,599],{"class":358},[341,853,359],{"class":358},[341,855,856],{"class":351},"pii_email",[341,858,365],{"class":358},[341,860,716],{"class":358},[341,862,864,866,868,870,872,874,877,879],{"class":343,"line":863},12,[341,865,844],{"class":358},[341,867,420],{"class":748},[341,869,365],{"class":358},[341,871,599],{"class":358},[341,873,359],{"class":358},[341,875,876],{"class":351},"Email address",[341,878,365],{"class":358},[341,880,716],{"class":358},[341,882,884,886,889,891,893,895,898,900],{"class":343,"line":883},13,[341,885,844],{"class":358},[341,887,888],{"class":748},"message",[341,890,365],{"class":358},[341,892,599],{"class":358},[341,894,359],{"class":358},[341,896,897],{"class":351},"This content contains an email address.",[341,899,365],{"class":358},[341,901,716],{"class":358},[341,903,905,907,910,912,914,916],{"class":343,"line":904},14,[341,906,844],{"class":358},[341,908,909],{"class":748},"score",[341,911,365],{"class":358},[341,913,599],{"class":358},[341,915,749],{"class":748},[341,917,716],{"class":358},[341,919,921,923,926,928,930],{"class":343,"line":920},15,[341,922,844],{"class":358},[341,924,925],{"class":748},"threshold",[341,927,365],{"class":358},[341,929,599],{"class":358},[341,931,932],{"class":748}," 1\n",[341,934,936],{"class":343,"line":935},16,[341,937,938],{"class":358},"      }\n",[341,940,942],{"class":343,"line":941},17,[341,943,944],{"class":358},"    ]\n",[341,946,948],{"class":343,"line":947},18,[341,949,950],{"class":358},"  },\n",[341,952,954,956,958,960,962,965,967,969,971,973,975],{"class":343,"line":953},19,[341,955,698],{"class":358},[341,957,283],{"class":701},[341,959,365],{"class":358},[341,961,599],{"class":358},[341,963,964],{"class":358}," {",[341,966,359],{"class":358},[341,968,856],{"class":347},[341,970,365],{"class":358},[341,972,599],{"class":358},[341,974,749],{"class":748},[341,976,977],{"class":358}," },\n",[341,979,981,983,986,988,990,993],{"class":343,"line":980},20,[341,982,698],{"class":358},[341,984,985],{"class":701},"time_ms",[341,987,365],{"class":358},[341,989,599],{"class":358},[341,991,992],{"class":748}," 4",[341,994,716],{"class":358},[341,996,998,1000,1003,1005,1007,1009,1012,1014],{"class":343,"line":997},21,[341,999,698],{"class":358},[341,1001,1002],{"class":701},"request_id",[341,1004,365],{"class":358},[341,1006,599],{"class":358},[341,1008,359],{"class":358},[341,1010,1011],{"class":351},"0192b7c4-5f3a-7c1e-9a52-3d8f1e6b0a47",[341,1013,365],{"class":358},[341,1015,716],{"class":358},[341,1017,1019,1021,1023,1025,1027,1029,1032],{"class":343,"line":1018},22,[341,1020,698],{"class":358},[341,1022,435],{"class":701},[341,1024,365],{"class":358},[341,1026,599],{"class":358},[341,1028,359],{"class":358},[341,1030,1031],{"class":351},"comment_9034",[341,1033,544],{"class":358},[341,1035,1037],{"class":343,"line":1036},23,[341,1038,1039],{"class":358},"}\n",[128,1041,1042,1045,1046,1048,1049,312],{},[132,1043,1044],{},"unchecked"," may be absent when every category was checked. ",[141,1047,37],{"href":38}," describes every field. Errors use ",[132,1050,1051],{},"{\"status\": \"failure\", \"error\": {\"type\", \"code\", \"message\"}}",[317,1053,1055],{"id":1054},"_4-map-the-category-ids","4. Map the category ids",[128,1057,1058,1059,250,1061,280,1063,312],{},"The catalogues are not the same, and an id is not a synonym of an OpenAI category. Use the table as a starting point when you set thresholds, then check the lists on ",[141,1060,17],{"href":18},[141,1062,21],{"href":22},[141,1064,33],{"href":34},[128,1066,1067,1068,250,1071,250,1074,250,1077,1080,1081,135,1084,1087],{},"The OpenAI categories below are from its moderation guide, 17 November 2026. Some are text-only there (",[132,1069,1070],{},"harassment",[132,1072,1073],{},"hate",[132,1075,1076],{},"illicit",[132,1078,1079],{},"sexual\u002Fminors"," and their ",[132,1082,1083],{},"\u002Fthreatening",[132,1085,1086],{},"\u002Fviolent"," variants). If you send only an image, OpenAI returns a score of 0 for those text-only categories.",[175,1089,1090,1103],{},[178,1091,1092],{},[181,1093,1094,1097,1100],{},[184,1095,1096],{},"OpenAI category (2026-11-17)",[184,1098,1099],{},"A nearby openshield id to start from",[184,1101,1102],{},"Notes",[191,1104,1105,1126,1145,1162,1184,1204,1229,1242],{},[181,1106,1107,1114,1119],{},[196,1108,1109,250,1111],{},[132,1110,1073],{},[132,1112,1113],{},"hate\u002Fthreatening",[196,1115,1116,1118],{},[132,1117,1073],{}," (text)",[196,1120,1121,1122,1125],{},"Not equivalent. On images, ",[132,1123,1124],{},"hate_symbol"," is a different category.",[181,1127,1128,1135,1142],{},[196,1129,1130,250,1132],{},[132,1131,1070],{},[132,1133,1134],{},"harassment\u002Fthreatening",[196,1136,1137,135,1139,1118],{},[132,1138,1073],{},[132,1140,1141],{},"text_unsafe",[196,1143,1144],{},"No openshield id is named for harassment.",[181,1146,1147,1154,1159],{},[196,1148,1149,250,1151],{},[132,1150,1076],{},[132,1152,1153],{},"illicit\u002Fviolent",[196,1155,1156,1118],{},[132,1157,1158],{},"illegal",[196,1160,1161],{},"Not equivalent.",[181,1163,1164,1169,1181],{},[196,1165,1166],{},[132,1167,1168],{},"sexual",[196,1170,1171,1173,1174,135,1177,1180],{},[132,1172,1168],{}," (text); ",[132,1175,1176],{},"nudity",[132,1178,1179],{},"suggestive"," (image)",[196,1182,1183],{},"Underwear and swimwear are separate image categories if you need them.",[181,1185,1186,1190,1198],{},[196,1187,1188],{},[132,1189,1079],{},[196,1191,1192,1173,1195,1180],{},[132,1193,1194],{},"child_safety",[132,1196,1197],{},"minor",[196,1199,1200,1201,1203],{},"Text-only on OpenAI's ",[132,1202,154],{},". Not a 1:1 mapping.",[181,1205,1206,1217,1223],{},[196,1207,1208,250,1211,250,1214],{},[132,1209,1210],{},"self-harm",[132,1212,1213],{},"self-harm\u002Fintent",[132,1215,1216],{},"self-harm\u002Finstructions",[196,1218,1219,1222],{},[132,1220,1221],{},"self_harm"," (text and image)",[196,1224,1225,1226,1228],{},"openshield has one ",[132,1227,1221],{}," id, not three.",[181,1230,1231,1236,1240],{},[196,1232,1233],{},[132,1234,1235],{},"violence",[196,1237,1238,1222],{},[132,1239,1235],{},[196,1241],{},[181,1243,1244,1249,1257],{},[196,1245,1246],{},[132,1247,1248],{},"violence\u002Fgraphic",[196,1250,1251,1254,1255,1118],{},[132,1252,1253],{},"gore"," (image); ",[132,1256,1235],{},[196,1258,1161],{},[128,1260,1261,1262,250,1264,250,1267,250,1270,1273,1274,250,1277,1280,1281,1284],{},"openshield also checks things that table does not list, when you turn them on in a workflow: personal data (",[132,1263,856],{},[132,1265,1266],{},"pii_phone",[132,1268,1269],{},"pii_iban",[132,1271,1272],{},"pii_card","), ",[132,1275,1276],{},"spam",[132,1278,1279],{},"scam",", unsafe links, text in images, QR codes, and ",[141,1282,1283],{"href":34},"custom image categories"," described in words. Leave them off the workflow if you do not want them.",[128,1286,1287,1288,1290,1291,1293,1294,1296,1297,1299],{},"The ",[132,1289,431],{}," workflow already sets review and reject thresholds. For texts, it rejects unsafe text, violence, sexual content, hate, illegal activity and unethical content at 0.8 and sends them to review from 0.5, as ",[141,1292,21],{"href":22}," states; for images, see ",[141,1295,17],{"href":18},". Edit a copy rather than expecting OpenAI's ",[132,1298,158],{}," cut-off to carry over.",[317,1301,1303],{"id":1302},"what-differs","What differs",[601,1305,1306,1318,1324,1340,1346,1362,1372,1383],{},[604,1307,1308,1314,1315,1317],{},[221,1309,1310,1311,1313],{},"No compatible ",[132,1312,172],{}," route."," Only the ",[141,1316,143],{"href":26}," follow another provider's paths and envelope.",[604,1319,1320,1323],{},[221,1321,1322],{},"One item per call."," An OpenAI request can classify several strings, or text and an image together. Here you send one text or one image.",[604,1325,1326,1336,1337,1339],{},[221,1327,1328,1329,250,1331,135,1333,1335],{},"The decision is ",[132,1330,265],{},[132,1332,268],{},[132,1334,271],{},","," from your workflow thresholds, not a single ",[132,1338,158],{}," boolean.",[604,1341,1342,1345],{},[221,1343,1344],{},"Image size and format."," OpenAI's guide allows image files up to 20 MB. openshield accepts JPEG, PNG, WebP or GIF up to 15 MB.",[604,1347,1348,1351,1352,1355,1356,1358,1359,1361],{},[221,1349,1350],{},"No inline moderation on a generation API."," If you passed a ",[132,1353,1354],{},"moderation"," object on an OpenAI Responses or Chat Completions request, that has no equivalent here. Check the input or the generated text with ",[132,1357,134],{},", and images with ",[132,1360,138],{},", once you have them.",[604,1363,1364,1367,1368,1371],{},[221,1365,1366],{},"The key is server-side."," A request that carries a browser ",[132,1369,1370],{},"Origin"," header is refused.",[604,1373,1374,1377,1378,1380,1381,312],{},[221,1375,1376],{},"Content is not stored."," It is checked in memory and forgotten when the answer is sent. The journal keeps the decision, the reasons, the scores, the workflow version and your ",[132,1379,435],{},". See ",[141,1382,99],{"href":100},[604,1384,1385,1388],{},[221,1386,1387],{},"Checks are processed in the EU",": the checking server and the databases are there.",[317,1390,1392],{"id":1391},"pricing","Pricing",[128,1394,1395,1396,1402],{},"openshield prices are beta, in euros, excluding VAT, as published on the ",[141,1397,1401],{"href":1398,"rel":1399},"https:\u002F\u002Fwww.openshield.dev\u002Fpricing",[1400],"nofollow","pricing page"," on 17 November 2026:",[601,1404,1405,1408,1411,1414],{},[604,1406,1407],{},"2,000 free usage credits each month, no card (1 credit = EUR 0.001, so up to 1,000 images). It is shared with fraud calls and does not carry over.",[604,1409,1410],{},"EUR 0.002 per image for a usual workflow (nudity and visual categories), so EUR 2 excluding VAT per 1,000 images.",[604,1412,1413],{},"EUR 0.003 per started 1,000 characters for a text checked with rules and AI.",[604,1415,1416],{},"No subscription: a prepaid balance, topped up from EUR 5.",[128,1418,1419,1421,1422,1424],{},[141,1420,41],{"href":42}," lists every component price. OpenAI's moderation endpoint was listed as free on 17 November 2026 (",[132,1423,154],{}," on its pricing page, and \"The moderation endpoint is free to use\" in its guide). The billed units differ, so this is not a like-for-like price comparison: confirm each page before you decide.",[128,1426,1427,1428,280,1432,312],{},"If you moderate listings or profiles, see ",[141,1429,1431],{"href":1430},"\u002Ffor\u002Fmarketplaces","moderation for marketplaces",[141,1433,1435],{"href":1434},"\u002Ffor\u002Fdating","moderation for dating apps",[317,1437,1439],{"id":1438},"questions","Questions",[1441,1442],"docs-faq",{":items":1443},"[{\"question\":\"Is openshield a drop-in replacement for the OpenAI moderation API?\",\"answer\":\"No. The host, paths, bodies and answer are different. Only the SightEngine workflow routes follow another provider's format. You call POST \u002Fv1\u002Ftext or POST \u002Fv1\u002Fimage and map summary.action.\"},{\"question\":\"Can I send a caption and an image in one request, as with OpenAI's input array?\",\"answer\":\"No. Send the caption to \u002Fv1\u002Ftext and the image to \u002Fv1\u002Fimage. You can pass the same ref on each of the two calls.\"},{\"question\":\"How should I treat review if my code only knows flagged?\",\"answer\":\"Do not publish. Hold the content for your team. Mapping review to not flagged would publish content the workflow asked you to hold.\"},{\"question\":\"Does openshield store the content it checks?\",\"answer\":\"No. Content is checked in memory and forgotten when the answer is sent. The journal keeps metadata only.\"},{\"question\":\"Where are checks processed?\",\"answer\":\"In the European Union: the checking server and the databases are there.\"},{\"question\":\"What does a check cost?\",\"answer\":\"Beta prices, in euros, excluding VAT. A usual image workflow is EUR 0.002 an image (EUR 2 excluding VAT per 1,000 images). A text checked with rules and AI is EUR 0.003 per started 1,000 characters. Every account gets 2,000 free usage credits each month, no card (1 credit = EUR 0.001, up to 1,000 images). OpenAI's moderation endpoint was listed as free as of 17 November 2026: confirm its pricing page. The full openshield grid is on the pricing page.\"}]",[128,1445,1446,1447,312],{},"OpenAI and the OpenAI moderation API are trademarks of their owner. openshield is not affiliated with or endorsed by OpenAI. If a fact about the OpenAI moderation API on this page is wrong, write to ",[141,1448,1450],{"href":1449},"mailto:contact@sway.events","contact@sway.events",[1452,1453,1454],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}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);}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":337,"searchDepth":372,"depth":372,"links":1456},[1457,1458,1459,1460,1461,1462,1463],{"id":319,"depth":372,"text":320},{"id":457,"depth":372,"text":458},{"id":592,"depth":372,"text":593},{"id":1054,"depth":372,"text":1055},{"id":1302,"depth":372,"text":1303},{"id":1391,"depth":372,"text":1392},{"id":1438,"depth":372,"text":1439},"Move from OpenAI's \u002Fv1\u002Fmoderations endpoint to openshield: call POST \u002Fv1\u002Ftext or POST \u002Fv1\u002Fimage, then map the decision. Not a drop-in replacement.","md",null,{},true,{"title":29,"description":1464},"x7_e92wb6eiD2P0a6dq1WCnblcPiblwRhaBPTSWaO6M",[1472,1474],{"title":25,"path":26,"stem":27,"description":1473,"children":-1},"Three SightEngine workflow routes work here with the same paths, request fields and answer envelope. Change the base URL and key, map the category ids.",{"title":33,"path":34,"stem":35,"description":1475,"children":-1},"A workflow decides which categories are checked and how strictly, with thresholds, custom categories and versions.",1795179564499]