<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.stoney-cloud.com/w/index.php?action=history&amp;feed=atom&amp;title=AI_on_demand%3A_lightonai%2FLightOnOCR-2-1B</id>
	<title>AI on demand: lightonai/LightOnOCR-2-1B - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.stoney-cloud.com/w/index.php?action=history&amp;feed=atom&amp;title=AI_on_demand%3A_lightonai%2FLightOnOCR-2-1B"/>
	<link rel="alternate" type="text/html" href="https://wiki.stoney-cloud.com/w/index.php?title=AI_on_demand:_lightonai/LightOnOCR-2-1B&amp;action=history"/>
	<updated>2026-07-10T20:35:04Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.6</generator>
	<entry>
		<id>https://wiki.stoney-cloud.com/w/index.php?title=AI_on_demand:_lightonai/LightOnOCR-2-1B&amp;diff=1056&amp;oldid=prev</id>
		<title>Sst-yde: /* Calling the model */</title>
		<link rel="alternate" type="text/html" href="https://wiki.stoney-cloud.com/w/index.php?title=AI_on_demand:_lightonai/LightOnOCR-2-1B&amp;diff=1056&amp;oldid=prev"/>
		<updated>2026-05-28T08:15:00Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Calling the model&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:15, 28 May 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Calling the model ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Calling the model ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Image:testocr.png|thumb|The image used in the example to run OCR against.]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Set your personal key:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Set your personal key:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mw_3738417_app?h005:diff::1.12:old-1052:rev-1056 --&gt;
&lt;/table&gt;</summary>
		<author><name>Sst-yde</name></author>
	</entry>
	<entry>
		<id>https://wiki.stoney-cloud.com/w/index.php?title=AI_on_demand:_lightonai/LightOnOCR-2-1B&amp;diff=1052&amp;oldid=prev</id>
		<title>Sst-yde: Created page with &quot;== Calling the model == &lt;syntaxhighlight lang=&quot;bash&quot;&gt; # Set your personal key: STONEY_KEY=sk-...  # Set the desired model: MODEL=lightonai/LightOnOCR-2-1B  # Set the desired document to run OCR against: FILE_PATH=document.png  # Encode document contents with Base64 and detect MIME type: FILE_CONTENT_BASE64=$(base64 -w 0 &lt; &quot;$FILE_PATH&quot;) FILE_MIME_TYPE=$(file --brief --mime-type &quot;$FILE_PATH&quot;)  curl https://llm.stoney-cloud.com/v1/chat/completions \         --silent --fail...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.stoney-cloud.com/w/index.php?title=AI_on_demand:_lightonai/LightOnOCR-2-1B&amp;diff=1052&amp;oldid=prev"/>
		<updated>2026-05-11T09:26:08Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Calling the model == &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; # Set your personal key: STONEY_KEY=sk-...  # Set the desired model: MODEL=lightonai/LightOnOCR-2-1B  # Set the desired document to run OCR against: FILE_PATH=document.png  # Encode document contents with Base64 and detect MIME type: FILE_CONTENT_BASE64=$(base64 -w 0 &amp;lt; &amp;quot;$FILE_PATH&amp;quot;) FILE_MIME_TYPE=$(file --brief --mime-type &amp;quot;$FILE_PATH&amp;quot;)  curl https://llm.stoney-cloud.com/v1/chat/completions \         --silent --fail...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Calling the model ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Set your personal key:&lt;br /&gt;
