[{"data":1,"prerenderedAt":371},["ShallowReactive",2],{"navigation_docs":3,"-docs-journal-and-ref":102,"-docs-journal-and-ref-surround":366},[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":41,"body":104,"description":359,"extension":360,"links":361,"meta":362,"navigation":363,"path":42,"seo":364,"stem":43,"__hash__":365},"docs\u002Fdocs\u002F09.journal-and-ref.md",{"type":105,"value":106,"toc":352},"minimark",[107,119,124,127,165,172,176,212,215,219,224,290,296,303,307,310,327,334,338,348],[108,109,110,111,118],"p",{},"The journal is the record of the decisions the API made for your organization. You read it in the ",[112,113,117],"a",{"href":114,"rel":115},"https:\u002F\u002Fopenshield.dev\u002Fdashboard\u002Fjournal",[116],"nofollow","dashboard",", filter it, and export it.",[120,121,123],"h2",{"id":122},"what-a-row-holds","What a row holds",[108,125,126],{},"One row per check:",[128,129,130,139,142,145,148,155,158],"ul",{},[131,132,133,134,138],"li",{},"the time and the ",[135,136,137],"code",{},"request_id",";",[131,140,141],{},"the key, by id and name;",[131,143,144],{},"the kind (image or text), the workflow and its version;",[131,146,147],{},"the decision, and the reasons with their scores and thresholds;",[131,149,150,151,154],{},"the categories the workflow could not check (",[135,152,153],{},"unchecked",");",[131,156,157],{},"how long the check took, and the size of the content in bytes;",[131,159,160,161,164],{},"your ",[135,162,163],{},"ref",", if you sent one.",[108,166,167,171],{},[168,169,170],"strong",{},"Never stored",": the content itself, whatever it is, the IP address of your users, and their browser. The journal keeps what the API decided, never what it was asked about.",[120,173,175],{"id":174},"how-long-it-is-kept","How long it is kept",[177,178,179,192],"table",{},[180,181,182],"thead",{},[183,184,185,189],"tr",{},[186,187,188],"th",{},"Plan",[186,190,191],{},"Days kept",[193,194,195,204],"tbody",{},[183,196,197,201],{},[198,199,200],"td",{},"Free",[198,202,203],{},"7",[183,205,206,209],{},[198,207,208],{},"Starter, Growth, Scale",[198,210,211],{},"30",[108,213,214],{},"Older rows are deleted every day. Export what you need to keep for longer.",[120,216,218],{"id":217},"ref-your-own-id-for-the-content","ref: your own id for the content",[108,220,221,223],{},[135,222,163],{}," is the id your system gives the image or the text: a post id, a message id, a user id. It is 1 to 128 characters with no control character.",[225,226,231],"pre",{"className":227,"code":228,"language":229,"meta":230,"style":230},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","curl -X POST \"https:\u002F\u002Fapi.openshield.dev\u002Fv1\u002Fimage?ref=post_8812\" \\\n  -H \"Authorization: Bearer $OPENMOD_API_KEY\" \\\n  --data-binary @photo.jpg\n","bash","",[135,232,233,263,281],{"__ignoreMap":230},[234,235,238,242,246,249,253,256,259],"span",{"class":236,"line":237},"line",1,[234,239,241],{"class":240},"sBMFI","curl",[234,243,245],{"class":244},"sfazB"," -X",[234,247,248],{"class":244}," POST",[234,250,252],{"class":251},"sMK4o"," \"",[234,254,255],{"class":244},"https:\u002F\u002Fapi.openshield.dev\u002Fv1\u002Fimage?ref=post_8812",[234,257,258],{"class":251},"\"",[234,260,262],{"class":261},"sTEyZ"," \\\n",[234,264,266,269,271,274,277,279],{"class":236,"line":265},2,[234,267,268],{"class":244},"  -H",[234,270,252],{"class":251},[234,272,273],{"class":244},"Authorization: Bearer ",[234,275,276],{"class":261},"$OPENMOD_API_KEY",[234,278,258],{"class":251},[234,280,262],{"class":261},[234,282,284,287],{"class":236,"line":283},3,[234,285,286],{"class":244},"  --data-binary",[234,288,289],{"class":244}," @photo.jpg\n",[108,291,292,293,295],{},"The API echoes it in the answer and keeps it in the journal. When a user asks why their upload was refused, you search the journal for the ",[135,294,163],{}," and see the decision, the reasons and the workflow version, and openshield never had to keep the upload to answer.",[297,298,299,300,302],"warning",{},"Do not put personal data in a ",[135,301,163],{},". Use an opaque id from your own database.",[120,304,306],{"id":305},"filtering-and-exporting","Filtering and exporting",[108,308,309],{},"The journal screen filters by:",[128,311,312,315,318,321],{},[131,313,314],{},"the decision (accepted, to review, rejected);",[131,316,317],{},"the kind, the key and the workflow;",[131,319,320],{},"a range of time;",[131,322,323,324,326],{},"the start of a ",[135,325,163],{},".",[108,328,329,330,333],{},"A row opens a detail panel with every reason. ",[168,331,332],{},"Export"," writes the rows of the filter, for any range inside the retention window, as JSONL or CSV.",[120,335,337],{"id":336},"from-a-refusal-to-the-row","From a refusal to the row",[108,339,340,341,343,344,347],{},"Every answer carries a ",[135,342,137],{},", in the body and in the ",[135,345,346],{},"X-Request-Id"," header. Log it next to your own records: it is the id of the journal row, and the first thing to quote if you write to support.",[349,350,351],"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);}",{"title":230,"searchDepth":265,"depth":265,"links":353},[354,355,356,357,358],{"id":122,"depth":265,"text":123},{"id":174,"depth":265,"text":175},{"id":217,"depth":265,"text":218},{"id":305,"depth":265,"text":306},{"id":336,"depth":265,"text":337},"What the decision journal keeps, how long, and how your own id (ref) lets you find a decision.","md",null,{},true,{"title":41,"description":359},"S3SiOWxMVdAojkDYa6UfohDsVtdKzfcFvyKOHQuAmMI",[367,369],{"title":37,"path":38,"stem":39,"description":368,"children":-1},"What each plan includes, how fast you may call the API, and what happens when a limit is reached.",{"title":50,"path":51,"stem":52,"description":370,"children":-1},"A small moderation module for Node.js 18 or later, with timeouts and a decision that fails closed.",1792436179912]