{
  "aboutHtml": "<p>GPT-4.1 Nano är OpenAI:s snabbaste medlem i GPT-4.1-familjen, utformad för instruktionsföljning och verktygsanrop utan ett separat resonemangssteg. Den tar emot text och bilder och producerar text. Nano passar en väldefinierad operation där applikationen behöver ett kompakt svar, en uppsättning fält eller nästa verktygsförfrågan snarare än en omfattande undersökning.</p><p>Ett användbart exempel är att sortera inkommande meddelanden enligt en tillhandahållen kategoriuppsättning. Förklara varje kategori, visa hur tvetydiga meddelanden eller meddelanden utanför uppgiftens ram ska uttryckas och be om kategorin tillsammans med källfrasen som stöder den. För extraktion definierar du fältnamn, tillåtna värden och hantering av saknad information. För en kort skrivuppgift anger du fakta och ber om den specifika passage som nästa applikationssteg behöver. Exemplen och begränsningarna ska vara tillräckligt små för att förbli tydliga även när källsamlingen är stor.</p><p>Tillverkaren anger ett kontextfönster på 1 047 576 token, högst 32 768 token i utdata och en kunskapsgräns den 1 juni 2024. Specifikationerna matchar fönstret för GPT-4.1 Mini och bevarar samtidigt Nanos separata modellidentitet och roll med fokus på kort svarstid. Märk dokument och samtalsavsnitt, ta endast med kontext som är relevant för operationen och lämna plats för hela svaret. Sökresultat eller tillhandahållen referenstext kan ge fakta som är nyare än modellens inlärda kunskap.</p><p>Nano stöder strömning och Structured Outputs. Ett schemabegränsat slutligt svar har ett annat syfte än ett funktionsanrop: det ena ger applikationen ett färdigt resultat, medan det andra ber den utföra en operation. Structured Outputs stöder en delmängd av JSON Schema; definiera obligatoriska egenskaper och en tydlig representation för okända värden. Hantera avböjanden och ofullständiga svar separat och kontrollera de extraherade värdena mot indata i stället för att likställa en giltig form med en korrekt slutsats.</p><p>Den dokumenterade verktygsuppsättningen omfattar funktionsanrop, filsökning, kodtolkning, MCP-anslutningar och ett separat bildgenereringsverktyg. Applikationen tillhandahåller verktygsbeskrivningar och scheman, utför anpassade funktioner och returnerar deras faktiska resultat. För Nano-versionen från den 14 april 2025 rekommenderar OpenAI specifikt att parallella verktygsanrop stängs av eftersom modellen kan begära samma verktyg flera gånger under en tur. Det är en versionsspecifik hänsyn vid körningen, inte en anledning att tolka flera föreslagna anrop som utförda åtgärder.</p><p>Bildindata tillför visuellt underlag till en textuppgift, exempelvis att läsa en synlig etikett eller beskriva tillståndet i en skärmbild. Använd bilder i PNG, JPEG, WebP eller icke-animerad GIF som stöds, håll texten läsbar och förklara vilken observation som är viktig. Bildguiden nämner svårigheter med liten eller roterad text, exakta rumsliga relationer, antal föremål och viss text med andra än latinska skriftsystem. Ange omgivande kontext när en beskärning ensam skulle göra en etikett eller ett diagram tvetydigt. Nanos eget svar är text; ett bildgenereringsverktyg returnerar en egen separat artefakt. I OpenAI:s dokumenterade bildarbetsflöde är den totala datamängden i förfrågan begränsad till 512 MB och en förfrågan kan innehålla upp till 1 500 bilder; bilderna och texten måste också rymmas i modellens kontext.</p><p>I tillverkarens filarbetsflöde får en modell med bildförståelse både extraherad text och sidbilder från PDF-filer. Andra dokumentformat bidrar med extraherad text, och komplettering av kalkylbladsdata använder upp till de första 1 000 raderna per blad. En fil måste vara mindre än 50 MB, med en sammanlagd gräns på 50 MB per förfrågan. Chat Completions stöder PDF-fildelar, medan det dokumenterade Responses-arbetsflödet accepterar ytterligare filtyper. Inbäddade diagram i andra dokument än PDF överförs inte som bildinnehåll, så en PDF-representation är användbar när det visuella underlaget är viktigt.</p><p>OpenAI dokumenterar promptcache för Nano och Predicted Outputs för GPT-4.1 Nano-serien. Promptcache återanvänder ett kvalificerat indataprefix i tillverkarens tjänst. Predicted Outputs anger i stället till stor del känd utdatatext för en ändring, exempelvis att bearbeta ett dokument eller en kodfil och bevara dess oförändrade delar. Prediktionsvägen stöder endast text och utesluter bland annat funktionsanrop, logprobs och max_completion_tokens. Välj väg efter den faktiska operationen och håll resultatet kopplat till den ursprungliga källan.</p><p>Tillverkaren dokumenterar även övervakad finjustering och direkt preferensoptimering för Nanos namngivna GPT-4.1-version. Träningsexempel och föredragna respektive avvisade svar anpassar en modell till en återkommande uppgift; de skiljer sig från den kontext som tillhandahålls i en vanlig förfrågan. För ett praktiskt extraktions- eller klassificeringssteg börjar du med tydliga kategorier, exempel och ett uttryckligt slutformat och granskar sedan om de returnerade fälten bevarar de fakta som nästa steg ska använda.</p>",
  "aboutText": "GPT-4.1 Nano är OpenAI:s snabbaste medlem i GPT-4.1-familjen, utformad för instruktionsföljning och verktygsanrop utan ett separat resonemangssteg. Den tar emot text och bilder och producerar text. Nano passar en väldefinierad operation där applikationen behöver ett kompakt svar, en uppsättning fält eller nästa verktygsförfrågan snarare än en omfattande undersökning.\n\nEtt användbart exempel är att sortera inkommande meddelanden enligt en tillhandahållen kategoriuppsättning. Förklara varje kategori, visa hur tvetydiga meddelanden eller meddelanden utanför uppgiftens ram ska uttryckas och be om kategorin tillsammans med källfrasen som stöder den. För extraktion definierar du fältnamn, tillåtna värden och hantering av saknad information. För en kort skrivuppgift anger du fakta och ber om den specifika passage som nästa applikationssteg behöver. Exemplen och begränsningarna ska vara tillräckligt små för att förbli tydliga även när källsamlingen är stor.\n\nTillverkaren anger ett kontextfönster på 1 047 576 token, högst 32 768 token i utdata och en kunskapsgräns den 1 juni 2024. Specifikationerna matchar fönstret för GPT-4.1 Mini och bevarar samtidigt Nanos separata modellidentitet och roll med fokus på kort svarstid. Märk dokument och samtalsavsnitt, ta endast med kontext som är relevant för operationen och lämna plats för hela svaret. Sökresultat eller tillhandahållen referenstext kan ge fakta som är nyare än modellens inlärda kunskap.\n\nNano stöder strömning och Structured Outputs. Ett schemabegränsat slutligt svar har ett annat syfte än ett funktionsanrop: det ena ger applikationen ett färdigt resultat, medan det andra ber den utföra en operation. Structured Outputs stöder en delmängd av JSON Schema; definiera obligatoriska egenskaper och en tydlig representation för okända värden. Hantera avböjanden och ofullständiga svar separat och kontrollera de extraherade värdena mot indata i stället för att likställa en giltig form med en korrekt slutsats.\n\nDen dokumenterade verktygsuppsättningen omfattar funktionsanrop, filsökning, kodtolkning, MCP-anslutningar och ett separat bildgenereringsverktyg. Applikationen tillhandahåller verktygsbeskrivningar och scheman, utför anpassade funktioner och returnerar deras faktiska resultat. För Nano-versionen från den 14 april 2025 rekommenderar OpenAI specifikt att parallella verktygsanrop stängs av eftersom modellen kan begära samma verktyg flera gånger under en tur. Det är en versionsspecifik hänsyn vid körningen, inte en anledning att tolka flera föreslagna anrop som utförda åtgärder.\n\nBildindata tillför visuellt underlag till en textuppgift, exempelvis att läsa en synlig etikett eller beskriva tillståndet i en skärmbild. Använd bilder i PNG, JPEG, WebP eller icke-animerad GIF som stöds, håll texten läsbar och förklara vilken observation som är viktig. Bildguiden nämner svårigheter med liten eller roterad text, exakta rumsliga relationer, antal föremål och viss text med andra än latinska skriftsystem. Ange omgivande kontext när en beskärning ensam skulle göra en etikett eller ett diagram tvetydigt. Nanos eget svar är text; ett bildgenereringsverktyg returnerar en egen separat artefakt. I OpenAI:s dokumenterade bildarbetsflöde är den totala datamängden i förfrågan begränsad till 512 MB och en förfrågan kan innehålla upp till 1 500 bilder; bilderna och texten måste också rymmas i modellens kontext.\n\nI tillverkarens filarbetsflöde får en modell med bildförståelse både extraherad text och sidbilder från PDF-filer. Andra dokumentformat bidrar med extraherad text, och komplettering av kalkylbladsdata använder upp till de första 1 000 raderna per blad. En fil måste vara mindre än 50 MB, med en sammanlagd gräns på 50 MB per förfrågan. Chat Completions stöder PDF-fildelar, medan det dokumenterade Responses-arbetsflödet accepterar ytterligare filtyper. Inbäddade diagram i andra dokument än PDF överförs inte som bildinnehåll, så en PDF-representation är användbar när det visuella underlaget är viktigt.\n\nOpenAI dokumenterar promptcache för Nano och Predicted Outputs för GPT-4.1 Nano-serien. Promptcache återanvänder ett kvalificerat indataprefix i tillverkarens tjänst. Predicted Outputs anger i stället till stor del känd utdatatext för en ändring, exempelvis att bearbeta ett dokument eller en kodfil och bevara dess oförändrade delar. Prediktionsvägen stöder endast text och utesluter bland annat funktionsanrop, logprobs och max_completion_tokens. Välj väg efter den faktiska operationen och håll resultatet kopplat till den ursprungliga källan.\n\nTillverkaren dokumenterar även övervakad finjustering och direkt preferensoptimering för Nanos namngivna GPT-4.1-version. Träningsexempel och föredragna respektive avvisade svar anpassar en modell till en återkommande uppgift; de skiljer sig från den kontext som tillhandahålls i en vanlig förfrågan. För ett praktiskt extraktions- eller klassificeringssteg börjar du med tydliga kategorier, exempel och ett uttryckligt slutformat och granskar sedan om de returnerade fälten bevarar de fakta som nästa steg ska använda.",
  "editorialOverlay": {
    "copy_fields": null,
    "copy_sha256": null,
    "copy_source": null,
    "html_sha256": "f0fc4beaab5cc27c49531ce9e3472c58fe22ac19097f483b7cd168ed45e174ea",
    "module_sha256": "ee9dc1c50b1e6a8fb7fa062030fcb4646b9aaaeb08be513b723a5a92a7290f06",
    "raw_model_unchanged": true,
    "schema": "ailoot-native-model-editorial-v1"
  },
  "locale": "sv",
  "methods": [
    {
      "html": "<div class=\"sheet-head\"><span class=\"mav\" aria-hidden=\"true\">O</span><h2 id=\"sheet-title\">OpenAI: GPT-4.1 Nano (batch)</h2><button class=\"icon-btn\" type=\"button\" data-close-sheet aria-label=\"Stäng\">×</button></div><div class=\"idline\"><span>OpenAI /</span><code>openai/gpt-4.1-nano:batch</code><button type=\"button\" id=\"copy-id\">Kopiera ID</button></div><nav class=\"card-jump-nav\" aria-label=\"Modellkortets avsnitt\"><button type=\"button\" data-card-jump=\"overview\">Start</button><button type=\"button\" data-card-jump=\"methods\">Indata &amp; metoder</button><button type=\"button\" data-card-jump=\"pricing\">Priser</button><button type=\"button\" data-card-jump=\"examples\">Exempel</button><button type=\"button\" data-card-jump=\"results\">Resultat</button><button type=\"button\" data-card-jump=\"aliases\">Alias</button></nav><div class=\"card-method-tabs\" role=\"tablist\" aria-label=\"API-metoder\"><button type=\"button\" role=\"tab\" tabindex=\"0\" aria-controls=\"card-method-content\" aria-selected=\"true\" id=\"card-method-tab-0\" data-card-method=\"Ultra|batches|/v1/batches|openai%2Fgpt-4.1-nano%3Abatch\">Omgångar</button></div><div id=\"card-method-content\" role=\"tabpanel\" aria-labelledby=\"card-method-tab-0\"><section class=\"card-section\" data-card-section=\"overview\"><h3 tabindex=\"-1\">Start</h3><p class=\"mdesc-full\">GPT-4.1 Nano är den kompakta medlemmen i GPT-4.1-familjen med kort svarstid för noggrant specificerade text- och bilduppgifter. Dess stora kontext, Structured Outputs och funktionsanrop stöder klassificering, extraktion och avgränsade applikationssteg.</p><dl class=\"card-io\" data-card-io><div><dt>Godkända indata</dt><dd>Text</dd></div><div><dt>Resultat</dt><dd>Text</dd></div></dl><details class=\"card-about\"><summary>Om modellen</summary><p class=\"note-s\" data-model-method-boundary>Den här beskrivningen omfattar modellens förmågor. Tillgängliga indata, utdata och alternativ i Ailoot anges nedan för den valda metoden.</p><div class=\"mabout\" id=\"m-about\"><p>GPT-4.1 Nano är OpenAI:s snabbaste medlem i GPT-4.1-familjen, utformad för instruktionsföljning och verktygsanrop utan ett separat resonemangssteg. Den tar emot text och bilder och producerar text. Nano passar en väldefinierad operation där applikationen behöver ett kompakt svar, en uppsättning fält eller nästa verktygsförfrågan snarare än en omfattande undersökning.</p><p>Ett användbart exempel är att sortera inkommande meddelanden enligt en tillhandahållen kategoriuppsättning. Förklara varje kategori, visa hur tvetydiga meddelanden eller meddelanden utanför uppgiftens ram ska uttryckas och be om kategorin tillsammans med källfrasen som stöder den. För extraktion definierar du fältnamn, tillåtna värden och hantering av saknad information. För en kort skrivuppgift anger du fakta och ber om den specifika passage som nästa applikationssteg behöver. Exemplen och begränsningarna ska vara tillräckligt små för att förbli tydliga även när källsamlingen är stor.</p><p>Tillverkaren anger ett kontextfönster på 1 047 576 token, högst 32 768 token i utdata och en kunskapsgräns den 1 juni 2024. Specifikationerna matchar fönstret för GPT-4.1 Mini och bevarar samtidigt Nanos separata modellidentitet och roll med fokus på kort svarstid. Märk dokument och samtalsavsnitt, ta endast med kontext som är relevant för operationen och lämna plats för hela svaret. Sökresultat eller tillhandahållen referenstext kan ge fakta som är nyare än modellens inlärda kunskap.</p><p>Nano stöder strömning och Structured Outputs. Ett schemabegränsat slutligt svar har ett annat syfte än ett funktionsanrop: det ena ger applikationen ett färdigt resultat, medan det andra ber den utföra en operation. Structured Outputs stöder en delmängd av JSON Schema; definiera obligatoriska egenskaper och en tydlig representation för okända värden. Hantera avböjanden och ofullständiga svar separat och kontrollera de extraherade värdena mot indata i stället för att likställa en giltig form med en korrekt slutsats.</p><p>Den dokumenterade verktygsuppsättningen omfattar funktionsanrop, filsökning, kodtolkning, MCP-anslutningar och ett separat bildgenereringsverktyg. Applikationen tillhandahåller verktygsbeskrivningar och scheman, utför anpassade funktioner och returnerar deras faktiska resultat. För Nano-versionen från den 14 april 2025 rekommenderar OpenAI specifikt att parallella verktygsanrop stängs av eftersom modellen kan begära samma verktyg flera gånger under en tur. Det är en versionsspecifik hänsyn vid körningen, inte en anledning att tolka flera föreslagna anrop som utförda åtgärder.</p><p>Bildindata tillför visuellt underlag till en textuppgift, exempelvis att läsa en synlig etikett eller beskriva tillståndet i en skärmbild. Använd bilder i PNG, JPEG, WebP eller icke-animerad GIF som stöds, håll texten läsbar och förklara vilken observation som är viktig. Bildguiden nämner svårigheter med liten eller roterad text, exakta rumsliga relationer, antal föremål och viss text med andra än latinska skriftsystem. Ange omgivande kontext när en beskärning ensam skulle göra en etikett eller ett diagram tvetydigt. Nanos eget svar är text; ett bildgenereringsverktyg returnerar en egen separat artefakt. I OpenAI:s dokumenterade bildarbetsflöde är den totala datamängden i förfrågan begränsad till 512 MB och en förfrågan kan innehålla upp till 1 500 bilder; bilderna och texten måste också rymmas i modellens kontext.</p><p>I tillverkarens filarbetsflöde får en modell med bildförståelse både extraherad text och sidbilder från PDF-filer. Andra dokumentformat bidrar med extraherad text, och komplettering av kalkylbladsdata använder upp till de första 1 000 raderna per blad. En fil måste vara mindre än 50 MB, med en sammanlagd gräns på 50 MB per förfrågan. Chat Completions stöder PDF-fildelar, medan det dokumenterade Responses-arbetsflödet accepterar ytterligare filtyper. Inbäddade diagram i andra dokument än PDF överförs inte som bildinnehåll, så en PDF-representation är användbar när det visuella underlaget är viktigt.</p><p>OpenAI dokumenterar promptcache för Nano och Predicted Outputs för GPT-4.1 Nano-serien. Promptcache återanvänder ett kvalificerat indataprefix i tillverkarens tjänst. Predicted Outputs anger i stället till stor del känd utdatatext för en ändring, exempelvis att bearbeta ett dokument eller en kodfil och bevara dess oförändrade delar. Prediktionsvägen stöder endast text och utesluter bland annat funktionsanrop, logprobs och max_completion_tokens. Välj väg efter den faktiska operationen och håll resultatet kopplat till den ursprungliga källan.</p><p>Tillverkaren dokumenterar även övervakad finjustering och direkt preferensoptimering för Nanos namngivna GPT-4.1-version. Träningsexempel och föredragna respektive avvisade svar anpassar en modell till en återkommande uppgift; de skiljer sig från den kontext som tillhandahålls i en vanlig förfrågan. För ett praktiskt extraktions- eller klassificeringssteg börjar du med tydliga kategorier, exempel och ett uttryckligt slutformat och granskar sedan om de returnerade fälten bevarar de fakta som nästa steg ska använda.</p></div></details></section><section class=\"card-section\" data-card-section=\"methods\"><h3 tabindex=\"-1\">Tillgängligt i Ailoot · indata &amp; metoder</h3><details class=\"card-method\" open><summary><b>Ailoot Ultra · Batchkörning</b> <code>POST /v1/batches</code></summary><dl class=\"method-capabilities\"><div><dt>Indatatyper</dt><dd><code>text</code></dd></div><div><dt>Utdatatyper</dt><dd><code>text</code></dd></div><div><dt>Utdataformat</dt><dd>JSON i inbäddade results[].response.body</dd></div></dl><div class=\"tw\" data-card-parameters data-typed-parameters><table><thead><tr><th>Fält</th><th>Typ</th><th>Krav</th><th>Värden &amp; gränser</th><th>Standard</th></tr></thead><tbody><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"Fält\" scope=\"row\"><span class=\"card-cell-label\">Fält</span><code class=\"card-field-name\">endpoint</code></th><td data-cell-label=\"Typ\" data-field-type><span class=\"card-cell-label\">Typ</span><code>string</code></td><td data-cell-label=\"Krav\"><span class=\"card-cell-label\">Krav</span>Obligatoriskt</td><td data-cell-label=\"Värden &amp; gränser\"><span class=\"card-cell-label\">Värden &amp; gränser</span><div>/v1/chat/completions</div></td><td data-cell-label=\"Standard\" data-default=\"unspecified\"><span class=\"card-cell-label\">Standard</span>—</td></tr><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"Fält\" scope=\"row\"><span class=\"card-cell-label\">Fält</span><code class=\"card-field-name\">model</code></th><td data-cell-label=\"Typ\" data-field-type><span class=\"card-cell-label\">Typ</span><code>string</code></td><td data-cell-label=\"Krav\"><span class=\"card-cell-label\">Krav</span>Obligatoriskt</td><td data-cell-label=\"Värden &amp; gränser\"><span class=\"card-cell-label\">Värden &amp; gränser</span><div>openai/gpt-4.1-nano:batch</div></td><td data-cell-label=\"Standard\" data-default=\"unspecified\"><span class=\"card-cell-label\">Standard</span>—</td></tr><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"Fält\" scope=\"row\"><span class=\"card-cell-label\">Fält</span><code class=\"card-field-name\">requests</code></th><td data-cell-label=\"Typ\" data-field-type><span class=\"card-cell-label\">Typ</span><code>batch_item[]</code></td><td data-cell-label=\"Krav\"><span class=\"card-cell-label\">Krav</span>Obligatoriskt</td><td data-cell-label=\"Värden &amp; gränser\"><span class=\"card-cell-label\">Värden &amp; gränser</span><div>Minsta antal objekt: 1</div></td><td data-cell-label=\"Standard\" data-default=\"unspecified\"><span class=\"card-cell-label\">Standard</span>—</td></tr><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"Fält\" scope=\"row\"><span class=\"card-cell-label\">Fält</span><code class=\"card-field-name\">requests[].custom_id</code></th><td data-cell-label=\"Typ\" data-field-type><span class=\"card-cell-label\">Typ</span><code>string</code></td><td data-cell-label=\"Krav\"><span class=\"card-cell-label\">Krav</span>Obligatoriskt</td><td data-cell-label=\"Värden &amp; gränser\"><span class=\"card-cell-label\">Värden &amp; gränser</span></td><td data-cell-label=\"Standard\" data-default=\"unspecified\"><span class=\"card-cell-label\">Standard</span>—</td></tr><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"Fält\" scope=\"row\"><span class=\"card-cell-label\">Fält</span><code class=\"card-field-name\">requests[].body.messages</code></th><td data-cell-label=\"Typ\" data-field-type><span class=\"card-cell-label\">Typ</span><code>message[]</code></td><td data-cell-label=\"Krav\"><span class=\"card-cell-label\">Krav</span>Obligatoriskt</td><td data-cell-label=\"Värden &amp; gränser\"><span class=\"card-cell-label\">Värden &amp; gränser</span></td><td data-cell-label=\"Standard\" data-default=\"unspecified\"><span class=\"card-cell-label\">Standard</span>—</td></tr><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"Fält\" scope=\"row\"><span class=\"card-cell-label\">Fält</span><code class=\"card-field-name\">completion_window</code></th><td data-cell-label=\"Typ\" data-field-type><span class=\"card-cell-label\">Typ</span><code>string</code></td><td data-cell-label=\"Krav\"><span class=\"card-cell-label\">Krav</span>Valfritt</td><td data-cell-label=\"Värden &amp; gränser\"><span class=\"card-cell-label\">Värden &amp; gränser</span><div>24h</div></td><td data-cell-label=\"Standard\" data-default=\"unspecified\"><span class=\"card-cell-label\">Standard</span>—</td></tr><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"Fält\" scope=\"row\"><span class=\"card-cell-label\">Fält</span><code class=\"card-field-name\">provider</code></th><td data-cell-label=\"Typ\" data-field-type><span class=\"card-cell-label\">Typ</span><code>object|null</code></td><td data-cell-label=\"Krav\"><span class=\"card-cell-label\">Krav</span>Valfritt</td><td data-cell-label=\"Värden &amp; gränser\"><span class=\"card-cell-label\">Värden &amp; gränser</span></td><td data-cell-label=\"Standard\" data-default=\"unspecified\"><span class=\"card-cell-label\">Standard</span>—</td></tr><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"Fält\" scope=\"row\"><span class=\"card-cell-label\">Fält</span><code class=\"card-field-name\">requests[].body.model</code></th><td data-cell-label=\"Typ\" data-field-type><span class=\"card-cell-label\">Typ</span><code>string</code></td><td data-cell-label=\"Krav\"><span class=\"card-cell-label\">Krav</span>Valfritt</td><td data-cell-label=\"Värden &amp; gränser\"><span class=\"card-cell-label\">Värden &amp; gränser</span><div>openai/gpt-4.1-nano:batch, openai/gpt-4.1-nano</div></td><td data-cell-label=\"Standard\" data-default=\"unspecified\"><span class=\"card-cell-label\">Standard</span>—</td></tr><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"Fält\" scope=\"row\"><span class=\"card-cell-label\">Fält</span><code class=\"card-field-name\">provider.only</code></th><td data-cell-label=\"Typ\" data-field-type><span class=\"card-cell-label\">Typ</span><code>string[]</code></td><td data-cell-label=\"Krav\"><span class=\"card-cell-label\">Krav</span>Valfritt</td><td data-cell-label=\"Värden &amp; gränser\"><span class=\"card-cell-label\">Värden &amp; gränser</span><div>openai</div></td><td data-cell-label=\"Standard\" data-default=\"unspecified\"><span class=\"card-cell-label\">Standard</span>—</td></tr><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"Fält\" scope=\"row\"><span class=\"card-cell-label\">Fält</span><code class=\"card-field-name\">provider.allow_fallbacks</code></th><td data-cell-label=\"Typ\" data-field-type><span class=\"card-cell-label\">Typ</span><code>boolean|null</code></td><td data-cell-label=\"Krav\"><span class=\"card-cell-label\">Krav</span>Valfritt</td><td data-cell-label=\"Värden &amp; gränser\"><span class=\"card-cell-label\">Värden &amp; gränser</span><div>false, null</div></td><td data-cell-label=\"Standard\" data-default=\"unspecified\"><span class=\"card-cell-label\">Standard</span>—</td></tr></tbody></table></div><details class=\"note-s\" data-method-contract><summary>Metodparametrar och livscykel</summary><div class=\"tw\" data-card-table=\"contract\"><table><thead><tr><th>Parameter</th><th>Avtal</th></tr></thead><tbody><tr><th data-cell-label=\"Parameter\" scope=\"row\"><span class=\"card-cell-label\">Parameter</span><code>content_type</code></th><td data-cell-label=\"Avtal\"><span class=\"card-cell-label\">Avtal</span>application/json</td></tr><tr><th data-cell-label=\"Parameter\" scope=\"row\"><span class=\"card-cell-label\">Parameter</span><code>required</code></th><td data-cell-label=\"Avtal\"><span class=\"card-cell-label\">Avtal</span>endpoint, model, requests</td></tr><tr><th data-cell-label=\"Parameter\" scope=\"row\"><span class=\"card-cell-label\">Parameter</span><code>material_types</code></th><td data-cell-label=\"Avtal\"><span class=\"card-cell-label\">Avtal</span>text</td></tr><tr><th data-cell-label=\"Parameter\" scope=\"row\"><span class=\"card-cell-label\">Parameter</span><code>representation</code></th><td data-cell-label=\"Avtal\"><span class=\"card-cell-label\">Avtal</span>Inbäddade requests[]; varje objekt har custom_id och body</td></tr><tr><th data-cell-label=\"Parameter\" scope=\"row\"><span class=\"card-cell-label\">Parameter</span><code>request_endpoint_profile</code></th><td data-cell-label=\"Avtal\"><span class=\"card-cell-label\">Avtal</span>/v1/chat/completions</td></tr><tr><th data-cell-label=\"Parameter\" scope=\"row\"><span class=\"card-cell-label\">Parameter</span><code>file_material</code></th><td data-cell-label=\"Avtal\"><span class=\"card-cell-label\">Avtal</span>Den anropande klienten kan läsa in faktiska UTF-8 JSONL-data lokalt i requests[]. Inget uppladdningssyfte, input_file_id eller någon filreferens används. Om kundmaterial saknas eller är tomt avbryts förberedelserna före POST.</td></tr><tr><th data-cell-label=\"Parameter\" scope=\"row\"><span class=\"card-cell-label\">Parameter</span><code>serialization_order</code></th><td data-cell-label=\"Avtal\"><span class=\"card-cell-label\">Avtal</span>endpoint, model, provider (om angivet), completion_window (om angivet), requests sist</td></tr><tr><th data-cell-label=\"Parameter\" scope=\"row\"><span class=\"card-cell-label\">Parameter</span><code>optional_controls</code></th><td data-cell-label=\"Avtal\"><span class=\"card-cell-label\">Avtal</span>provider.only, provider.allow_fallbacks, completion_window</td></tr><tr><th data-cell-label=\"Parameter\" scope=\"row\"><span class=\"card-cell-label\">Parameter</span><code>schema_scope</code></th><td data-cell-label=\"Avtal\"><span class=\"card-cell-label\">Avtal</span>Förfrågningskroppar för Text Chat Completions i det dokumenterade inbäddade Batch-formatet.</td></tr></tbody></table></div><p>Livscykel: <code>asynchronous</code></p><p class=\"note-s\"><code>GET /v1/batches/{operation_id}</code> · Det faktiska response.id från det ursprungliga skapandesvaret; samma användare/nyckel/grupp</p></details></details></section><section class=\"card-section\" data-card-section=\"pricing\"><h3 tabindex=\"-1\">Priser</h3><div data-native-semantic-method=\"v1\" data-tariff-reference-only><p class=\"note-s\" data-rate-support-note>Tariffuppgifter lägger inte till begäransalternativ. Parametrar som stöds anges för den valda metoden.</p><dl data-price-conditions><dt>Snabbt läge</dt><dd>Ej angivet <span class=\"note-s\">När snabbt läge är valt</span></dd><dt>Flex-läge</dt><dd>Ej angivet <span class=\"note-s\">När läget flex är valt</span></dd><dt>Högsta resonemangsnivå</dt><dd>Ej angivet <span class=\"note-s\">När den högsta resonemangsnivån använder standardjusteringen (default)</span></dd><dt>Prissättning för explicit cache</dt><dd>Inte aktiverat <span class=\"note-s\">När explicit cache begärs</span></dd></dl></div><div data-declared-tariff-pricing><h4>Ailoot-priser</h4><h4>Priser efter konfiguration</h4><p class=\"note-s\">Matcha varje avgift mot de visade villkoren. Använd ett pris för varje uppsättning alternativa konfigurationer.</p><div class=\"tw\" data-pricing-profiles><table><thead><tr><th>Konfiguration</th><th>Prislista</th><th>Kontexttoken, fler än</th><th>Kontexttoken, upp till och med</th><th>Avgift</th></tr></thead><tbody><tr><th data-cell-label=\"Konfiguration\" scope=\"row\"><span class=\"card-cell-label\">Konfiguration</span>Grundpriser för token</th><td data-cell-label=\"Prislista\"><span class=\"card-cell-label\">Prislista</span>Grundpris</td><td data-cell-label=\"Kontexttoken, fler än\"><span class=\"card-cell-label\">Kontexttoken, fler än</span>—</td><td data-cell-label=\"Kontexttoken, upp till och med\"><span class=\"card-cell-label\">Kontexttoken, upp till och med</span>Ingen övre gräns</td><td data-cell-label=\"Avgift\"><span class=\"card-cell-label\">Avgift</span><div><span>Indata · Indatatoken</span> <b>$0.0001</b> <span class=\"price-unit\">/ 1K token</span></div><div><span>Utdata · Utdatatoken</span> <b>$0.0004</b> <span class=\"price-unit\">/ 1K token</span></div><div><span>Indata · Cacheläsning</span> <b>$0.000025</b> <span class=\"price-unit\">/ 1K token</span></div><div><span>Indata · Skrivning till cache</span> <b>—</b> <span class=\"price-unit\">/ 1K token</span></div><div><span>Indata · Skrivning till cache, 1 tim</span> <b>—</b> <span class=\"price-unit\">/ 1K token</span></div></td></tr><tr><th data-cell-label=\"Konfiguration\" scope=\"row\"><span class=\"card-cell-label\">Konfiguration</span>Nivå 1 för förfrågans längd</th><td data-cell-label=\"Prislista\"><span class=\"card-cell-label\">Prislista</span>—</td><td data-cell-label=\"Kontexttoken, fler än\"><span class=\"card-cell-label\">Kontexttoken, fler än</span>0</td><td data-cell-label=\"Kontexttoken, upp till och med\"><span class=\"card-cell-label\">Kontexttoken, upp till och med</span>Ingen övre gräns</td><td data-cell-label=\"Avgift\"><span class=\"card-cell-label\">Avgift</span><div><span>Indata · Indatatoken</span> <b>$0.0001</b> <span class=\"price-unit\">/ 1K token</span></div><div><span>Utdata · Utdatatoken</span> <b>$0.0004</b> <span class=\"price-unit\">/ 1K token</span></div><div><span>Indata · Cacheläsning</span> <b>$0.000025</b> <span class=\"price-unit\">/ 1K token</span></div><div><span>Indata · Skrivning till cache</span> <b>—</b> <span class=\"price-unit\">/ 1K token</span></div><div><span>Indata · Skrivning till cache, 1 tim</span> <b>—</b> <span class=\"price-unit\">/ 1K token</span></div></td></tr></tbody></table></div></div><p class=\"note-s\">Ailoot reserverar ett uppskattat belopp före en begäran. Efter resultatet slutregleras avgiften utifrån uppmätt förbrukning. Slutreglering för strömning använder den slutliga förbrukningsposten. <a href=\"/docs/sv/billing/reserve/\">Så fungerar reservation och slutreglering →</a></p></section><section class=\"card-section\" data-card-section=\"examples\"><h3 tabindex=\"-1\">Exempelbegäranden</h3><h4>Ailoot Ultra · Batchkörning</h4><div class=\"code-group\"><div class=\"cg-bar\"><div class=\"cg-tabs\" role=\"tablist\" aria-label=\"Kodvarianter\"><button class=\"cg-tab\" id=\"model-code-2034-tab-0\" role=\"tab\" type=\"button\" aria-controls=\"model-code-2034-panel-0\" aria-selected=\"true\" tabindex=\"0\">curl · bevarat referensexempel</button><button class=\"cg-tab\" id=\"model-code-2034-tab-1\" role=\"tab\" type=\"button\" aria-controls=\"model-code-2034-panel-1\" aria-selected=\"false\" tabindex=\"-1\">Python HTTP · kundens faktiska JSONL</button><button class=\"cg-tab\" id=\"model-code-2034-tab-2\" role=\"tab\" type=\"button\" aria-controls=\"model-code-2034-panel-2\" aria-selected=\"false\" tabindex=\"-1\">Python · spara varje färdigt resultat</button></div><div class=\"cg-tools\"><button class=\"cg-btn cg-copy\" type=\"button\" aria-label=\"Kopiera kod\"><svg class=\"cp\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\"><rect x=\"5.25\" y=\"5.25\" width=\"8.5\" height=\"8.5\" rx=\"1.75\"/><path d=\"M10.75 5.25V3.5a1.25 1.25 0 0 0-1.25-1.25H3.5A1.25 1.25 0 0 0 2.25 3.5v6a1.25 1.25 0 0 0 1.25 1.25h1.75\"/></svg><svg class=\"ok\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\"><path d=\"m3 8.5 3.25 3.25L13 5\"/></svg></button></div></div><div class=\"cg-body\"><div class=\"cg-pane\" id=\"model-code-2034-panel-0\" role=\"tabpanel\" aria-labelledby=\"model-code-2034-tab-0\"><pre data-lang=\"bash\"><code>set -eu\n: &quot;${AILOOT_API_KEY:?Set your Ailoot API key}&quot;\npython3 - &lt;&lt;&#39;PY_REQUEST&#39;\nimport json\nfrom pathlib import Path\nbody=json.loads(&#39;{&quot;endpoint&quot;:&quot;/v1/chat/completions&quot;,&quot;model&quot;:&quot;openai/gpt-4.1-nano:batch&quot;,&quot;requests&quot;:[{&quot;custom_id&quot;:&quot;req-0001&quot;,&quot;body&quot;:{&quot;messages&quot;:[{&quot;role&quot;:&quot;user&quot;,&quot;content&quot;:&quot;Hello!&quot;}],&quot;max_tokens&quot;:16}}]}&#39;)\nPath(&quot;batch-request.json&quot;).write_text(json.dumps(body,ensure_ascii=False),encoding=&quot;utf-8&quot;)\nPY_REQUEST\ncurl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/batches \\\n  -H &quot;Authorization: Bearer $AILOOT_API_KEY&quot; -H &#39;Content-Type: application/json&#39; \\\n  --data-binary @batch-request.json -D batch-response-headers.txt -o batch-create-response.json\n</code></pre></div><div class=\"cg-pane\" id=\"model-code-2034-panel-1\" role=\"tabpanel\" aria-labelledby=\"model-code-2034-tab-1\" hidden><pre data-lang=\"python\"><code>import json, os\nfrom pathlib import Path\nfrom urllib.request import Request, urlopen\n\ndef prepare_requests(customer_path):\n    path = Path(customer_path)\n    if not path.is_file(): raise ValueError(&quot;Customer JSONL file is missing&quot;)\n    items = [json.loads(line) for line in path.read_text(encoding=&quot;utf-8&quot;).splitlines() if line.strip()]\n    if not items: raise ValueError(&quot;Customer JSONL contains no requests&quot;)\n    ids = set()\n    for item in items:\n        if set(item) != {&quot;custom_id&quot;, &quot;body&quot;}: raise ValueError(&quot;Each item needs custom_id and body&quot;)\n        cid = item[&quot;custom_id&quot;]\n        if not isinstance(cid, str) or not cid.strip() or cid in ids: raise ValueError(&quot;custom_id must be nonempty and unique&quot;)\n        ids.add(cid)\n        if not isinstance(item[&quot;body&quot;], dict) or not item[&quot;body&quot;].get(&quot;messages&quot;): raise ValueError(&quot;Supply actual text messages&quot;)\n        supplied_model = item[&quot;body&quot;].get(&quot;model&quot;)\n        if supplied_model is not None and supplied_model not in [&#39;openai/gpt-4.1-nano:batch&#39;, &#39;openai/gpt-4.1-nano&#39;]: raise ValueError(&quot;body.model must be an exact documented caller or wire ID&quot;)\n    return {&quot;endpoint&quot;:&quot;/v1/chat/completions&quot;, &quot;model&quot;:&quot;openai/gpt-4.1-nano:batch&quot;, &quot;requests&quot;:items}\n\nif __name__ == &quot;__main__&quot;:\n    material = os.environ.get(&quot;AILOOT_BATCH_REQUESTS_JSONL&quot;, &quot;&quot;)\n    if not material: raise SystemExit(&quot;Set AILOOT_BATCH_REQUESTS_JSONL to your actual customer file&quot;)\n    body = prepare_requests(material)\n    key = os.environ.get(&quot;AILOOT_API_KEY&quot;, &quot;&quot;)\n    if not key: raise SystemExit(&quot;Set AILOOT_API_KEY&quot;)\n    request = Request(&quot;https://api.ailoot.ai/v1/batches&quot;, data=json.dumps(body, ensure_ascii=False).encode(&quot;utf-8&quot;), headers={&quot;Authorization&quot;:&quot;Bearer &quot; + key, &quot;Content-Type&quot;:&quot;application/json&quot;}, method=&quot;POST&quot;)\n    with urlopen(request) as response:\n        raw = response.read()\n        Path(&quot;batch-create-response.json&quot;).write_bytes(raw)\n        print(raw.decode(&quot;utf-8&quot;))\n</code></pre></div><div class=\"cg-pane\" id=\"model-code-2034-panel-2\" role=\"tabpanel\" aria-labelledby=\"model-code-2034-tab-2\" hidden><pre data-lang=\"python\"><code>import json\nfrom pathlib import Path\nraw = Path(&quot;batch-status-response.json&quot;).read_bytes()\nresponse = json.loads(raw)\nif response.get(&quot;status&quot;) != &quot;completed&quot;:\n    raise SystemExit(&quot;Keep the original operation; read its status without resubmitting&quot;)\nresults = response.get(&quot;results&quot;)\nif not isinstance(results, list) or not results:\n    raise SystemExit(&quot;Preserve the original response; completed results are missing&quot;)\nPath(&quot;batch-results.jsonl&quot;).write_text(&quot;&quot;.join(json.dumps(item, ensure_ascii=False) + &quot;\\n&quot; for item in results), encoding=&quot;utf-8&quot;)\n# Preserve batch-status-response.json with aggregate usage and every result/error.\n</code></pre></div></div></div></section><section class=\"card-section\" data-card-section=\"results\"><h3 tabindex=\"-1\">Ta emot och spara resultat</h3><h4>Ailoot Ultra · Batchkörning</h4><p class=\"note-s\">JSON i inbäddade results[].response.body</p><ul class=\"card-result-paths\"><li><code>GET /v1/batches/{operation_id}</code></li></ul><h5>Kontrollera jobbstatus</h5><div class=\"code-group\"><div class=\"cg-bar\"><div class=\"cg-tabs\" role=\"tablist\" aria-label=\"Kodvarianter\"><button class=\"cg-tab\" id=\"model-code-2035-tab-0\" role=\"tab\" type=\"button\" aria-controls=\"model-code-2035-panel-0\" aria-selected=\"true\" tabindex=\"0\">curl · status för ursprunglig åtgärd</button></div><div class=\"cg-tools\"><button class=\"cg-btn cg-copy\" type=\"button\" aria-label=\"Kopiera kod\"><svg class=\"cp\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\"><rect x=\"5.25\" y=\"5.25\" width=\"8.5\" height=\"8.5\" rx=\"1.75\"/><path d=\"M10.75 5.25V3.5a1.25 1.25 0 0 0-1.25-1.25H3.5A1.25 1.25 0 0 0 2.25 3.5v6a1.25 1.25 0 0 0 1.25 1.25h1.75\"/></svg><svg class=\"ok\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\"><path d=\"m3 8.5 3.25 3.25L13 5\"/></svg></button></div></div><div class=\"cg-body\"><div class=\"cg-pane\" id=\"model-code-2035-panel-0\" role=\"tabpanel\" aria-labelledby=\"model-code-2035-tab-0\"><pre data-lang=\"bash\"><code>set -eu\n: &quot;${AILOOT_API_KEY:?Set your Ailoot API key}&quot;\nBATCH_OPERATION_ID=&quot;$(python3 - &lt;&lt;&#39;PY_ID&#39;\nimport json\nfrom pathlib import Path\nfrom urllib.parse import quote\nresponse = json.loads(Path(&quot;batch-create-response.json&quot;).read_text(encoding=&quot;utf-8&quot;))\noperation = response.get(&quot;id&quot;)\nif not isinstance(operation, str) or not operation: raise SystemExit(&quot;No actual original operation ID; preserve the response and do not resubmit&quot;)\nprint(quote(operation, safe=&quot;&quot;))\nPY_ID\n)&quot;\ncurl --fail-with-body --silent --show-error &quot;https://api.ailoot.ai/v1/batches/$BATCH_OPERATION_ID&quot; \\\n  -H &quot;Authorization: Bearer $AILOOT_API_KEY&quot; -o batch-status-response.json\n</code></pre></div></div></div><div class=\"card-result-process\" data-all-results><h5>Behåll alla färdiga resultat</h5><p class=\"note-s\">Behåll varje fullständigt returnerat svar, fil och innehållsdel.</p><p class=\"note-s\">Spara hela det ursprungliga statusobjektet i JSON, varje resultat/custom_id och hela svars- eller felkroppen. Spara slutförda results[] som JSONL utan filtrering.</p></div><div class=\"card-result-process\" data-unknown-recovery><h5>Om det ursprungliga svaret behöver kontrolleras</h5><p class=\"note-s\">Behåll det ursprungliga operations-ID:t. Vid 503 result_pending_check gäller X-Should-Retry:false; skicka aldrig om en ursprunglig batch med okänt utfall.</p></div><details class=\"card-about\" data-output-fields><summary>Svarsfält</summary><div class=\"tw\" data-card-table=\"output\"><table><thead><tr><th>Fält</th><th>Typ</th></tr></thead><tbody><tr><th data-cell-label=\"Fält\" scope=\"row\"><span class=\"card-cell-label\">Fält</span><code class=\"card-field-name\">results[].custom_id</code></th><td data-cell-label=\"Typ\" data-field-type><span class=\"card-cell-label\">Typ</span>string</td></tr><tr><th data-cell-label=\"Fält\" scope=\"row\"><span class=\"card-cell-label\">Fält</span><code class=\"card-field-name\">results[].response.body.choices[].message.content</code></th><td data-cell-label=\"Typ\" data-field-type><span class=\"card-cell-label\">Typ</span>string|null</td></tr><tr><th data-cell-label=\"Fält\" scope=\"row\"><span class=\"card-cell-label\">Fält</span><code class=\"card-field-name\">results[].error</code></th><td data-cell-label=\"Typ\" data-field-type><span class=\"card-cell-label\">Typ</span>object|null</td></tr><tr><th data-cell-label=\"Fält\" scope=\"row\"><span class=\"card-cell-label\">Fält</span><code class=\"card-field-name\">usage</code></th><td data-cell-label=\"Typ\" data-field-type><span class=\"card-cell-label\">Typ</span>object|null</td></tr><tr><th data-cell-label=\"Fält\" scope=\"row\"><span class=\"card-cell-label\">Fält</span><code class=\"card-field-name\">id</code></th><td data-cell-label=\"Typ\" data-field-type><span class=\"card-cell-label\">Typ</span>string</td></tr><tr><th data-cell-label=\"Fält\" scope=\"row\"><span class=\"card-cell-label\">Fält</span><code class=\"card-field-name\">model</code></th><td data-cell-label=\"Typ\" data-field-type><span class=\"card-cell-label\">Typ</span>string</td></tr><tr><th data-cell-label=\"Fält\" scope=\"row\"><span class=\"card-cell-label\">Fält</span><code class=\"card-field-name\">endpoint</code></th><td data-cell-label=\"Typ\" data-field-type><span class=\"card-cell-label\">Typ</span>string</td></tr><tr><th data-cell-label=\"Fält\" scope=\"row\"><span class=\"card-cell-label\">Fält</span><code class=\"card-field-name\">status</code></th><td data-cell-label=\"Typ\" data-field-type><span class=\"card-cell-label\">Typ</span>string</td></tr><tr><th data-cell-label=\"Fält\" scope=\"row\"><span class=\"card-cell-label\">Fält</span><code class=\"card-field-name\">request_counts</code></th><td data-cell-label=\"Typ\" data-field-type><span class=\"card-cell-label\">Typ</span>object</td></tr><tr><th data-cell-label=\"Fält\" scope=\"row\"><span class=\"card-cell-label\">Fält</span><code class=\"card-field-name\">results[].id</code></th><td data-cell-label=\"Typ\" data-field-type><span class=\"card-cell-label\">Typ</span>string</td></tr><tr><th data-cell-label=\"Fält\" scope=\"row\"><span class=\"card-cell-label\">Fält</span><code class=\"card-field-name\">results[].response.status_code</code></th><td data-cell-label=\"Typ\" data-field-type><span class=\"card-cell-label\">Typ</span>integer</td></tr><tr><th data-cell-label=\"Fält\" scope=\"row\"><span class=\"card-cell-label\">Fält</span><code class=\"card-field-name\">results[].response.request_id</code></th><td data-cell-label=\"Typ\" data-field-type><span class=\"card-cell-label\">Typ</span>string</td></tr></tbody></table></div></details><details class=\"card-about\" data-method-errors><summary>Fel och nästa steg</summary><div class=\"tw\" data-card-table=\"errors\"><table><thead><tr><th>Svar</th><th>Villkor</th><th>Nästa steg</th></tr></thead><tbody><tr><th data-cell-label=\"Svar\" scope=\"row\"><span class=\"card-cell-label\">Svar</span>400 · <code>invalid_request_error</code></th><td data-cell-label=\"Villkor\"><span class=\"card-cell-label\">Villkor</span>Förfrågan har ett ogiltigt inbäddat format enligt dokumentationen, duplicerade nycklar eller en felaktig objektidentitet, eller står i konflikt med modellens konfigurerade funktioner.</td><td data-cell-label=\"Nästa steg\"><span class=\"card-cell-label\">Nästa steg</span>Rätta de angivna fälten innan du skickar en ny förfrågan.</td></tr><tr><th data-cell-label=\"Svar\" scope=\"row\"><span class=\"card-cell-label\">Svar</span>401 · <code>authentication_error</code></th><td data-cell-label=\"Villkor\"><span class=\"card-cell-label\">Villkor</span>Ogiltig API-nyckel.</td><td data-cell-label=\"Nästa steg\"><span class=\"card-cell-label\">Nästa steg</span>Använd den behöriga Ailoot-nyckeln.</td></tr><tr><th data-cell-label=\"Svar\" scope=\"row\"><span class=\"card-cell-label\">Svar</span>403 · <code>permission_error</code></th><td data-cell-label=\"Villkor\"><span class=\"card-cell-label\">Villkor</span>Grupp för batchkörning är inte tillgänglig.</td><td data-cell-label=\"Nästa steg\"><span class=\"card-cell-label\">Nästa steg</span>Kontrollera nyckelns/gruppens behörighet.</td></tr><tr><th data-cell-label=\"Svar\" scope=\"row\"><span class=\"card-cell-label\">Svar</span>422 · <code>invalid_request_error</code></th><td data-cell-label=\"Villkor\"><span class=\"card-cell-label\">Villkor</span>Batchkörning debiteras från saldot; skapande via abonnemang avvisas.</td><td data-cell-label=\"Nästa steg\"><span class=\"card-cell-label\">Nästa steg</span>Använd den behöriga gruppen med saldodebitering.</td></tr><tr><th data-cell-label=\"Svar\" scope=\"row\"><span class=\"card-cell-label\">Svar</span>422 · <code>price_unavailable</code></th><td data-cell-label=\"Villkor\"><span class=\"card-cell-label\">Villkor</span>Kostnaden för batchindata kan inte beräknas i förväg.</td><td data-cell-label=\"Nästa steg\"><span class=\"card-cell-label\">Nästa steg</span>Spara svaret; använd det dokumenterade indataformatet för API-familjen.</td></tr><tr><th data-cell-label=\"Svar\" scope=\"row\"><span class=\"card-cell-label\">Svar</span>402 · <code>billing_error</code></th><td data-cell-label=\"Villkor\"><span class=\"card-cell-label\">Villkor</span>Reservation för batchkörning är inte tillgänglig.</td><td data-cell-label=\"Nästa steg\"><span class=\"card-cell-label\">Nästa steg</span>Se till att villkoren för att godta förfrågan är uppfyllda innan du skickar en ny.</td></tr><tr><th data-cell-label=\"Svar\" scope=\"row\"><span class=\"card-cell-label\">Svar</span>503 · <code>price_unavailable</code></th><td data-cell-label=\"Villkor\"><span class=\"card-cell-label\">Villkor</span>Priset för batchmetoden eller de inbyggda priserna är inte tillgängliga.</td><td data-cell-label=\"Nästa steg\"><span class=\"card-cell-label\">Nästa steg</span>Spara svaret; ersätt inte priserna med andra.</td></tr><tr><th data-cell-label=\"Svar\" scope=\"row\"><span class=\"card-cell-label\">Svar</span>503 · <code>api_error</code></th><td data-cell-label=\"Villkor\"><span class=\"card-cell-label\">Villkor</span>Den exakta leverantörsrutten är inte tillgänglig.</td><td data-cell-label=\"Nästa steg\"><span class=\"card-cell-label\">Nästa steg</span>Spara svaret för att kunna reparera routningen.</td></tr><tr><th data-cell-label=\"Svar\" scope=\"row\"><span class=\"card-cell-label\">Svar</span>503 · <code>result_pending_check</code></th><td data-cell-label=\"Villkor\"><span class=\"card-cell-label\">Villkor</span>Det ursprungliga resultatet behöver kontrolleras; X-Should-Retry:false.</td><td data-cell-label=\"Nästa steg\"><span class=\"card-cell-label\">Nästa steg</span>Behåll det ursprungliga värdet för operation_id/id och läs av operationens status; upprepa aldrig det ursprungliga POST-anropet.</td></tr><tr><th data-cell-label=\"Svar\" scope=\"row\"><span class=\"card-cell-label\">Svar</span>404 · <code>not_found</code></th><td data-cell-label=\"Villkor\"><span class=\"card-cell-label\">Villkor</span>Operationen för batchstatus saknas eller tillhör en annan identitet.</td><td data-cell-label=\"Nästa steg\"><span class=\"card-cell-label\">Nästa steg</span>Använd exakt det ursprungliga id-värdet och samma användare/nyckel/grupp.</td></tr></tbody></table></div></details></section><section class=\"card-section\" data-card-section=\"aliases\"><h3 tabindex=\"-1\">Alias</h3><h4>Modellalias</h4><p class=\"note-s\"><span data-model-alias-route=\"Ultra\"><b>Ailoot Ultra</b> <a href=\"#m=openai%2Fgpt-4.1-nano%3Abatch&amp;route=Ultra&amp;caller=openai%2Fgpt-4.1-nano%3Abatch&amp;fmt=batches\"><code>openai/gpt-4.1-nano:batch</code></a></span></p><h4>Alias för metodsökvägar</h4><p class=\"note-s\">Använd metodsökvägarna som visas ovan.</p><h4>Relaterade anropar-ID:n</h4><p class=\"note-s\"><a href=\"#m=openai%2Fgpt-4.1-nano%3Abatch&amp;route=Ultra&amp;caller=openai%2Fgpt-4.1-nano%3Abatch&amp;fmt=batches\"><code>openai/gpt-4.1-nano:batch</code></a></p></section></div>",
      "method_identity": {
        "effective_request_model_id": "openai/gpt-4.1-nano:batch",
        "fmt": "batches",
        "http": "POST",
        "path": "/v1/batches",
        "request_model_id": "openai/gpt-4.1-nano:batch",
        "route_label": "Ultra"
      },
      "method_key": "Ultra|batches|/v1/batches|openai%2Fgpt-4.1-nano%3Abatch",
      "ordinal": 0,
      "rawMethod": {
        "available": null,
        "cache_read": 0.025,
        "cache_write": null,
        "cache_write_1h": null,
        "contract": {
          "data": {
            "all_results": "Preserve full JSON and every result; provider real IDs are only read from actual returned responses.",
            "authentication": {
              "api_key_source": "AILOOT_API_KEY",
              "header": "Authorization: Bearer"
            },
            "errors": [
              {
                "code": null,
                "condition": "Förfrågan har ett ogiltigt inbäddat format enligt dokumentationen, duplicerade nycklar eller en felaktig objektidentitet, eller står i konflikt med modellens konfigurerade funktioner.",
                "http_status": 400,
                "recovery": "Rätta de angivna fälten innan du skickar en ny förfrågan.",
                "type": "invalid_request_error"
              },
              {
                "code": null,
                "condition": "Ogiltig API-nyckel.",
                "http_status": 401,
                "recovery": "Använd den behöriga Ailoot-nyckeln.",
                "type": "authentication_error"
              },
              {
                "code": null,
                "condition": "Grupp för batchkörning är inte tillgänglig.",
                "http_status": 403,
                "recovery": "Kontrollera nyckelns/gruppens behörighet.",
                "type": "permission_error"
              },
              {
                "code": null,
                "condition": "Batchkörning debiteras från saldot; skapande via abonnemang avvisas.",
                "http_status": 422,
                "recovery": "Använd den behöriga gruppen med saldodebitering.",
                "type": "invalid_request_error"
              },
              {
                "code": null,
                "condition": "Kostnaden för batchindata kan inte beräknas i förväg.",
                "http_status": 422,
                "recovery": "Spara svaret; använd det dokumenterade indataformatet för API-familjen.",
                "type": "price_unavailable"
              },
              {
                "code": null,
                "condition": "Reservation för batchkörning är inte tillgänglig.",
                "http_status": 402,
                "recovery": "Se till att villkoren för att godta förfrågan är uppfyllda innan du skickar en ny.",
                "type": "billing_error"
              },
              {
                "code": null,
                "condition": "Priset för batchmetoden eller de inbyggda priserna är inte tillgängliga.",
                "http_status": 503,
                "recovery": "Spara svaret; ersätt inte priserna med andra.",
                "type": "price_unavailable"
              },
              {
                "code": null,
                "condition": "Den exakta leverantörsrutten är inte tillgänglig.",
                "http_status": 503,
                "recovery": "Spara svaret för att kunna reparera routningen.",
                "type": "api_error"
              },
              {
                "code": "result_pending_check",
                "condition": "Det ursprungliga resultatet behöver kontrolleras; X-Should-Retry:false.",
                "http_status": 503,
                "recovery": "Behåll det ursprungliga värdet för operation_id/id och läs av operationens status; upprepa aldrig det ursprungliga POST-anropet.",
                "type": null
              },
              {
                "code": "not_found",
                "condition": "Operationen för batchstatus saknas eller tillhör en annan identitet.",
                "http_status": 404,
                "recovery": "Använd exakt det ursprungliga id-värdet och samma användare/nyckel/grupp.",
                "type": null
              }
            ],
            "example_body": {
              "endpoint": "/v1/chat/completions",
              "model": "openai/gpt-4.1-nano:batch",
              "requests": [
                {
                  "body": {
                    "max_tokens": 16,
                    "messages": [
                      {
                        "content": "Hello!",
                        "role": "user"
                      }
                    ]
                  },
                  "custom_id": "req-0001"
                }
              ]
            },
            "input_constraints": [
              "Use the exact shown :batch model ID.",
              "Each custom_id must be nonempty and unique within the batch.",
              "Keep requests last in the serialized body; duplicate JSON keys are rejected.",
              "Each body.model is omitted or equals the exact batch caller or its documented base ID.",
              "Per-item provider, service_tier and input_type are outside this batch profile.",
              "stream is omitted or false.",
              "Supply text messages for this Chat batch profile; image/audio/file/video objects, hosted tools and cache-control fields are outside this profile.",
              "If body.model is present, use only the exact caller or wire ID listed here; no suffix conversion is needed.",
              "For google/ wire IDs, all items use an identical response_format."
            ],
            "outputs": {
              "all_results": "Spara hela det ursprungliga statusobjektet i JSON, varje resultat/custom_id och hela svars- eller felkroppen. Spara slutförda results[] som JSONL utan filtrering.",
              "enclosing_family": "batch",
              "family": "text",
              "fields": [
                {
                  "name": "results[].custom_id",
                  "type": "string"
                },
                {
                  "name": "results[].response.body.choices[].message.content",
                  "type": "string|null"
                },
                {
                  "name": "results[].error",
                  "type": "object|null"
                },
                {
                  "name": "usage",
                  "type": "object|null"
                },
                {
                  "description": null,
                  "name": "id",
                  "type": "string"
                },
                {
                  "description": null,
                  "name": "model",
                  "type": "string"
                },
                {
                  "description": null,
                  "name": "endpoint",
                  "type": "string"
                },
                {
                  "description": null,
                  "name": "status",
                  "type": "string"
                },
                {
                  "description": null,
                  "name": "request_counts",
                  "type": "object"
                },
                {
                  "description": null,
                  "name": "results[].id",
                  "type": "string"
                },
                {
                  "description": null,
                  "name": "results[].response.status_code",
                  "type": "integer"
                },
                {
                  "description": null,
                  "name": "results[].response.request_id",
                  "type": "string"
                }
              ],
              "format": "JSON i inbäddade results[].response.body"
            },
            "parameters": [
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  "/v1/chat/completions"
                ],
                "enum_known": true,
                "name": "endpoint",
                "required": true,
                "type": "string"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  "openai/gpt-4.1-nano:batch"
                ],
                "enum_known": true,
                "name": "model",
                "required": true,
                "type": "string"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": null,
                "enum_known": false,
                "min_items": 1,
                "name": "requests",
                "required": true,
                "type": "batch_item[]"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": null,
                "enum_known": false,
                "name": "requests[].custom_id",
                "required": true,
                "type": "string",
                "unique_within_batch": true
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": null,
                "enum_known": false,
                "name": "requests[].body.messages",
                "required": true,
                "type": "message[]"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  "24h"
                ],
                "enum_known": true,
                "name": "completion_window",
                "required": false,
                "type": "string"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": null,
                "enum_known": false,
                "name": "provider",
                "required": false,
                "type": "object|null"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  "openai/gpt-4.1-nano:batch",
                  "openai/gpt-4.1-nano"
                ],
                "enum_known": true,
                "name": "requests[].body.model",
                "required": false,
                "type": "string"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  [
                    "openai"
                  ]
                ],
                "enum_known": true,
                "name": "provider.only",
                "required": false,
                "type": "string[]"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  false,
                  null
                ],
                "enum_known": true,
                "name": "provider.allow_fallbacks",
                "required": false,
                "type": "boolean|null"
              }
            ],
            "provider_policy": {
              "allow_fallbacks": false,
              "configured_only": [
                "openai"
              ],
              "per_item_override": false,
              "when_omitted": "Current Source injects the exact persisted declaration before fresh submission."
            },
            "request_schema": {
              "additionalProperties": false,
              "properties": {
                "completion_window": {
                  "enum": [
                    "24h"
                  ],
                  "type": "string"
                },
                "endpoint": {
                  "enum": [
                    "/v1/chat/completions"
                  ],
                  "type": "string"
                },
                "model": {
                  "enum": [
                    "openai/gpt-4.1-nano:batch"
                  ],
                  "type": "string"
                },
                "provider": {
                  "additionalProperties": false,
                  "properties": {
                    "allow_fallbacks": {
                      "enum": [
                        false,
                        null
                      ],
                      "type": [
                        "boolean",
                        "null"
                      ]
                    },
                    "only": {
                      "enum": [
                        [
                          "openai"
                        ]
                      ],
                      "items": {
                        "enum": [
                          "openai"
                        ],
                        "type": "string"
                      },
                      "maxItems": 1,
                      "minItems": 1,
                      "type": "array"
                    }
                  },
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "requests": {
                  "items": {
                    "additionalProperties": false,
                    "properties": {
                      "body": {
                        "additionalProperties": true,
                        "properties": {
                          "max_tokens": {
                            "minimum": 1,
                            "type": "integer"
                          },
                          "messages": {
                            "items": {
                              "properties": {
                                "content": {
                                  "type": "string"
                                },
                                "role": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "role",
                                "content"
                              ],
                              "type": "object"
                            },
                            "minItems": 1,
                            "type": "array"
                          },
                          "model": {
                            "enum": [
                              "openai/gpt-4.1-nano:batch",
                              "openai/gpt-4.1-nano"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "messages"
                        ],
                        "type": "object"
                      },
                      "custom_id": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "custom_id",
                      "body"
                    ],
                    "type": "object"
                  },
                  "minItems": 1,
                  "type": "array"
                }
              },
              "required": [
                "endpoint",
                "model",
                "requests"
              ],
              "type": "object"
            },
            "schema_template": {
              "endpoint": "/v1/chat/completions",
              "model": "openai/gpt-4.1-nano:batch",
              "requests": [
                {
                  "body": {
                    "max_tokens": 16,
                    "messages": [
                      {
                        "content": "Hello!",
                        "role": "user"
                      }
                    ]
                  },
                  "custom_id": "req-0001"
                }
              ]
            },
            "unsupported": [
              "Files/input_file_id batch upload workflow",
              "active cancel route",
              "public batch list/delete/result-download route",
              "model-name-derived capability or weights equivalence"
            ]
          },
          "input": {
            "content_type": "application/json",
            "file_material": "Den anropande klienten kan läsa in faktiska UTF-8 JSONL-data lokalt i requests[]. Inget uppladdningssyfte, input_file_id eller någon filreferens används. Om kundmaterial saknas eller är tomt avbryts förberedelserna före POST.",
            "material_types": [
              "text"
            ],
            "optional_controls": [
              "provider.only",
              "provider.allow_fallbacks",
              "completion_window"
            ],
            "representation": "Inbäddade requests[]; varje objekt har custom_id och body",
            "request_endpoint_profile": "/v1/chat/completions",
            "required": [
              "endpoint",
              "model",
              "requests"
            ],
            "schema_scope": "Förfrågningskroppar för Text Chat Completions i det dokumenterade inbäddade Batch-formatet.",
            "serialization_order": [
              "endpoint",
              "model",
              "provider (om angivet)",
              "completion_window (om angivet)",
              "requests sist"
            ]
          },
          "lifecycle": {
            "cancel": null,
            "create": {
              "accepted_status": 202,
              "http": "POST",
              "path": "/v1/batches"
            },
            "delete": null,
            "file_upload": null,
            "mode": "asynchronous",
            "observed_status_values": [
              "validating",
              "in_progress",
              "finalizing",
              "completed",
              "failed",
              "expired",
              "cancelling",
              "cancelled"
            ],
            "owned_results": {
              "behavior": "Completed results are saved as owned JSONL, read back byte-for-byte and registered in the existing media library before publication after settlement. Status returns inline results; no separate Batch download route is added.",
              "format": "application/x-ndjson",
              "public_url_field_in_status": null
            },
            "status": {
              "http": "GET",
              "id_source": "Det faktiska response.id från det ursprungliga skapandesvaret; samma användare/nyckel/grupp",
              "path": "/v1/batches/{operation_id}"
            },
            "terminal": [
              "completed",
              "failed",
              "expired",
              "cancelled"
            ],
            "unknown": "Behåll det ursprungliga operations-ID:t. Vid 503 result_pending_check gäller X-Should-Retry:false; skicka aldrig om en ursprunglig batch med okänt utfall."
          },
          "manufacturer_capability": null,
          "method": {
            "http": "POST",
            "path": "/v1/batches"
          },
          "output": {
            "all_results": "Preserve the full original status JSON, every result/custom_id and complete response or error body. Save completed results[] as JSONL without filtering.",
            "family": "batch",
            "format": "JSON; completed results[] are returned inline and can be saved as JSONL."
          }
        },
        "ctx": null,
        "declared_pricing_profiles": [
          {
            "dimensions": {
              "regime": "base"
            },
            "label": "Grundpriser för token",
            "units": [
              {
                "amount": "0.0001000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": "0.0000001",
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": "0.0004000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": "0.0000004",
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": "0.000025000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": "0.000000025",
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          },
          {
            "dimensions": {
              "max_context_tokens_inclusive": null,
              "min_context_tokens_exclusive": 0
            },
            "label": "Nivå 1 för förfrågans längd",
            "units": [
              {
                "amount": "0.0001000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": "0.0000001",
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": "0.0004000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": "0.0000004",
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": "0.000025000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": "0.000000025",
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          }
        ],
        "examples": [
          {
            "code": "set -eu\n: \"${AILOOT_API_KEY:?Set your Ailoot API key}\"\npython3 - <<'PY_REQUEST'\nimport json\nfrom pathlib import Path\nbody=json.loads('{\"endpoint\":\"/v1/chat/completions\",\"model\":\"openai/gpt-4.1-nano:batch\",\"requests\":[{\"custom_id\":\"req-0001\",\"body\":{\"messages\":[{\"role\":\"user\",\"content\":\"Hello!\"}],\"max_tokens\":16}}]}')\nPath(\"batch-request.json\").write_text(json.dumps(body,ensure_ascii=False),encoding=\"utf-8\")\nPY_REQUEST\ncurl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/batches \\\n  -H \"Authorization: Bearer $AILOOT_API_KEY\" -H 'Content-Type: application/json' \\\n  --data-binary @batch-request.json -D batch-response-headers.txt -o batch-create-response.json\n",
            "label": "curl · retained fixture",
            "language": "bash"
          },
          {
            "code": "import json, os\nfrom pathlib import Path\nfrom urllib.request import Request, urlopen\n\ndef prepare_requests(customer_path):\n    path = Path(customer_path)\n    if not path.is_file(): raise ValueError(\"Customer JSONL file is missing\")\n    items = [json.loads(line) for line in path.read_text(encoding=\"utf-8\").splitlines() if line.strip()]\n    if not items: raise ValueError(\"Customer JSONL contains no requests\")\n    ids = set()\n    for item in items:\n        if set(item) != {\"custom_id\", \"body\"}: raise ValueError(\"Each item needs custom_id and body\")\n        cid = item[\"custom_id\"]\n        if not isinstance(cid, str) or not cid.strip() or cid in ids: raise ValueError(\"custom_id must be nonempty and unique\")\n        ids.add(cid)\n        if not isinstance(item[\"body\"], dict) or not item[\"body\"].get(\"messages\"): raise ValueError(\"Supply actual text messages\")\n        supplied_model = item[\"body\"].get(\"model\")\n        if supplied_model is not None and supplied_model not in ['openai/gpt-4.1-nano:batch', 'openai/gpt-4.1-nano']: raise ValueError(\"body.model must be an exact documented caller or wire ID\")\n    return {\"endpoint\":\"/v1/chat/completions\", \"model\":\"openai/gpt-4.1-nano:batch\", \"requests\":items}\n\nif __name__ == \"__main__\":\n    material = os.environ.get(\"AILOOT_BATCH_REQUESTS_JSONL\", \"\")\n    if not material: raise SystemExit(\"Set AILOOT_BATCH_REQUESTS_JSONL to your actual customer file\")\n    body = prepare_requests(material)\n    key = os.environ.get(\"AILOOT_API_KEY\", \"\")\n    if not key: raise SystemExit(\"Set AILOOT_API_KEY\")\n    request = Request(\"https://api.ailoot.ai/v1/batches\", data=json.dumps(body, ensure_ascii=False).encode(\"utf-8\"), headers={\"Authorization\":\"Bearer \" + key, \"Content-Type\":\"application/json\"}, method=\"POST\")\n    with urlopen(request) as response:\n        raw = response.read()\n        Path(\"batch-create-response.json\").write_bytes(raw)\n        print(raw.decode(\"utf-8\"))\n",
            "label": "Python HTTP · actual customer JSONL",
            "language": "python"
          },
          {
            "code": "set -eu\n: \"${AILOOT_API_KEY:?Set your Ailoot API key}\"\nBATCH_OPERATION_ID=\"$(python3 - <<'PY_ID'\nimport json\nfrom pathlib import Path\nfrom urllib.parse import quote\nresponse = json.loads(Path(\"batch-create-response.json\").read_text(encoding=\"utf-8\"))\noperation = response.get(\"id\")\nif not isinstance(operation, str) or not operation: raise SystemExit(\"No actual original operation ID; preserve the response and do not resubmit\")\nprint(quote(operation, safe=\"\"))\nPY_ID\n)\"\ncurl --fail-with-body --silent --show-error \"https://api.ailoot.ai/v1/batches/$BATCH_OPERATION_ID\" \\\n  -H \"Authorization: Bearer $AILOOT_API_KEY\" -o batch-status-response.json\n",
            "label": "curl · original operation status",
            "language": "bash"
          },
          {
            "code": "import json\nfrom pathlib import Path\nraw = Path(\"batch-status-response.json\").read_bytes()\nresponse = json.loads(raw)\nif response.get(\"status\") != \"completed\":\n    raise SystemExit(\"Keep the original operation; read its status without resubmitting\")\nresults = response.get(\"results\")\nif not isinstance(results, list) or not results:\n    raise SystemExit(\"Preserve the original response; completed results are missing\")\nPath(\"batch-results.jsonl\").write_text(\"\".join(json.dumps(item, ensure_ascii=False) + \"\\n\" for item in results), encoding=\"utf-8\")\n# Preserve batch-status-response.json with aggregate usage and every result/error.\n",
            "label": "Python · save every completed result",
            "language": "python"
          }
        ],
        "family": "batch",
        "fast_multiplier": null,
        "flex_multiplier": null,
        "fmt": "batches",
        "hints": [
          "Read your actual request items before submission; inline requests are required.",
          "Keep the returned operation ID and every result. Never replay an unknown submission."
        ],
        "http": "POST",
        "in": 0.1,
        "input": [
          "text"
        ],
        "label": "Batchkörning",
        "max_out": null,
        "max_reasoning_effort_multiplier": null,
        "out": 0.4,
        "output": [
          "text"
        ],
        "path": "/v1/batches",
        "price_conditions": [
          {
            "label": "Fast mode",
            "value": "Not specified",
            "when": "When fast mode is selected"
          },
          {
            "label": "Flex mode",
            "value": "Not specified",
            "when": "When flex mode is selected"
          },
          {
            "label": "Maximum reasoning effort",
            "value": "Not specified",
            "when": "When maximum reasoning effort uses the default adjustment"
          },
          {
            "label": "Explicit cache pricing",
            "value": "Not enabled",
            "when": "When explicit cache is requested"
          }
        ],
        "pricing": {
          "billing_mode": "token",
          "image_input_price": null,
          "image_output_price": null,
          "per_request_price": null
        },
        "pricing_profiles": [
          {
            "dimensions": {
              "regime": "base"
            },
            "label": "Base token rates",
            "units": [
              {
                "amount": "0.0001000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": "0.0000001",
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": "0.0004000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": "0.0000004",
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": "0.000025000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": "0.000000025",
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          },
          {
            "dimensions": {
              "max_context_tokens_inclusive": null,
              "min_context_tokens_exclusive": 0
            },
            "label": "Request-length tier 1",
            "units": [
              {
                "amount": "0.0001000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": "0.0000001",
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": "0.0004000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": "0.0000004",
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": "0.000025000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": "0.000000025",
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          }
        ],
        "request_model_id": "openai/gpt-4.1-nano:batch",
        "route_label": "Ultra",
        "status_reads": [
          "GET /v1/batches/{operation_id}"
        ],
        "tiers": [
          {
            "cache_read": 0.025,
            "cache_read_multiplier": null,
            "cache_write": null,
            "cache_write_1h": null,
            "cache_write_multiplier": null,
            "created_at": "0001-01-01T00:00:00Z",
            "in": 0.1,
            "input_multiplier": null,
            "max": null,
            "max_tokens": null,
            "min": 0,
            "min_tokens": 0,
            "out": 0.4,
            "output_multiplier": null,
            "per_request_price": null,
            "sort_order": 0,
            "tier_label": "",
            "updated_at": "0001-01-01T00:00:00Z"
          }
        ],
        "units": [
          {
            "amount": "0.0001000",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "input_price",
            "label": "Input tokens",
            "native_amount_usd_per_unit": "0.0000001",
            "native_quantity": 1,
            "native_unit": "input_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "input_token"
          },
          {
            "amount": "0.0004000",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "output_price",
            "label": "Output tokens",
            "native_amount_usd_per_unit": "0.0000004",
            "native_quantity": 1,
            "native_unit": "output_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "out",
            "unit": "output_token"
          },
          {
            "amount": "0.000025000",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "cache_read_price",
            "label": "Cache read",
            "native_amount_usd_per_unit": "0.000000025",
            "native_quantity": 1,
            "native_unit": "cached_input_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "cached_input_token"
          },
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "cache_write_price",
            "label": "Cache write",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "generic_cache_creation_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "generic_cache_creation_token"
          },
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "cache_write_1h_price",
            "label": "Cache write, 1 hour",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "one_hour_cache_creation_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "one_hour_cache_creation_token"
          }
        ]
      }
    }
  ],
  "model_id": "openai/gpt-4.1-nano:batch",
  "nativeProvenance": {
    "input_facts_canonical_sha256": "d272609d7e1a3b7888a5d5dbd0897160906757fa9167d0de1b2bd5613c011c1b",
    "input_html_sha256": "82c1bd790dd0efd23d4b3922be03e3c104735c5a6554b59b01b75b64c28253d7",
    "private_audit_sha256": "870fa3781ebc1e18d86a2395167b1c2c406ebe551ff094f1dc2d8dcd0b7a7c43",
    "role": "historical-normalized-input-audit-hashes",
    "schema": "ailoot-native-model-provenance-v2"
  },
  "page": {
    "canonical": "https://ailoot.ai/models/sv/openai-gpt-4-1-nano-u003a-batch/",
    "description": "GPT-4.1 Nano är den kompakta medlemmen i GPT-4.1-familjen med kort svarstid för noggrant specificerade text- och bilduppgifter. Dess stora kontext, Structured Outputs och funktionsanrop stöder klassificering, extraktion och avgränsade applikationssteg.",
    "locale": "sv",
    "md_url": "https://ailoot.ai/models/sv/openai-gpt-4-1-nano-u003a-batch/index.md",
    "title": "OpenAI: GPT-4.1 Nano (batch) — Ailoot",
    "url": "https://ailoot.ai/models/sv/openai-gpt-4-1-nano-u003a-batch/"
  },
  "rawModel": {
    "about": "GPT-4.1 Nano är OpenAI:s snabbaste medlem i GPT-4.1-familjen, utformad för instruktionsföljning och verktygsanrop utan ett separat resonemangssteg. Den tar emot text och bilder och producerar text. Nano passar en väldefinierad operation där applikationen behöver ett kompakt svar, en uppsättning fält eller nästa verktygsförfrågan snarare än en omfattande undersökning.\n\nEtt användbart exempel är att sortera inkommande meddelanden enligt en tillhandahållen kategoriuppsättning. Förklara varje kategori, visa hur tvetydiga meddelanden eller meddelanden utanför uppgiftens ram ska uttryckas och be om kategorin tillsammans med källfrasen som stöder den. För extraktion definierar du fältnamn, tillåtna värden och hantering av saknad information. För en kort skrivuppgift anger du fakta och ber om den specifika passage som nästa applikationssteg behöver. Exemplen och begränsningarna ska vara tillräckligt små för att förbli tydliga även när källsamlingen är stor.\n\nTillverkaren anger ett kontextfönster på 1 047 576 token, högst 32 768 token i utdata och en kunskapsgräns den 1 juni 2024. Specifikationerna matchar fönstret för GPT-4.1 Mini och bevarar samtidigt Nanos separata modellidentitet och roll med fokus på kort svarstid. Märk dokument och samtalsavsnitt, ta endast med kontext som är relevant för operationen och lämna plats för hela svaret. Sökresultat eller tillhandahållen referenstext kan ge fakta som är nyare än modellens inlärda kunskap.\n\nNano stöder strömning och Structured Outputs. Ett schemabegränsat slutligt svar har ett annat syfte än ett funktionsanrop: det ena ger applikationen ett färdigt resultat, medan det andra ber den utföra en operation. Structured Outputs stöder en delmängd av JSON Schema; definiera obligatoriska egenskaper och en tydlig representation för okända värden. Hantera avböjanden och ofullständiga svar separat och kontrollera de extraherade värdena mot indata i stället för att likställa en giltig form med en korrekt slutsats.\n\nDen dokumenterade verktygsuppsättningen omfattar funktionsanrop, filsökning, kodtolkning, MCP-anslutningar och ett separat bildgenereringsverktyg. Applikationen tillhandahåller verktygsbeskrivningar och scheman, utför anpassade funktioner och returnerar deras faktiska resultat. För Nano-versionen från den 14 april 2025 rekommenderar OpenAI specifikt att parallella verktygsanrop stängs av eftersom modellen kan begära samma verktyg flera gånger under en tur. Det är en versionsspecifik hänsyn vid körningen, inte en anledning att tolka flera föreslagna anrop som utförda åtgärder.\n\nBildindata tillför visuellt underlag till en textuppgift, exempelvis att läsa en synlig etikett eller beskriva tillståndet i en skärmbild. Använd bilder i PNG, JPEG, WebP eller icke-animerad GIF som stöds, håll texten läsbar och förklara vilken observation som är viktig. Bildguiden nämner svårigheter med liten eller roterad text, exakta rumsliga relationer, antal föremål och viss text med andra än latinska skriftsystem. Ange omgivande kontext när en beskärning ensam skulle göra en etikett eller ett diagram tvetydigt. Nanos eget svar är text; ett bildgenereringsverktyg returnerar en egen separat artefakt. I OpenAI:s dokumenterade bildarbetsflöde är den totala datamängden i förfrågan begränsad till 512 MB och en förfrågan kan innehålla upp till 1 500 bilder; bilderna och texten måste också rymmas i modellens kontext.\n\nI tillverkarens filarbetsflöde får en modell med bildförståelse både extraherad text och sidbilder från PDF-filer. Andra dokumentformat bidrar med extraherad text, och komplettering av kalkylbladsdata använder upp till de första 1 000 raderna per blad. En fil måste vara mindre än 50 MB, med en sammanlagd gräns på 50 MB per förfrågan. Chat Completions stöder PDF-fildelar, medan det dokumenterade Responses-arbetsflödet accepterar ytterligare filtyper. Inbäddade diagram i andra dokument än PDF överförs inte som bildinnehåll, så en PDF-representation är användbar när det visuella underlaget är viktigt.\n\nOpenAI dokumenterar promptcache för Nano och Predicted Outputs för GPT-4.1 Nano-serien. Promptcache återanvänder ett kvalificerat indataprefix i tillverkarens tjänst. Predicted Outputs anger i stället till stor del känd utdatatext för en ändring, exempelvis att bearbeta ett dokument eller en kodfil och bevara dess oförändrade delar. Prediktionsvägen stöder endast text och utesluter bland annat funktionsanrop, logprobs och max_completion_tokens. Välj väg efter den faktiska operationen och håll resultatet kopplat till den ursprungliga källan.\n\nTillverkaren dokumenterar även övervakad finjustering och direkt preferensoptimering för Nanos namngivna GPT-4.1-version. Träningsexempel och föredragna respektive avvisade svar anpassar en modell till en återkommande uppgift; de skiljer sig från den kontext som tillhandahålls i en vanlig förfrågan. För ett praktiskt extraktions- eller klassificeringssteg börjar du med tydliga kategorier, exempel och ett uttryckligt slutformat och granskar sedan om de returnerade fälten bevarar de fakta som nästa steg ska använda.",
    "alias_of": null,
    "aliases": [],
    "author": "OpenAI",
    "capabilities": {
      "context_length": 1047576,
      "manufacturer_input": [
        "image",
        "text",
        "file"
      ],
      "manufacturer_output": [
        "text"
      ]
    },
    "card_routes": [
      {
        "label": "Ultra",
        "rates": [
          {
            "amount": "0.0001000",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "input_price",
            "label": "Input tokens",
            "native_amount_usd_per_unit": "0.0000001",
            "native_quantity": 1,
            "native_unit": "input_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "input_token"
          },
          {
            "amount": "0.0004000",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "output_price",
            "label": "Output tokens",
            "native_amount_usd_per_unit": "0.0000004",
            "native_quantity": 1,
            "native_unit": "output_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "out",
            "unit": "output_token"
          }
        ],
        "summary": "Fullständig prissättning för konfigurationen finns i detaljerna."
      }
    ],
    "ctx": null,
    "formats": [
      "batches"
    ],
    "id": "openai/gpt-4.1-nano:batch",
    "input": [
      "text"
    ],
    "kind": "text",
    "max_out": null,
    "methods": [
      {
        "available": null,
        "cache_read": 0.025,
        "cache_write": null,
        "cache_write_1h": null,
        "contract": {
          "data": {
            "all_results": "Preserve full JSON and every result; provider real IDs are only read from actual returned responses.",
            "authentication": {
              "api_key_source": "AILOOT_API_KEY",
              "header": "Authorization: Bearer"
            },
            "errors": [
              {
                "code": null,
                "condition": "Förfrågan har ett ogiltigt inbäddat format enligt dokumentationen, duplicerade nycklar eller en felaktig objektidentitet, eller står i konflikt med modellens konfigurerade funktioner.",
                "http_status": 400,
                "recovery": "Rätta de angivna fälten innan du skickar en ny förfrågan.",
                "type": "invalid_request_error"
              },
              {
                "code": null,
                "condition": "Ogiltig API-nyckel.",
                "http_status": 401,
                "recovery": "Använd den behöriga Ailoot-nyckeln.",
                "type": "authentication_error"
              },
              {
                "code": null,
                "condition": "Grupp för batchkörning är inte tillgänglig.",
                "http_status": 403,
                "recovery": "Kontrollera nyckelns/gruppens behörighet.",
                "type": "permission_error"
              },
              {
                "code": null,
                "condition": "Batchkörning debiteras från saldot; skapande via abonnemang avvisas.",
                "http_status": 422,
                "recovery": "Använd den behöriga gruppen med saldodebitering.",
                "type": "invalid_request_error"
              },
              {
                "code": null,
                "condition": "Kostnaden för batchindata kan inte beräknas i förväg.",
                "http_status": 422,
                "recovery": "Spara svaret; använd det dokumenterade indataformatet för API-familjen.",
                "type": "price_unavailable"
              },
              {
                "code": null,
                "condition": "Reservation för batchkörning är inte tillgänglig.",
                "http_status": 402,
                "recovery": "Se till att villkoren för att godta förfrågan är uppfyllda innan du skickar en ny.",
                "type": "billing_error"
              },
              {
                "code": null,
                "condition": "Priset för batchmetoden eller de inbyggda priserna är inte tillgängliga.",
                "http_status": 503,
                "recovery": "Spara svaret; ersätt inte priserna med andra.",
                "type": "price_unavailable"
              },
              {
                "code": null,
                "condition": "Den exakta leverantörsrutten är inte tillgänglig.",
                "http_status": 503,
                "recovery": "Spara svaret för att kunna reparera routningen.",
                "type": "api_error"
              },
              {
                "code": "result_pending_check",
                "condition": "Det ursprungliga resultatet behöver kontrolleras; X-Should-Retry:false.",
                "http_status": 503,
                "recovery": "Behåll det ursprungliga värdet för operation_id/id och läs av operationens status; upprepa aldrig det ursprungliga POST-anropet.",
                "type": null
              },
              {
                "code": "not_found",
                "condition": "Operationen för batchstatus saknas eller tillhör en annan identitet.",
                "http_status": 404,
                "recovery": "Använd exakt det ursprungliga id-värdet och samma användare/nyckel/grupp.",
                "type": null
              }
            ],
            "example_body": {
              "endpoint": "/v1/chat/completions",
              "model": "openai/gpt-4.1-nano:batch",
              "requests": [
                {
                  "body": {
                    "max_tokens": 16,
                    "messages": [
                      {
                        "content": "Hello!",
                        "role": "user"
                      }
                    ]
                  },
                  "custom_id": "req-0001"
                }
              ]
            },
            "input_constraints": [
              "Use the exact shown :batch model ID.",
              "Each custom_id must be nonempty and unique within the batch.",
              "Keep requests last in the serialized body; duplicate JSON keys are rejected.",
              "Each body.model is omitted or equals the exact batch caller or its documented base ID.",
              "Per-item provider, service_tier and input_type are outside this batch profile.",
              "stream is omitted or false.",
              "Supply text messages for this Chat batch profile; image/audio/file/video objects, hosted tools and cache-control fields are outside this profile.",
              "If body.model is present, use only the exact caller or wire ID listed here; no suffix conversion is needed.",
              "For google/ wire IDs, all items use an identical response_format."
            ],
            "outputs": {
              "all_results": "Spara hela det ursprungliga statusobjektet i JSON, varje resultat/custom_id och hela svars- eller felkroppen. Spara slutförda results[] som JSONL utan filtrering.",
              "enclosing_family": "batch",
              "family": "text",
              "fields": [
                {
                  "name": "results[].custom_id",
                  "type": "string"
                },
                {
                  "name": "results[].response.body.choices[].message.content",
                  "type": "string|null"
                },
                {
                  "name": "results[].error",
                  "type": "object|null"
                },
                {
                  "name": "usage",
                  "type": "object|null"
                },
                {
                  "description": null,
                  "name": "id",
                  "type": "string"
                },
                {
                  "description": null,
                  "name": "model",
                  "type": "string"
                },
                {
                  "description": null,
                  "name": "endpoint",
                  "type": "string"
                },
                {
                  "description": null,
                  "name": "status",
                  "type": "string"
                },
                {
                  "description": null,
                  "name": "request_counts",
                  "type": "object"
                },
                {
                  "description": null,
                  "name": "results[].id",
                  "type": "string"
                },
                {
                  "description": null,
                  "name": "results[].response.status_code",
                  "type": "integer"
                },
                {
                  "description": null,
                  "name": "results[].response.request_id",
                  "type": "string"
                }
              ],
              "format": "JSON i inbäddade results[].response.body"
            },
            "parameters": [
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  "/v1/chat/completions"
                ],
                "enum_known": true,
                "name": "endpoint",
                "required": true,
                "type": "string"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  "openai/gpt-4.1-nano:batch"
                ],
                "enum_known": true,
                "name": "model",
                "required": true,
                "type": "string"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": null,
                "enum_known": false,
                "min_items": 1,
                "name": "requests",
                "required": true,
                "type": "batch_item[]"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": null,
                "enum_known": false,
                "name": "requests[].custom_id",
                "required": true,
                "type": "string",
                "unique_within_batch": true
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": null,
                "enum_known": false,
                "name": "requests[].body.messages",
                "required": true,
                "type": "message[]"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  "24h"
                ],
                "enum_known": true,
                "name": "completion_window",
                "required": false,
                "type": "string"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": null,
                "enum_known": false,
                "name": "provider",
                "required": false,
                "type": "object|null"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  "openai/gpt-4.1-nano:batch",
                  "openai/gpt-4.1-nano"
                ],
                "enum_known": true,
                "name": "requests[].body.model",
                "required": false,
                "type": "string"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  [
                    "openai"
                  ]
                ],
                "enum_known": true,
                "name": "provider.only",
                "required": false,
                "type": "string[]"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  false,
                  null
                ],
                "enum_known": true,
                "name": "provider.allow_fallbacks",
                "required": false,
                "type": "boolean|null"
              }
            ],
            "provider_policy": {
              "allow_fallbacks": false,
              "configured_only": [
                "openai"
              ],
              "per_item_override": false,
              "when_omitted": "Current Source injects the exact persisted declaration before fresh submission."
            },
            "request_schema": {
              "additionalProperties": false,
              "properties": {
                "completion_window": {
                  "enum": [
                    "24h"
                  ],
                  "type": "string"
                },
                "endpoint": {
                  "enum": [
                    "/v1/chat/completions"
                  ],
                  "type": "string"
                },
                "model": {
                  "enum": [
                    "openai/gpt-4.1-nano:batch"
                  ],
                  "type": "string"
                },
                "provider": {
                  "additionalProperties": false,
                  "properties": {
                    "allow_fallbacks": {
                      "enum": [
                        false,
                        null
                      ],
                      "type": [
                        "boolean",
                        "null"
                      ]
                    },
                    "only": {
                      "enum": [
                        [
                          "openai"
                        ]
                      ],
                      "items": {
                        "enum": [
                          "openai"
                        ],
                        "type": "string"
                      },
                      "maxItems": 1,
                      "minItems": 1,
                      "type": "array"
                    }
                  },
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "requests": {
                  "items": {
                    "additionalProperties": false,
                    "properties": {
                      "body": {
                        "additionalProperties": true,
                        "properties": {
                          "max_tokens": {
                            "minimum": 1,
                            "type": "integer"
                          },
                          "messages": {
                            "items": {
                              "properties": {
                                "content": {
                                  "type": "string"
                                },
                                "role": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "role",
                                "content"
                              ],
                              "type": "object"
                            },
                            "minItems": 1,
                            "type": "array"
                          },
                          "model": {
                            "enum": [
                              "openai/gpt-4.1-nano:batch",
                              "openai/gpt-4.1-nano"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "messages"
                        ],
                        "type": "object"
                      },
                      "custom_id": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "custom_id",
                      "body"
                    ],
                    "type": "object"
                  },
                  "minItems": 1,
                  "type": "array"
                }
              },
              "required": [
                "endpoint",
                "model",
                "requests"
              ],
              "type": "object"
            },
            "schema_template": {
              "endpoint": "/v1/chat/completions",
              "model": "openai/gpt-4.1-nano:batch",
              "requests": [
                {
                  "body": {
                    "max_tokens": 16,
                    "messages": [
                      {
                        "content": "Hello!",
                        "role": "user"
                      }
                    ]
                  },
                  "custom_id": "req-0001"
                }
              ]
            },
            "unsupported": [
              "Files/input_file_id batch upload workflow",
              "active cancel route",
              "public batch list/delete/result-download route",
              "model-name-derived capability or weights equivalence"
            ]
          },
          "input": {
            "content_type": "application/json",
            "file_material": "Den anropande klienten kan läsa in faktiska UTF-8 JSONL-data lokalt i requests[]. Inget uppladdningssyfte, input_file_id eller någon filreferens används. Om kundmaterial saknas eller är tomt avbryts förberedelserna före POST.",
            "material_types": [
              "text"
            ],
            "optional_controls": [
              "provider.only",
              "provider.allow_fallbacks",
              "completion_window"
            ],
            "representation": "Inbäddade requests[]; varje objekt har custom_id och body",
            "request_endpoint_profile": "/v1/chat/completions",
            "required": [
              "endpoint",
              "model",
              "requests"
            ],
            "schema_scope": "Förfrågningskroppar för Text Chat Completions i det dokumenterade inbäddade Batch-formatet.",
            "serialization_order": [
              "endpoint",
              "model",
              "provider (om angivet)",
              "completion_window (om angivet)",
              "requests sist"
            ]
          },
          "lifecycle": {
            "cancel": null,
            "create": {
              "accepted_status": 202,
              "http": "POST",
              "path": "/v1/batches"
            },
            "delete": null,
            "file_upload": null,
            "mode": "asynchronous",
            "observed_status_values": [
              "validating",
              "in_progress",
              "finalizing",
              "completed",
              "failed",
              "expired",
              "cancelling",
              "cancelled"
            ],
            "owned_results": {
              "behavior": "Completed results are saved as owned JSONL, read back byte-for-byte and registered in the existing media library before publication after settlement. Status returns inline results; no separate Batch download route is added.",
              "format": "application/x-ndjson",
              "public_url_field_in_status": null
            },
            "status": {
              "http": "GET",
              "id_source": "Det faktiska response.id från det ursprungliga skapandesvaret; samma användare/nyckel/grupp",
              "path": "/v1/batches/{operation_id}"
            },
            "terminal": [
              "completed",
              "failed",
              "expired",
              "cancelled"
            ],
            "unknown": "Behåll det ursprungliga operations-ID:t. Vid 503 result_pending_check gäller X-Should-Retry:false; skicka aldrig om en ursprunglig batch med okänt utfall."
          },
          "manufacturer_capability": null,
          "method": {
            "http": "POST",
            "path": "/v1/batches"
          },
          "output": {
            "all_results": "Preserve the full original status JSON, every result/custom_id and complete response or error body. Save completed results[] as JSONL without filtering.",
            "family": "batch",
            "format": "JSON; completed results[] are returned inline and can be saved as JSONL."
          }
        },
        "ctx": null,
        "declared_pricing_profiles": [
          {
            "dimensions": {
              "regime": "base"
            },
            "label": "Grundpriser för token",
            "units": [
              {
                "amount": "0.0001000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": "0.0000001",
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": "0.0004000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": "0.0000004",
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": "0.000025000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": "0.000000025",
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          },
          {
            "dimensions": {
              "max_context_tokens_inclusive": null,
              "min_context_tokens_exclusive": 0
            },
            "label": "Nivå 1 för förfrågans längd",
            "units": [
              {
                "amount": "0.0001000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": "0.0000001",
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": "0.0004000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": "0.0000004",
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": "0.000025000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": "0.000000025",
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          }
        ],
        "examples": [
          {
            "code": "set -eu\n: \"${AILOOT_API_KEY:?Set your Ailoot API key}\"\npython3 - <<'PY_REQUEST'\nimport json\nfrom pathlib import Path\nbody=json.loads('{\"endpoint\":\"/v1/chat/completions\",\"model\":\"openai/gpt-4.1-nano:batch\",\"requests\":[{\"custom_id\":\"req-0001\",\"body\":{\"messages\":[{\"role\":\"user\",\"content\":\"Hello!\"}],\"max_tokens\":16}}]}')\nPath(\"batch-request.json\").write_text(json.dumps(body,ensure_ascii=False),encoding=\"utf-8\")\nPY_REQUEST\ncurl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/batches \\\n  -H \"Authorization: Bearer $AILOOT_API_KEY\" -H 'Content-Type: application/json' \\\n  --data-binary @batch-request.json -D batch-response-headers.txt -o batch-create-response.json\n",
            "label": "curl · retained fixture",
            "language": "bash"
          },
          {
            "code": "import json, os\nfrom pathlib import Path\nfrom urllib.request import Request, urlopen\n\ndef prepare_requests(customer_path):\n    path = Path(customer_path)\n    if not path.is_file(): raise ValueError(\"Customer JSONL file is missing\")\n    items = [json.loads(line) for line in path.read_text(encoding=\"utf-8\").splitlines() if line.strip()]\n    if not items: raise ValueError(\"Customer JSONL contains no requests\")\n    ids = set()\n    for item in items:\n        if set(item) != {\"custom_id\", \"body\"}: raise ValueError(\"Each item needs custom_id and body\")\n        cid = item[\"custom_id\"]\n        if not isinstance(cid, str) or not cid.strip() or cid in ids: raise ValueError(\"custom_id must be nonempty and unique\")\n        ids.add(cid)\n        if not isinstance(item[\"body\"], dict) or not item[\"body\"].get(\"messages\"): raise ValueError(\"Supply actual text messages\")\n        supplied_model = item[\"body\"].get(\"model\")\n        if supplied_model is not None and supplied_model not in ['openai/gpt-4.1-nano:batch', 'openai/gpt-4.1-nano']: raise ValueError(\"body.model must be an exact documented caller or wire ID\")\n    return {\"endpoint\":\"/v1/chat/completions\", \"model\":\"openai/gpt-4.1-nano:batch\", \"requests\":items}\n\nif __name__ == \"__main__\":\n    material = os.environ.get(\"AILOOT_BATCH_REQUESTS_JSONL\", \"\")\n    if not material: raise SystemExit(\"Set AILOOT_BATCH_REQUESTS_JSONL to your actual customer file\")\n    body = prepare_requests(material)\n    key = os.environ.get(\"AILOOT_API_KEY\", \"\")\n    if not key: raise SystemExit(\"Set AILOOT_API_KEY\")\n    request = Request(\"https://api.ailoot.ai/v1/batches\", data=json.dumps(body, ensure_ascii=False).encode(\"utf-8\"), headers={\"Authorization\":\"Bearer \" + key, \"Content-Type\":\"application/json\"}, method=\"POST\")\n    with urlopen(request) as response:\n        raw = response.read()\n        Path(\"batch-create-response.json\").write_bytes(raw)\n        print(raw.decode(\"utf-8\"))\n",
            "label": "Python HTTP · actual customer JSONL",
            "language": "python"
          },
          {
            "code": "set -eu\n: \"${AILOOT_API_KEY:?Set your Ailoot API key}\"\nBATCH_OPERATION_ID=\"$(python3 - <<'PY_ID'\nimport json\nfrom pathlib import Path\nfrom urllib.parse import quote\nresponse = json.loads(Path(\"batch-create-response.json\").read_text(encoding=\"utf-8\"))\noperation = response.get(\"id\")\nif not isinstance(operation, str) or not operation: raise SystemExit(\"No actual original operation ID; preserve the response and do not resubmit\")\nprint(quote(operation, safe=\"\"))\nPY_ID\n)\"\ncurl --fail-with-body --silent --show-error \"https://api.ailoot.ai/v1/batches/$BATCH_OPERATION_ID\" \\\n  -H \"Authorization: Bearer $AILOOT_API_KEY\" -o batch-status-response.json\n",
            "label": "curl · original operation status",
            "language": "bash"
          },
          {
            "code": "import json\nfrom pathlib import Path\nraw = Path(\"batch-status-response.json\").read_bytes()\nresponse = json.loads(raw)\nif response.get(\"status\") != \"completed\":\n    raise SystemExit(\"Keep the original operation; read its status without resubmitting\")\nresults = response.get(\"results\")\nif not isinstance(results, list) or not results:\n    raise SystemExit(\"Preserve the original response; completed results are missing\")\nPath(\"batch-results.jsonl\").write_text(\"\".join(json.dumps(item, ensure_ascii=False) + \"\\n\" for item in results), encoding=\"utf-8\")\n# Preserve batch-status-response.json with aggregate usage and every result/error.\n",
            "label": "Python · save every completed result",
            "language": "python"
          }
        ],
        "family": "batch",
        "fast_multiplier": null,
        "flex_multiplier": null,
        "fmt": "batches",
        "hints": [
          "Read your actual request items before submission; inline requests are required.",
          "Keep the returned operation ID and every result. Never replay an unknown submission."
        ],
        "http": "POST",
        "in": 0.1,
        "input": [
          "text"
        ],
        "label": "Batchkörning",
        "max_out": null,
        "max_reasoning_effort_multiplier": null,
        "out": 0.4,
        "output": [
          "text"
        ],
        "path": "/v1/batches",
        "price_conditions": [
          {
            "label": "Fast mode",
            "value": "Not specified",
            "when": "When fast mode is selected"
          },
          {
            "label": "Flex mode",
            "value": "Not specified",
            "when": "When flex mode is selected"
          },
          {
            "label": "Maximum reasoning effort",
            "value": "Not specified",
            "when": "When maximum reasoning effort uses the default adjustment"
          },
          {
            "label": "Explicit cache pricing",
            "value": "Not enabled",
            "when": "When explicit cache is requested"
          }
        ],
        "pricing": {
          "billing_mode": "token",
          "image_input_price": null,
          "image_output_price": null,
          "per_request_price": null
        },
        "pricing_profiles": [
          {
            "dimensions": {
              "regime": "base"
            },
            "label": "Base token rates",
            "units": [
              {
                "amount": "0.0001000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": "0.0000001",
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": "0.0004000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": "0.0000004",
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": "0.000025000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": "0.000000025",
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          },
          {
            "dimensions": {
              "max_context_tokens_inclusive": null,
              "min_context_tokens_exclusive": 0
            },
            "label": "Request-length tier 1",
            "units": [
              {
                "amount": "0.0001000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": "0.0000001",
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": "0.0004000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": "0.0000004",
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": "0.000025000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": "0.000000025",
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          }
        ],
        "request_model_id": "openai/gpt-4.1-nano:batch",
        "route_label": "Ultra",
        "status_reads": [
          "GET /v1/batches/{operation_id}"
        ],
        "tiers": [
          {
            "cache_read": 0.025,
            "cache_read_multiplier": null,
            "cache_write": null,
            "cache_write_1h": null,
            "cache_write_multiplier": null,
            "created_at": "0001-01-01T00:00:00Z",
            "in": 0.1,
            "input_multiplier": null,
            "max": null,
            "max_tokens": null,
            "min": 0,
            "min_tokens": 0,
            "out": 0.4,
            "output_multiplier": null,
            "per_request_price": null,
            "sort_order": 0,
            "tier_label": "",
            "updated_at": "0001-01-01T00:00:00Z"
          }
        ],
        "units": [
          {
            "amount": "0.0001000",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "input_price",
            "label": "Input tokens",
            "native_amount_usd_per_unit": "0.0000001",
            "native_quantity": 1,
            "native_unit": "input_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "input_token"
          },
          {
            "amount": "0.0004000",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "output_price",
            "label": "Output tokens",
            "native_amount_usd_per_unit": "0.0000004",
            "native_quantity": 1,
            "native_unit": "output_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "out",
            "unit": "output_token"
          },
          {
            "amount": "0.000025000",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "cache_read_price",
            "label": "Cache read",
            "native_amount_usd_per_unit": "0.000000025",
            "native_quantity": 1,
            "native_unit": "cached_input_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "cached_input_token"
          },
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "cache_write_price",
            "label": "Cache write",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "generic_cache_creation_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "generic_cache_creation_token"
          },
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "cache_write_1h_price",
            "label": "Cache write, 1 hour",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "one_hour_cache_creation_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "one_hour_cache_creation_token"
          }
        ]
      }
    ],
    "model_aliases": [
      {
        "canonical_model_id": "openai/gpt-4.1-nano:batch",
        "request_model_id": "openai/gpt-4.1-nano:batch",
        "route_label": "Ultra"
      }
    ],
    "name": "OpenAI: GPT-4.1 Nano (batch)",
    "price": {
      "in": 0.1,
      "in_label": null,
      "out": 0.4,
      "out_label": null,
      "scope_label": "Token rates",
      "sort_in": 0.1,
      "sort_out": 0.4,
      "varies": true
    },
    "short": "GPT-4.1 Nano är den kompakta medlemmen i GPT-4.1-familjen med kort svarstid för noggrant specificerade text- och bilduppgifter. Dess stora kontext, Structured Outputs och funktionsanrop stöder klassificering, extraktion och avgränsade applikationssteg."
  },
  "renderer_schema": {
    "method_order": "Original DTO methods order; every exact route/format/path/caller survives.",
    "prices": "Original public DTO fields and original native display HTML; no flattened or normalized offers."
  },
  "representation": "exact-public-dto-and-native-renderer-html",
  "representationNotes": {
    "current_reference": {
      "about_json_pointer": "/aboutHtml",
      "methods": [
        {
          "contract_json_pointer": "/methods/0/rawMethod/contract",
          "html_json_pointer": "/methods/0/html",
          "method_ordinal": 0
        }
      ],
      "role": "current-semantic-reference"
    },
    "raw_input": {
      "examples_role": "historical-input-not-current-ready-examples",
      "json_pointers": [
        "/rawModel",
        "/methods/0/rawMethod"
      ],
      "role": "historical-owner-input"
    },
    "schema": "ailoot-native-model-representations-v1"
  },
  "schema": "ailoot-static-model-facts-v1",
  "schema_version": 1,
  "shortText": "GPT-4.1 Nano är den kompakta medlemmen i GPT-4.1-familjen med kort svarstid för noggrant specificerade text- och bilduppgifter. Dess stora kontext, Structured Outputs och funktionsanrop stöder klassificering, extraktion och avgränsade applikationssteg.",
  "source": {
    "audit_sha256": "2e00086bcbfc28e64d0cebe97aa47c17d8d5618963027f8ffb9dc6123d7d25b1",
    "bridge_map_sha256": "1125275768b9636fc8461bc7da5061239a81ddfe508e2557843ca42c58ab0036",
    "raw_model_json_sha256": "ff673d40db0da98c1a412d5213e5b7d03f21263af3d49db6b30103d1bb246e60",
    "renderer_sha256": "8a45bb31b83d2551e6d975cf4683518c7cb445a54b9394a01947f4dd103f1051"
  },
  "sourceRevision": "a7faa49db0a93c2ae95b31b65a4d65e36add8715bbb4c35b3433cf6498811049"
}