STONEY_KEY=sk-...&lt;br /&gt;
&lt;br /&gt;
# Set the desired model:&lt;br /&gt;
MODEL=lightonai/LightOnOCR-2-1B&lt;br /&gt;
&lt;br /&gt;
# Set the desired document to run OCR against:&lt;br /&gt;
FILE_PATH=document.png&lt;br /&gt;
&lt;br /&gt;
# Encode document contents with Base64 and detect MIME type:&lt;br /&gt;
FILE_CONTENT_BASE64=$(base64 -w 0 &amp;lt; &amp;quot;$FILE_PATH&amp;quot;)&lt;br /&gt;
FILE_MIME_TYPE=$(file --brief --mime-type &amp;quot;$FILE_PATH&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
curl https://llm.stoney-cloud.com/v1/chat/completions \&lt;br /&gt;
        --silent --fail --show-error \&lt;br /&gt;
        --header &amp;quot;Authorization: Bearer $STONEY_KEY&amp;quot; \&lt;br /&gt;
        --header &amp;#039;Content-Type: application/json&amp;#039; \&lt;br /&gt;
        --data &amp;#039;{&lt;br /&gt;
                &amp;quot;model&amp;quot;: &amp;quot;&amp;#039;&amp;quot;$MODEL&amp;quot;&amp;#039;&amp;quot;,&lt;br /&gt;
                &amp;quot;messages&amp;quot;: [{&lt;br /&gt;
                        &amp;quot;role&amp;quot;: &amp;quot;user&amp;quot;,&lt;br /&gt;
                        &amp;quot;content&amp;quot;: [{&lt;br /&gt;
                                &amp;quot;type&amp;quot;: &amp;quot;image_url&amp;quot;,&lt;br /&gt;
                                &amp;quot;image_url&amp;quot;: {&lt;br /&gt;
                                        &amp;quot;url&amp;quot;: &amp;quot;data:&amp;#039;&amp;quot;$FILE_MIME_TYPE&amp;quot;&amp;#039;;base64,&amp;#039;&amp;quot;$FILE_CONTENT_BASE64&amp;quot;&amp;#039;&amp;quot;&lt;br /&gt;
                                }&lt;br /&gt;
                        }]&lt;br /&gt;
                }],&lt;br /&gt;
                &amp;quot;max_tokens&amp;quot;: 4096,&lt;br /&gt;
                &amp;quot;temperature&amp;quot;: 0.2,&lt;br /&gt;
                &amp;quot;top_p&amp;quot;: 0.9&lt;br /&gt;
        }&amp;#039; \&lt;br /&gt;
        | jq&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example output:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;id&amp;quot;: &amp;quot;chatcmpl-b9d11ab9588ee638&amp;quot;,&lt;br /&gt;
  &amp;quot;object&amp;quot;: &amp;quot;chat.completion&amp;quot;,&lt;br /&gt;
  &amp;quot;created&amp;quot;: 1778491557,&lt;br /&gt;
  &amp;quot;model&amp;quot;: &amp;quot;lightonai/LightOnOCR-2-1B&amp;quot;,&lt;br /&gt;
  &amp;quot;choices&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;index&amp;quot;: 0,&lt;br /&gt;
      &amp;quot;message&amp;quot;: {&lt;br /&gt;
        &amp;quot;role&amp;quot;: &amp;quot;assistant&amp;quot;,&lt;br /&gt;
        &amp;quot;content&amp;quot;: &amp;quot;This is a lot of 12 point text to test the ocr code and see if it works on all types of file format.\n\nThe quick brown dog jumped over the lazy fox. The quick brown dog jumped over the lazy fox. The quick brown dog jumped over the lazy fox. The quick brown dog jumped over the lazy fox.&amp;quot;,&lt;br /&gt;
        &amp;quot;refusal&amp;quot;: null,&lt;br /&gt;
        &amp;quot;annotations&amp;quot;: null,&lt;br /&gt;
        &amp;quot;audio&amp;quot;: null,&lt;br /&gt;
        &amp;quot;function_call&amp;quot;: null,&lt;br /&gt;
        &amp;quot;tool_calls&amp;quot;: [],&lt;br /&gt;
        &amp;quot;reasoning&amp;quot;: null&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;logprobs&amp;quot;: null,&lt;br /&gt;
      &amp;quot;finish_reason&amp;quot;: &amp;quot;stop&amp;quot;,&lt;br /&gt;
      &amp;quot;stop_reason&amp;quot;: null,&lt;br /&gt;
      &amp;quot;token_ids&amp;quot;: null&lt;br /&gt;
    }&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;service_tier&amp;quot;: null,&lt;br /&gt;
  &amp;quot;system_fingerprint&amp;quot;: null,&lt;br /&gt;
  &amp;quot;usage&amp;quot;: {&lt;br /&gt;
    &amp;quot;prompt_tokens&amp;quot;: 426,&lt;br /&gt;
    &amp;quot;total_tokens&amp;quot;: 495,&lt;br /&gt;
    &amp;quot;completion_tokens&amp;quot;: 69,&lt;br /&gt;
    &amp;quot;prompt_tokens_details&amp;quot;: null&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;prompt_logprobs&amp;quot;: null,&lt;br /&gt;
  &amp;quot;prompt_token_ids&amp;quot;: null,&lt;br /&gt;
  &amp;quot;kv_transfer_params&amp;quot;: null&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:AI on demand]]&lt;/div&gt;</summary>
		<author><name>Sst-yde</name></author>
	</entry>
</feed>