Source: https://ailoot.ai/models/pl/gemini-3-7-flash/
Canonical: https://ailoot.ai/models/pl/gemini-3-7-flash/
Language: pl

# Google: Gemini 3.7 Flash

[Markdown](https://ailoot.ai/models/pl/gemini-3-7-flash/index.md) · [JSON](https://ailoot.ai/models/pl/gemini-3-7-flash/facts.json)

## [Google: Gemini 3.7 Flash](https://ailoot.ai/models/pl/gemini-3-7-flash/)

Gemini 3.7 Flash łączy rozumowanie multimodalne z programowaniem i wieloetapową pracą agentów. Profil Google 3.7 kładzie nacisk na wierność makietom projektowym i agentowe rozumienie wideo, z rozumowaniem low, medium i high. Przyjmuje tekst i media, zwraca tekst i ma udokumentowane limity wejścia/wyjścia 1,048,576/65,536 tokenów.

- [**Ailoot · Anthropic Messages** `POST /v1/messages` `gemini-3.7-flash`](https://ailoot.ai/models/pl/gemini-3-7-flash/#method-0)
- [**Ailoot · Gemini generateContent** `POST /v1beta/models/{model}:generateContent` `gemini-3.7-flash`](https://ailoot.ai/models/pl/gemini-3-7-flash/#method-1)
- [**Ailoot Ultra · OpenAI Chat** `POST /v1/chat/completions` `gemini-3.7-flash`](https://ailoot.ai/models/pl/gemini-3-7-flash/#method-2)
- [**Ailoot Ultra · Anthropic Messages** `POST /v1/messages` `gemini-3.7-flash`](https://ailoot.ai/models/pl/gemini-3-7-flash/#method-3)
- [**Ailoot Ultra · OpenAI Chat** `POST /v1/chat/completions` `google/gemini-3.7-flash`](https://ailoot.ai/models/pl/gemini-3-7-flash/#method-4)
- [**Ailoot Ultra · Anthropic Messages** `POST /v1/messages` `google/gemini-3.7-flash`](https://ailoot.ai/models/pl/gemini-3-7-flash/#method-5)

O modelu

Ten opis przedstawia możliwości modelu. Dane wejściowe, wyniki i opcje dostępne w Ailoot podano poniżej dla wybranej metody.

Gemini 3.7 Flash to nazwany profil rozumowania multimodalnego Google do programowania, przepływów pracy agentów i wykonania wieloetapowego. Rozwija Gemini 3.6 Flash, wprowadzając zmiany algorytmiczne w rozumowaniu i obsługę agentowego rozumienia wideo. Tekst, obrazy, audio, wideo i PDF mogą stanowić materiał źródłowy dla wyniku tekstowego. Przydatne rezultaty obejmują konkretną poprawkę kodu, porównanie makiety projektu z implementacją lub analizę zdarzeń w nagraniu opartą na źródle.

Przewodnik deweloperski 3.7 podkreśla lepszą zgodność z projektem w pracy nad aplikacjami komputerowymi i internetowymi. W takim zadaniu podaj zamierzoną makietę, odpowiednie źródło i obserwowalną rozbieżność. Poproś o porównanie konkretnych elementów, takich jak odstępy, stany komponentów, hierarchia tekstu lub zachowanie interakcji. Przy porównaniu projektu poproś o listę niezgodności między makietą panelu ustawień a istniejącą implementacją, z każdą proponowaną poprawką powiązaną ze zrzutem ekranu lub źródłem. Wynik powinien określać, co trzeba zmienić, bez milczącego rozszerzania projektu poza podane wymagania.

W przepływie programistycznym podaj cel, istniejące zachowanie, odpowiednie pliki i ograniczenia. Google pozycjonuje 3.7 do rozwiązywania problemów oprogramowania i ograniczania nieudanych pętli agentów, ale przydatny przegląd nadal sprawdza rzeczywistą modyfikację i wynik walidacji. Zachowuj sekwencję obserwacji narzędzi w rozmowie, aby późniejszy etap nie zaczynał od wymyślonego opisu kodu projektu. Wynik końcowy może odróżniać proponowaną zmianę od zmiany potwierdzonej narzędziami połączonej aplikacji.

Udokumentowane poziomy myślenia to low, medium i high, z domyślnym medium. Low wspiera szybsze odpowiedzi o ograniczonym zakresie, natomiast high jest przeznaczone do trudnego rozumowania i rozbudowanej pracy z narzędziami. Gemini 3.7 Flash nie obsługuje myślenia minimal. Krótka analiza jednej niezgodności interfejsu i głębsze badanie wielu plików wymagają więc różnych poziomów wysiłku. Określ rezultat końcowy i warunki, które musi spełnić, zanim poprosisz o dłuższą sekwencję rozumowania i działań.

Dokładna strona modelu wymienia wywoływanie funkcji, wykonywanie kodu, wyszukiwanie plików, ugruntowanie przez wyszukiwanie, ugruntowanie Maps i kontekst URL. Computer Use oznaczono jako preview, a structured outputs mogą definiować rekord wyniku. Żądanie funkcji jest proponowaną operacją do wykonania przez połączoną aplikację i zwrócenia przez nią wyniku. W zadaniu agentowym nadaj narzędziu jasny cel i zachowaj rzeczywisty wynik przed poproszeniem modelu o kontynuację. Przy ekstrakcji dokumentu zdefiniuj pola, dopuszczalne wartości i sposób reprezentacji brakujących informacji.

Ta edycja obsługuje agentowe rozumienie wideo. Dostarcz odpowiednie nagranie i określ zdarzenie lub relację do zbadania. Praktyczny opis może pytać, które widoczne działanie wyjaśnia zmianę stanu, lub wymagać uporządkowanego opisu zdarzeń z dowodami z klipu. Obrazy i strony PDF mogą podobnie wspierać porównanie wizualne lub dokumentowe. Wyjście pozostaje tekstem: interpretacją, wyodrębnionymi danymi, kodem lub pisemnym wyjaśnieniem. Generowane wideo, grafika i mowa należą do osobnych profili modeli.

Dokładna tabela API Google 3.7 określa 1,048,576 tokenów wejściowych i 65,536 tokenów wyjściowych, podczas gdy natywna karta opisuje kontekst do 1M i wyjście tekstowe 64K. Uwzględnij instrukcje, wcześniejsze tury i dostarczone media w przygotowaniu wejścia. Dla profilu producenta wymieniono przetwarzanie wsadowe i buforowanie wraz z opcjami Flex i Priority. Dla zbioru niezależnych żądań zachowuj identyfikatory źródeł i spójny format wyniku, aby każdą odpowiedź można było sprawdzić względem jej własnego wejścia.

Możliwe ograniczenia obejmują halucynacje i sporadyczne spowolnienia lub przekroczenia czasu. Data graniczna wiedzy to marzec 2026, przy czym niektóre dziedziny są ograniczone do stycznia 2025. Dostarcz aktualne materiały źródłowe, gdy wniosek zależy od nowszych faktów. Przydatną cechą wyróżniającą tę edycję jest udokumentowany nacisk na problemy oprogramowania, zgodność z projektem i rozumowanie o wideo; sprawdzaj te wyniki względem rzeczywistej makiety, kodu lub mediów, zamiast zastępować nazwany historyczny profil nowszymi funkcjami.

Zadanie praktyczne

### Zadanie praktyczne

Przykład techniczny po angielsku

```
Match a written panel specification

Compare this panel specification with its CSS. Specification: title above the form; labels remain visible; error text appears below its field. CSS: .panel{display:flex;flex-direction:column-reverse} .field label{display:none}. Explain the mismatches and propose the smallest CSS and markup corrections. Give inspection checks for normal and error states using the supplied written requirements.
```

#### Oczekiwany wynik

```
A mismatch list, focused CSS/markup changes and normal/error-state inspection checks.
```

#### Sprawdź wynik

```
Check that each proposed change maps to a stated requirement without redesigning other elements.
```

**Ailoot · Anthropic Messages** `POST /v1/messages` `gemini-3.7-flash`

[`gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Core&caller=gemini-3.7-flash&fmt=messages)

Google /`gemini-3.7-flash`

### Start

Gemini 3.7 Flash łączy rozumowanie multimodalne z programowaniem i wieloetapową pracą agentów. Profil Google 3.7 kładzie nacisk na wierność makietom projektowym i agentowe rozumienie wideo, z rozumowaniem low, medium i high. Przyjmuje tekst i media, zwraca tekst i ma udokumentowane limity wejścia/wyjścia 1,048,576/65,536 tokenów.

Akceptowane dane wejściowe

Tekst · Obrazy

Wyniki

Tekst

### Dostępne w Ailoot · dane wejściowe i metody

**Ailoot · Anthropic Messages** `POST /v1/messages`

Wejście

`text`, `image`

Wyjście

`text`

Kontekst

1 048 576 tokens

Maksymalny wynik

65 536 tokens

Format wyjściowy

json lub SSE

| Pole | Typ | Wymaganie | Wartości i limity | Domyślnie |
| --- | --- | --- | --- | --- |
| Pole`model` | Typ`string` | WymaganieWymagane | Wartości i limity gemini-3.7-flash | Domyślnie— |
| Pole`messages` | Typ`message[]` | WymaganieWymagane | Wartości i limity Minimalna liczba elementów: 1 | Domyślnie— |
| Pole`messages[].role` | Typ`string` | WymaganieWymagane | Wartości i limity user, assistant | Domyślnie— |
| Pole`messages[].content` | Typ`string\|content_block[]` | WymaganieWymagane | Wartości i limity | Domyślnie— |
| Pole`system` | Typ`string\|content_block[]` | WymaganieOpcjonalne | Wartości i limity | Domyślnie— |
| Pole`max_tokens` | Typ`integer` | WymaganieWymagane | Wartości i limity Minimum: 1 Limit dotyczy: dokładny limit wybranego modelu/karty | Domyślnie— |
| Pole`stream` | Typ`boolean` | WymaganieOpcjonalne | Wartości i limity | Domyślniefalse |
| Pole`temperature` | Typ`number` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`top_p` | Typ`number` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`stop_sequences` | Typ`string[]` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`tools` | Typ`tool[]` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`tools[].name` | Typ`string` | WymaganieOpcjonalne | Wartości i limity Obowiązuje, gdy: udostępnione narzędzie | Domyślnie— |
| Pole`tools[].description` | Typ`string` | WymaganieOpcjonalne | Wartości i limity | Domyślnie— |
| Pole`tools[].input_schema` | Typ`JSON_schema` | WymaganieOpcjonalne | Wartości i limity | Domyślnie— |
| Pole`tool_choice` | Typ`object` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`thinking.type` | Typ`string` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`thinking.budget_tokens` | Typ`integer` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`output_config.effort` | Typ`string` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`metadata` | Typ`object` | WymaganieOpcjonalne | Wartości i limity | Domyślnie— |
| Pole`cache_control` | Typ`object` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |

Kombinacje materiałów wejściowych

**Tekst** · tekst UTF8

`messages[].content lub blok type=text`

**Tekst + obraz**

`{type:image,source:{type:base64,media_type,data}} lub źródło type=url`

Parametry i cykl życia metody

| Parametr | Kontrakt |
| --- | --- |
| Parametr`material_types` | Kontrakttext, image |
| Parametr`required` | Kontraktmodel, messages, max\_tokens |
| Parametr`optional_controls` | Kontraktnull |
| Parametr`content_type` | Kontraktapplication/json |
| Parametr`text_file_material` | Kontraktrzeczywista treść UTF-8 wstawiona jako tekst; ID/URLs plików wymagają oddzielnej, dokładnie określonej obsługi |

Cykl życia: `exact retained published method`

Struktury metod i ID są dokładne; możliwości dostawcy są odrębne od dopuszczenia żądania.

### Cennik

#### Stawki metod Ailoot

Wejście

0,00075 USD */ 1K*

Wyjście

0,00375 USD */ 1K*

Odczyt cache

0,000075 USD */ 1K*

Ailoot rezerwuje szacowaną kwotę przed żądaniem. Po otrzymaniu wyniku rozlicza ostateczną opłatę według zmierzonego użycia. Rozliczenie strumieniowania korzysta z końcowego rekordu użycia. [Jak działają rezerwacja i rozliczenie →](https://ailoot.ai/docs/pl/billing/reserve/)

#### Szczegóły taryfy referencyjnej

Referencyjne tabele modelu nie zmieniają wyboru metody, wyceny ani opłat. Naliczane opłaty korzystają ze stawek wybranej metody Ailoot.

Referencyjne tabele modelu

#### Ceny według konfiguracji

Dopasuj każdą opłatę do pokazanych warunków. Użyj jednej stawki dla każdego zestawu alternatywnych konfiguracji.

| Konfiguracja | Tabela stawek | Opłata |
| --- | --- | --- |
| KonfiguracjaOpenAI Chat · Podstawowe stawki za tokeny | Tabela stawekStawka podstawowa | Opłata Wejście · Tokeny wejściowe **$0.003** / 1K tokenów Wyjście · Tokeny wyjściowe **$0.015** / 1K tokenów Wejście · Odczyt cache **$0.0003** / 1K tokenów Wejście · Zapis do cache **—** / 1K tokenów Wejście · Zapis do cache, 1 godz. **—** / 1K tokenów |
| KonfiguracjaAnthropic Messages · Podstawowe stawki za tokeny | Tabela stawekStawka podstawowa | Opłata Wejście · Tokeny wejściowe **$0.003** / 1K tokenów Wyjście · Tokeny wyjściowe **$0.015** / 1K tokenów Wejście · Odczyt cache **$0.0003** / 1K tokenów Wejście · Zapis do cache **—** / 1K tokenów Wejście · Zapis do cache, 1 godz. **—** / 1K tokenów |

### Przykładowe żądania

#### Ailoot · Anthropic Messages

Przykład tekstowyWejście, obrazPython SDKNode.js SDKStrumień w Pythonie

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 source-material file}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "gemini-3.7-flash", "max_tokens": 1024, "messages": []}')
f=Path(os.environ["AILOOT_TEXT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 source material")
text=f.read_text(encoding="utf-8")
if not text.strip():raise SystemExit("Source material must contain text")
p["messages"]=[{"role":"user","content":"Summarize this material and quote supporting source passages.\n\n"+text}]
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/messages \
  -H "x-api-key: $AILOOT_API_KEY" -H 'anthropic-version: 2023-06-01' -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
PY_RESULT
```

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_IMAGE_FILE:?Set your actual PNG JPEG or WebP image}"
export AILOOT_IMAGE_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "gemini-3.7-flash", "max_tokens": 1024, "messages": [{"role": "user", "content": [{"type": "text", "text": "Read labels and numbers in this image; flag unreadable text."}]}]}')
import base64
f=Path(os.environ["AILOOT_IMAGE_FILE"])
if not f.is_file():raise SystemExit("Choose an actual PNG JPEG or WebP image")
raw=f.read_bytes()
mime="image/png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "image/jpeg" if raw.startswith(b"\xff\xd8") else "image/webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else None
if not mime:raise SystemExit("Use PNG JPEG or WebP")
b64=base64.b64encode(raw).decode()
p["messages"][0]["content"].append({"type":"image","source":{"type":"base64","media_type":mime,"data":b64}})
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/messages \
  -H "x-api-key: $AILOOT_API_KEY" -H 'anthropic-version: 2023-06-01' -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
PY_RESULT
```

```python
import anthropic
import os

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client = anthropic.Anthropic(base_url="https://api.ailoot.ai", api_key=os.environ["AILOOT_API_KEY"], max_retries=0)
msg = client.messages.create(
    model="gemini-3.7-flash",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Explain the difference between an observation and a hypothesis in three sentences."}],
)
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(msg.to_dict(mode="json"))
```

```js
import Anthropic from "@anthropic-ai/sdk";

if (!process.env.AILOOT_API_KEY?.trim()) throw new Error("Set AILOOT_API_KEY before making a request");
const client = new Anthropic({ baseURL: "https://api.ailoot.ai", apiKey: process.env.AILOOT_API_KEY, maxRetries: 0 });
const msg = await client.messages.create({
  model: "gemini-3.7-flash",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Explain the difference between an observation and a hypothesis in three sentences." }],
});
import { writeFileSync } from "node:fs";

function saveResult(data, stem = "result") {
  writeFileSync(stem + ".json", JSON.stringify(data, null, 2));
  console.log(JSON.stringify(data, null, 2));
  const saveBlob = (encoded, suffix, label) => {
    const raw = Buffer.from(encoded, "base64");
    const ext = raw.subarray(0,8).equals(Buffer.from([137,80,78,71,13,10,26,10])) ? "png" : raw[0]===255 && raw[1]===216 ? "jpg" : raw.subarray(0,4).toString()==="RIFF" && raw.subarray(8,12).toString()==="WEBP" ? "webp" : suffix;
    const file = `${stem}-${label}.${ext}`;
    writeFileSync(file, raw); console.log("Saved", file);
  };
  for (const [i, block] of (data.content || []).entries()) console.log("Content", i, JSON.stringify(block));
  for (const choice of data.choices || []) console.log("Choice", choice.index, JSON.stringify(choice.message || choice.delta || {}));
  for (const [i, item] of (data.output || []).entries()) {
    console.log("Output", i, JSON.stringify(item));
    if (item.type === "image_generation_call" && item.result) saveBlob(item.result, item.output_format || "bin", `output-${i}`);
  }
  for (const [ci, candidate] of (data.candidates || []).entries()) {
    for (const [pi, part] of (candidate.content?.parts || []).entries()) {
      console.log("Candidate/part", ci, pi, JSON.stringify(part));
      const blob = part.inlineData || part.inline_data;
      if (blob?.data) {
        const mime = blob.mimeType || blob.mime_type;
        const suffix = ({"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"})[mime] || "bin";
        saveBlob(blob.data, suffix, `candidate-${ci}-part-${pi}`);
      }
    }
  }
}

saveResult(msg);
```

```python
import anthropic,os
from pathlib import Path

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=anthropic.Anthropic(base_url="https://api.ailoot.ai",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

with client.messages.stream(model='gemini-3.7-flash',max_tokens=1024,messages=[{"role":"user","content":"Explain observations and hypotheses in three sentences."}]) as stream:
    with Path("stream-events.jsonl").open("w",encoding="utf-8") as log:
        for event in stream:
            payload=event.to_dict(mode="json")
            log.write(json.dumps(payload,ensure_ascii=False)+"\n"); log.flush()
            print(json.dumps(payload,ensure_ascii=False))
    final=stream.get_final_message()
    save_result(final.to_dict(mode="json"),"stream-result")
```

### Odbieranie i zapisywanie wyników

#### Ailoot · Anthropic Messages

json lub SSE

##### Zachowaj wszystkie ukończone wyniki

Zachowaj każdą kompletną zwróconą odpowiedź, plik i część treści.

Zachowaj wszystkie bloki treści, sygnatury myślenia i rzeczywiste ID użycia narzędzi. Złóż wszystkie przyrosty bloków SSE; pierwszy blok tekstowy nie jest pełnym wyjściem.

##### Jeśli trzeba sprawdzić pierwotną odpowiedź

Zachowaj ID i nagłówki żądań/odpowiedzi. Nie udostępniono ogólnego URL pobierania zadania tekstowego.

Pola odpowiedzi

| Pole | Typ |
| --- | --- |
| Pole`id` | Typstring |
| Pole`model` | Typstring |
| Pole`content[]` | Typtext\|thinking\|tool\_use\|other content block |
| Pole`stop_reason` | Typstring\|null |
| Pole`usage` | Typobject |

Błędy i dalsze kroki

| Odpowiedź | Warunek | Następny krok |
| --- | --- | --- |
| Odpowiedź400 · `invalid_request_error` | WarunekNieprawidłowe wymagane pola, sposób reprezentacji materiału lub wartość parametru | Następny krokPopraw wskazane pola przed nowym żądaniem utworzenia. |

### Aliasy

#### Aliasy modelu

<strong>Ailoot</strong> [`gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Core&caller=gemini-3.7-flash&fmt=messages)
**Ailoot Ultra** [`gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Ultra&caller=gemini-3.7-flash&fmt=messages), [`google/gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Ultra&caller=google%2Fgemini-3.7-flash&fmt=messages)

#### Aliasy ścieżek metod

`/chat/completions`

#### Powiązane ID modeli

[`google/gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Ultra&caller=google%2Fgemini-3.7-flash&fmt=messages), [`gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Core&caller=gemini-3.7-flash&fmt=messages), [`gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Ultra&caller=gemini-3.7-flash&fmt=messages)

**Ailoot · Gemini generateContent** `POST /v1beta/models/{model}:generateContent` `gemini-3.7-flash`

[`gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Core&caller=gemini-3.7-flash&fmt=gemini)

Google /`gemini-3.7-flash`

### Start

Gemini 3.7 Flash łączy rozumowanie multimodalne z programowaniem i wieloetapową pracą agentów. Profil Google 3.7 kładzie nacisk na wierność makietom projektowym i agentowe rozumienie wideo, z rozumowaniem low, medium i high. Przyjmuje tekst i media, zwraca tekst i ma udokumentowane limity wejścia/wyjścia 1,048,576/65,536 tokenów.

Akceptowane dane wejściowe

Tekst · Obrazy

Wyniki

Tekst

### Dostępne w Ailoot · dane wejściowe i metody

**Ailoot · Gemini generateContent** `POST /v1beta/models/{model}:generateContent`

Wejście

`text`, `image`

Wyjście

`text`

Format wyjściowy

json lub obsługiwane strumieniowanie

| Pole | Typ | Wymaganie | Wartości i limity | Domyślnie |
| --- | --- | --- | --- | --- |
| Pole`path.model` | Typ`string` | WymaganieWymagane | Wartości i limity gemini-3.7-flash | Domyślnie— |
| Pole`contents` | Typ`content[]` | WymaganieWymagane | Wartości i limity Minimalna liczba elementów: 1 | Domyślnie— |
| Pole`contents[].role` | Typ`string` | WymaganieOpcjonalne | Wartości i limity user, model | Domyślnie— |
| Pole`contents[].parts` | Typ`part[]` | WymaganieWymagane | Wartości i limity | Domyślnie— |
| Pole`systemInstruction` | Typ`content` | WymaganieOpcjonalne | Wartości i limity | Domyślnie— |
| Pole`generationConfig.maxOutputTokens` | Typ`integer` | WymaganieOpcjonalne | Wartości i limity Minimum: 1 Zależy od modelu | Domyślnie— |
| Pole`generationConfig.temperature` | Typ`number` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`generationConfig.topP` | Typ`number` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`generationConfig.topK` | Typ`integer` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`generationConfig.stopSequences` | Typ`string[]` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`generationConfig.thinkingConfig.includeThoughts` | Typ`boolean` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`generationConfig.thinkingConfig.thinkingBudget` | Typ`integer` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`tools[].functionDeclarations` | Typ`function_declaration[]` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`toolConfig.functionCallingConfig.mode` | Typ`string` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`safetySettings` | Typ`object[]` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`sessionId` | Typ`string` | WymaganieOpcjonalne | Wartości i limity | Domyślnie— |

Kombinacje materiałów wejściowych

**Tekst** · tekst UTF8

`contents[].parts[].text`

**Tekst + obraz**

`parts[].inlineData={mimeType,data}`

Parametry i cykl życia metody

| Parametr | Kontrakt |
| --- | --- |
| Parametr`material_types` | Kontrakttext, image |
| Parametr`required` | Kontraktcontents |
| Parametr`optional_controls` | Kontraktnull |
| Parametr`content_type` | Kontraktapplication/json |
| Parametr`text_file_material` | Kontraktrzeczywista treść UTF-8 wstawiona jako tekst; ID/URLs plików wymagają oddzielnej, dokładnie określonej obsługi |

Cykl życia: `exact retained published method`

Struktury metod i ID są dokładne; możliwości dostawcy są odrębne od dopuszczenia żądania.

### Cennik

#### Stawki metod Ailoot

Wejście

0,00075 USD */ 1K*

Wyjście

0,00375 USD */ 1K*

Odczyt cache

0,000075 USD */ 1K*

Ailoot rezerwuje szacowaną kwotę przed żądaniem. Po otrzymaniu wyniku rozlicza ostateczną opłatę według zmierzonego użycia. Rozliczenie strumieniowania korzysta z końcowego rekordu użycia. [Jak działają rezerwacja i rozliczenie →](https://ailoot.ai/docs/pl/billing/reserve/)

#### Szczegóły taryfy referencyjnej

Referencyjne tabele modelu nie zmieniają wyboru metody, wyceny ani opłat. Naliczane opłaty korzystają ze stawek wybranej metody Ailoot.

Referencyjne tabele modelu

#### Ceny według konfiguracji

Dopasuj każdą opłatę do pokazanych warunków. Użyj jednej stawki dla każdego zestawu alternatywnych konfiguracji.

| Konfiguracja | Tabela stawek | Opłata |
| --- | --- | --- |
| KonfiguracjaOpenAI Chat · Podstawowe stawki za tokeny | Tabela stawekStawka podstawowa | Opłata Wejście · Tokeny wejściowe **$0.003** / 1K tokenów Wyjście · Tokeny wyjściowe **$0.015** / 1K tokenów Wejście · Odczyt cache **$0.0003** / 1K tokenów Wejście · Zapis do cache **—** / 1K tokenów Wejście · Zapis do cache, 1 godz. **—** / 1K tokenów |
| KonfiguracjaAnthropic Messages · Podstawowe stawki za tokeny | Tabela stawekStawka podstawowa | Opłata Wejście · Tokeny wejściowe **$0.003** / 1K tokenów Wyjście · Tokeny wyjściowe **$0.015** / 1K tokenów Wejście · Odczyt cache **$0.0003** / 1K tokenów Wejście · Zapis do cache **—** / 1K tokenów Wejście · Zapis do cache, 1 godz. **—** / 1K tokenów |

### Przykładowe żądania

#### Ailoot · Gemini generateContent

Przykład tekstowyWejście, obrazPython SDKNode.js SDKStrumień w Pythonie

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 source-material file}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"contents": []}')
f=Path(os.environ["AILOOT_TEXT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 source material")
text=f.read_text(encoding="utf-8")
if not text.strip():raise SystemExit("Source material must contain text")
p["contents"]=[{"role":"user","parts":[{"text":"Summarize this material and quote supporting source passages.\n\n"+text}]}]
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1beta/models/gemini-3.7-flash:generateContent \
  -H "x-goog-api-key: $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(json.loads(Path("result.json").read_text(encoding="utf-8")))
PY_RESULT
```

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_IMAGE_FILE:?Set your actual PNG JPEG or WebP image}"
export AILOOT_IMAGE_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"contents": [{"role": "user", "parts": [{"text": "Read labels and numbers in this image; flag unreadable text."}]}]}')
import base64
f=Path(os.environ["AILOOT_IMAGE_FILE"])
if not f.is_file():raise SystemExit("Choose an actual PNG JPEG or WebP image")
raw=f.read_bytes()
mime="image/png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "image/jpeg" if raw.startswith(b"\xff\xd8") else "image/webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else None
if not mime:raise SystemExit("Use PNG JPEG or WebP")
b64=base64.b64encode(raw).decode()
p["contents"][0]["parts"].append({"inlineData":{"mimeType":mime,"data":b64}})
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1beta/models/gemini-3.7-flash:generateContent \
  -H "x-goog-api-key: $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(json.loads(Path("result.json").read_text(encoding="utf-8")))
PY_RESULT
```

```python
from google import genai
from google.genai import types
import os

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client = genai.Client(
    api_key=os.environ["AILOOT_API_KEY"],
    http_options=types.HttpOptions(base_url="https://api.ailoot.ai"),
)
resp = client.models.generate_content(model="gemini-3.7-flash", contents="Explain the difference between an observation and a hypothesis in three sentences.")
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(resp.to_json_dict())
```

```js
import { GoogleGenAI } from "@google/genai";

if (!process.env.AILOOT_API_KEY?.trim()) throw new Error("Set AILOOT_API_KEY before making a request");
const ai = new GoogleGenAI({ apiKey: process.env.AILOOT_API_KEY, httpOptions: { baseUrl: "https://api.ailoot.ai" } });
const resp = await ai.models.generateContent({ model: "gemini-3.7-flash", contents: "Explain the difference between an observation and a hypothesis in three sentences." });
import { writeFileSync } from "node:fs";

function saveResult(data, stem = "result") {
  writeFileSync(stem + ".json", JSON.stringify(data, null, 2));
  console.log(JSON.stringify(data, null, 2));
  const saveBlob = (encoded, suffix, label) => {
    const raw = Buffer.from(encoded, "base64");
    const ext = raw.subarray(0,8).equals(Buffer.from([137,80,78,71,13,10,26,10])) ? "png" : raw[0]===255 && raw[1]===216 ? "jpg" : raw.subarray(0,4).toString()==="RIFF" && raw.subarray(8,12).toString()==="WEBP" ? "webp" : suffix;
    const file = `${stem}-${label}.${ext}`;
    writeFileSync(file, raw); console.log("Saved", file);
  };
  for (const [i, block] of (data.content || []).entries()) console.log("Content", i, JSON.stringify(block));
  for (const choice of data.choices || []) console.log("Choice", choice.index, JSON.stringify(choice.message || choice.delta || {}));
  for (const [i, item] of (data.output || []).entries()) {
    console.log("Output", i, JSON.stringify(item));
    if (item.type === "image_generation_call" && item.result) saveBlob(item.result, item.output_format || "bin", `output-${i}`);
  }
  for (const [ci, candidate] of (data.candidates || []).entries()) {
    for (const [pi, part] of (candidate.content?.parts || []).entries()) {
      console.log("Candidate/part", ci, pi, JSON.stringify(part));
      const blob = part.inlineData || part.inline_data;
      if (blob?.data) {
        const mime = blob.mimeType || blob.mime_type;
        const suffix = ({"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"})[mime] || "bin";
        saveBlob(blob.data, suffix, `candidate-${ci}-part-${pi}`);
      }
    }
  }
}

saveResult(resp);
```

```python
from google import genai
from google.genai import types
import os
from pathlib import Path

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=genai.Client(api_key=os.environ["AILOOT_API_KEY"],http_options=types.HttpOptions(base_url="https://api.ailoot.ai"))
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

count=0
with Path("stream-events.jsonl").open("w",encoding="utf-8") as log:
    for chunk in client.models.generate_content_stream(model='gemini-3.7-flash',contents="Explain observations and hypotheses in three sentences."):
        payload=chunk.to_json_dict()
        log.write(json.dumps(payload,ensure_ascii=False)+"\n"); log.flush()
        save_result(payload,"stream-chunk-"+str(count))
        count+=1
```

### Odbieranie i zapisywanie wyników

#### Ailoot · Gemini generateContent

json lub obsługiwane strumieniowanie

##### Zachowaj wszystkie ukończone wyniki

Zachowaj każdą kompletną zwróconą odpowiedź, plik i część treści.

Zachowaj wszystkich kandydatów i części, w tym wywołania funkcji, sygnatury myślenia i dane użycia; składaj fragmenty strumienia w kolejności.

##### Jeśli trzeba sprawdzić pierwotną odpowiedź

Zachowaj ID i nagłówki żądań/odpowiedzi. Nie udostępniono ogólnego URL pobierania zadania tekstowego.

Pola odpowiedzi

| Pole | Typ |
| --- | --- |
| Pole`responseId` | Typstring |
| Pole`modelVersion` | Typstring |
| Pole`candidates[].content.parts[]` | Typtext\|inlineData\|functionCall\|other part |
| Pole`candidates[].finishReason` | Typstring |
| Pole`usageMetadata` | Typobject |

Błędy i dalsze kroki

| Odpowiedź | Warunek | Następny krok |
| --- | --- | --- |
| Odpowiedź400 · `invalid_request_error` | WarunekNieprawidłowe wymagane pola, sposób reprezentacji materiału lub wartość parametru | Następny krokPopraw wskazane pola przed nowym żądaniem utworzenia. |

### Aliasy

#### Aliasy modelu

<strong>Ailoot</strong> [`gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Core&caller=gemini-3.7-flash&fmt=gemini)
**Ailoot Ultra** [`gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Ultra&caller=gemini-3.7-flash), [`google/gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Ultra&caller=google%2Fgemini-3.7-flash)

#### Aliasy ścieżek metod

`/chat/completions`

#### Powiązane ID modeli

[`google/gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Ultra&caller=google%2Fgemini-3.7-flash), [`gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Core&caller=gemini-3.7-flash&fmt=gemini), [`gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Ultra&caller=gemini-3.7-flash)

**Ailoot Ultra · OpenAI Chat** `POST /v1/chat/completions` `gemini-3.7-flash`

[`gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Ultra&caller=gemini-3.7-flash&fmt=chat)

Google /`gemini-3.7-flash`

ID modelu

- `gemini-3.7-flash`
- `google/gemini-3.7-flash`

### Start

Gemini 3.7 Flash łączy rozumowanie multimodalne z programowaniem i wieloetapową pracą agentów. Profil Google 3.7 kładzie nacisk na wierność makietom projektowym i agentowe rozumienie wideo, z rozumowaniem low, medium i high. Przyjmuje tekst i media, zwraca tekst i ma udokumentowane limity wejścia/wyjścia 1,048,576/65,536 tokenów.

Akceptowane dane wejściowe

Tekst

Wyniki

Tekst

### Dostępne w Ailoot · dane wejściowe i metody

**Ailoot Ultra · OpenAI Chat** `POST /v1/chat/completions`

Wejście

`text`

Wyjście

`text`

Format wyjściowy

json lub SSE

| Pole | Typ | Wymaganie | Wartości i limity | Domyślnie |
| --- | --- | --- | --- | --- |
| Pole`model` | Typ`string` | WymaganieWymagane | Wartości i limity gemini-3.7-flash | Domyślnie— |
| Pole`messages` | Typ`message[]` | WymaganieWymagane | Wartości i limity Minimalna liczba elementów: 1 | Domyślnie— |
| Pole`messages[].role` | Typ`string` | WymaganieWymagane | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`messages[].content` | Typ`string` | WymaganieOpcjonalne | Wartości i limity Obowiązuje, gdy: Rozmowa tekstowa | Domyślnie— |
| Pole`stream` | Typ`boolean` | WymaganieOpcjonalne | Wartości i limity | Domyślniefalse |

Kombinacje materiałów wejściowych

**Tekst** · tekst UTF8

`messages[].content`

Parametry i cykl życia metody

| Parametr | Kontrakt |
| --- | --- |
| Parametr`content_type` | Kontraktapplication/json |
| Parametr`required` | Kontraktmodel, messages |
| Parametr`material_types` | Kontrakttext |
| Parametr`messages` | Kontrakttablica wiadomości o strukturze role/content |
| Parametr`file_material` | Kontraktrzeczywisty dokument UTF-8 wstawiony jako dosłowny tekst; bez wywnioskowanego ID pliku |
| Parametr`optional_controls` | Kontraktstream |
| Parametr`control_scope` | KontraktRozmowa tekstowa; stream jest wartością logiczną i domyślnie wynosi false. |
| Parametr`output_modalities` | Kontrakttext |
| Parametr`hosted_operations` | Kontraktfalse |
| Parametr`multimodal_input_binding` | Kontraktnull |

Aliasy metody: `/chat/completions`

Cykl życia: `synchronous_or_streamed`

Wyślij dokładne ID modelu wraz z messages.

Długość kontekstu nie jest limitem wyjścia.

Plik tekstowy może dostarczyć dosłowny tekst; wejścia obrazowe/dźwiękowe/obiekty plików wymagają dokładnego powiązania.

### Cennik

Informacje taryfowe nie dodają opcji żądania. Obsługiwane parametry podano przy wybranej metodzie.

Tryb szybki

Nie określono Gdy wybrany jest tryb szybki

Tryb flex

Nie określono Gdy wybrany jest tryb flex

Maksymalna intensywność rozumowania

Nie określono Gdy dla maksymalnej intensywności rozumowania stosowana jest domyślna korekta (default)

Wycena jawnej pamięci podręcznej

Niewłączone Gdy zażądano jawnej pamięci podręcznej

#### Stawki Ailoot

#### Ceny według konfiguracji

| Konfiguracja | Tabela stawek | Opłata |
| --- | --- | --- |
| KonfiguracjaPodstawowe stawki za tokeny | Tabela stawekStawka podstawowa | Opłata Wejście · Tokeny wejściowe **$0.003** / 1K tokenów Wyjście · Tokeny wyjściowe **$0.015** / 1K tokenów Wejście · Odczyt cache **$0.0003** / 1K tokenów Wejście · Zapis do cache **—** / 1K tokenów Wejście · Zapis do cache, 1 godz. **—** / 1K tokenów |

Ailoot rezerwuje szacowaną kwotę przed żądaniem. Po otrzymaniu wyniku rozlicza ostateczną opłatę według zmierzonego użycia. Rozliczenie strumieniowania korzysta z końcowego rekordu użycia. [Jak działają rezerwacja i rozliczenie →](https://ailoot.ai/docs/pl/billing/reserve/)

### Przykładowe żądania

#### Ailoot Ultra · OpenAI Chat

curlPython SDK

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model":"gemini-3.7-flash","messages":[{"role":"user","content":"hello"}],"stream":false}')

Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
r=json.loads(Path("result.json").read_text())
for x in r.get("choices",[]):
    if x.get("message",{}).get("content"): print(x["message"]["content"])
PY_RESULT
```

```python
from openai import OpenAI
import os

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
result=client.chat.completions.create(model="gemini-3.7-flash", messages=[{"role":"user","content":"hello"}], stream=False)
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(result.to_dict(mode="json"))
```

### Odbieranie i zapisywanie wyników

#### Ailoot Ultra · OpenAI Chat

json lub SSE

##### Zachowaj wszystkie ukończone wyniki

Zachowaj każdą kompletną zwróconą odpowiedź, plik i część treści.

Zachowaj każdy wariant i jego treść/wywołania narzędzi/rozumowanie. W SSE składaj przyrosty według indeksu wariantu/narzędzia, zachowując końcowy powód zakończenia i dane użycia.

##### Jeśli trzeba sprawdzić pierwotną odpowiedź

Zachowaj ID i nagłówki żądań/odpowiedzi. Nie udostępniono ogólnego URL pobierania zadania tekstowego.

Pola odpowiedzi

| Pole | Typ |
| --- | --- |
| Pole`choices[].index` | Typinteger |
| Pole`choices[].message.content` | Typstring\|null |
| Pole`choices[].message.tool_calls` | Typtool\_call\[\] |
| Pole`choices[].message.reasoning_content` | Typstring |
| Pole`choices[].message.reasoning_details` | Typobject\|array |
| Pole`choices[].finish_reason` | Typstring\|null |
| Pole`usage` | Typobject |

Błędy i dalsze kroki

| Odpowiedź | Warunek | Następny krok |
| --- | --- | --- |
| Odpowiedź400 · `invalid_request_error` | WarunekNieprawidłowe wymagane pola, sposób reprezentacji materiału lub wartość parametru | Następny krokPopraw wskazane pola przed nowym żądaniem utworzenia. |

### Aliasy

#### Aliasy modelu

<strong>Ailoot</strong> [`gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Core&caller=gemini-3.7-flash)
**Ailoot Ultra** [`gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Ultra&caller=gemini-3.7-flash&fmt=chat), [`google/gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Ultra&caller=google%2Fgemini-3.7-flash&fmt=chat)

#### Aliasy ścieżek metod

`/chat/completions`

#### Powiązane ID modeli

[`google/gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Ultra&caller=google%2Fgemini-3.7-flash&fmt=chat), [`gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Core&caller=gemini-3.7-flash), [`gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Ultra&caller=gemini-3.7-flash&fmt=chat)

**Ailoot Ultra · Anthropic Messages** `POST /v1/messages` `gemini-3.7-flash`

[`gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Ultra&caller=gemini-3.7-flash&fmt=messages)

Google /`gemini-3.7-flash`

ID modelu

- `gemini-3.7-flash`
- `google/gemini-3.7-flash`

### Start

Gemini 3.7 Flash łączy rozumowanie multimodalne z programowaniem i wieloetapową pracą agentów. Profil Google 3.7 kładzie nacisk na wierność makietom projektowym i agentowe rozumienie wideo, z rozumowaniem low, medium i high. Przyjmuje tekst i media, zwraca tekst i ma udokumentowane limity wejścia/wyjścia 1,048,576/65,536 tokenów.

Akceptowane dane wejściowe

Tekst

Wyniki

json · sse

### Dostępne w Ailoot · dane wejściowe i metody

**Ailoot Ultra · Anthropic Messages** `POST /v1/messages`

Wejście

`text`

Wyjście

`json`, `sse`

Format wyjściowy

JSON lub SSE

| Pole | Typ | Wymaganie | Wartości i limity | Domyślnie |
| --- | --- | --- | --- | --- |
| Pole`model` | Typ`string` | WymaganieWymagane | Wartości i limity gemini-3.7-flash | Domyślnie— |
| Pole`messages` | Typ`message[]` | WymaganieWymagane | Wartości i limity | Domyślnie— |
| Pole`messages[].role` | Typ`string` | WymaganieWymagane | Wartości i limity user, assistant | Domyślnie— |
| Pole`messages[].content` | Typ`string` | WymaganieWymagane | Wartości i limity | Domyślnie— |
| Pole`max_tokens` | Typ`integer` | WymaganieWymagane | Wartości i limity | Domyślnie— |
| Pole`stream` | Typ`boolean` | WymaganieOpcjonalne | Wartości i limity | Domyślniefalse |

Kombinacje materiałów wejściowych

**Tekst** · tekst UTF-8

`ciąg messages[].content`

Parametry i cykl życia metody

| Parametr | Kontrakt |
| --- | --- |
| Parametr`content_type` | Kontraktapplication/json |
| Parametr`required` | Kontraktmodel, messages, max\_tokens |
| Parametr`optional_controls` | Kontraktstream |
| Parametr`material_types` | Kontrakttext |
| Parametr`text_file_material` | KontraktOdczytaj rzeczywisty dokument UTF-8 i umieść jego tekst we wskazanym polu input lub w ciągu treści wiadomości. |

Cykl życia: `synchronous_or_streamed`

### Cennik

Informacje taryfowe nie dodają opcji żądania. Obsługiwane parametry podano przy wybranej metodzie.

Tryb szybki

Nie określono Gdy wybrany jest tryb szybki

Tryb flex

Nie określono Gdy wybrany jest tryb flex

Maksymalna intensywność rozumowania

Nie określono Gdy dla maksymalnej intensywności rozumowania stosowana jest domyślna korekta (default)

Wycena jawnej pamięci podręcznej

Niewłączone Gdy zażądano jawnej pamięci podręcznej

#### Stawki Ailoot

#### Ceny według konfiguracji

| Konfiguracja | Tabela stawek | Opłata |
| --- | --- | --- |
| KonfiguracjaPodstawowe stawki za tokeny | Tabela stawekStawka podstawowa | Opłata Wejście · Tokeny wejściowe **$0.003** / 1K tokenów Wyjście · Tokeny wyjściowe **$0.015** / 1K tokenów Wejście · Odczyt cache **$0.0003** / 1K tokenów Wejście · Zapis do cache **—** / 1K tokenów Wejście · Zapis do cache, 1 godz. **—** / 1K tokenów |

Ailoot rezerwuje szacowaną kwotę przed żądaniem. Po otrzymaniu wyniku rozlicza ostateczną opłatę według zmierzonego użycia. Rozliczenie strumieniowania korzysta z końcowego rekordu użycia. [Jak działają rezerwacja i rozliczenie →](https://ailoot.ai/docs/pl/billing/reserve/)

### Przykładowe żądania

#### Ailoot Ultra · Anthropic Messages

Kompletna minimalna treść żądania JSONcurl · użyj swojego dokumentu UTF-8Python · zapisz kompletny wynik

```json
{
  "model": "gemini-3.7-flash",
  "max_tokens": 128,
  "messages": [
    {
      "role": "user",
      "content": "Summarize the incident report."
    }
  ],
  "stream": false
}
```

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 document}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json, os
from pathlib import Path

source_file = Path(os.environ['AILOOT_TEXT_FILE'])
if not source_file.is_file():
    raise SystemExit('Set AILOOT_TEXT_FILE to your actual UTF-8 document')
text = source_file.read_text(encoding='utf-8')
if not text.strip():
    raise SystemExit('Choose a document containing text')
payload = {'model': 'gemini-3.7-flash', 'max_tokens': 128, 'messages': [{'role': 'user', 'content': 'Summarize the incident report.'}]}
payload['messages'][0]['content'] = 'Summarize this material and quote supporting source passages.\n\n' + text
Path('request.json').write_text(json.dumps(payload, ensure_ascii=False), encoding='utf-8')
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/messages \
  -H "x-api-key: $AILOOT_API_KEY" -H 'anthropic-version: 2023-06-01' -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path

result = json.loads(Path('result.json').read_text(encoding='utf-8'))
print(json.dumps(result, ensure_ascii=False, indent=2))
PY_RESULT
```

```python
import json, os
from pathlib import Path

source_file = Path(os.environ['AILOOT_TEXT_FILE'])
if not source_file.is_file():
    raise SystemExit('Set AILOOT_TEXT_FILE to your actual UTF-8 document')
text = source_file.read_text(encoding='utf-8')
if not text.strip():
    raise SystemExit('Choose a document containing text')
payload = {'model': 'gemini-3.7-flash', 'max_tokens': 128, 'messages': [{'role': 'user', 'content': 'Summarize the incident report.'}]}
payload['messages'][0]['content'] = 'Summarize this material and quote supporting source passages.\n\n' + text
from urllib.request import Request, urlopen
from urllib.error import HTTPError

api_key = os.environ['AILOOT_API_KEY']
if not api_key.strip():
    raise SystemExit('Set AILOOT_API_KEY before making a request')
headers = {'x-api-key': 'PLACEHOLDER_KEY', 'anthropic-version': '2023-06-01', 'Content-Type': 'application/json'}
headers['x-api-key'] = api_key
request = Request('https://api.ailoot.ai/v1/messages', data=json.dumps(payload, ensure_ascii=False).encode('utf-8'), headers=headers, method='POST')
try:
    with urlopen(request, timeout=120) as response:
        raw = response.read()
        Path('response-headers.txt').write_text(str(response.headers), encoding='utf-8')
except HTTPError as error:
    Path('result.json').write_bytes(error.read())
    Path('response-headers.txt').write_text(str(error.headers), encoding='utf-8')
    raise
Path('result.json').write_bytes(raw)
import json
from pathlib import Path

result = json.loads(Path('result.json').read_text(encoding='utf-8'))
print(json.dumps(result, ensure_ascii=False, indent=2))
```

### Odbieranie i zapisywanie wyników

#### Ailoot Ultra · Anthropic Messages

JSON lub SSE

##### Zachowaj wszystkie ukończone wyniki

Zachowaj każdą kompletną zwróconą odpowiedź, plik i część treści.

Zachowaj wszystkie bloki treści, sygnatury myślenia i rzeczywiste ID użycia narzędzi. Złóż wszystkie przyrosty bloków SSE; pierwszy blok tekstowy nie jest pełnym wyjściem.

##### Jeśli trzeba sprawdzić pierwotną odpowiedź

Zachowaj ID i nagłówki żądań/odpowiedzi. Nie udostępniono ogólnego URL pobierania zadania tekstowego.

Pola odpowiedzi

| Pole | Typ |
| --- | --- |
| Pole`id` | Typstring |
| Pole`model` | Typstring |
| Pole`content[]` | Typtext\|thinking\|tool\_use\|other content block |
| Pole`stop_reason` | Typstring\|null |
| Pole`usage` | Typobject |

Błędy i dalsze kroki

| Odpowiedź | Warunek | Następny krok |
| --- | --- | --- |
| Odpowiedź400 · `invalid_request_error` | WarunekNieprawidłowe wymagane pola, sposób reprezentacji materiału lub wartość parametru | Następny krokPopraw wskazane pola przed nowym żądaniem utworzenia. |

### Aliasy

#### Aliasy modelu

<strong>Ailoot</strong> [`gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Core&caller=gemini-3.7-flash&fmt=messages)
**Ailoot Ultra** [`gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Ultra&caller=gemini-3.7-flash&fmt=messages), [`google/gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Ultra&caller=google%2Fgemini-3.7-flash&fmt=messages)

#### Aliasy ścieżek metod

`/chat/completions`

#### Powiązane ID modeli

[`google/gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Ultra&caller=google%2Fgemini-3.7-flash&fmt=messages), [`gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Core&caller=gemini-3.7-flash&fmt=messages), [`gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Ultra&caller=gemini-3.7-flash&fmt=messages)

**Ailoot Ultra · OpenAI Chat** `POST /v1/chat/completions` `google/gemini-3.7-flash`

[`google/gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Ultra&caller=google%2Fgemini-3.7-flash&fmt=chat)

Google /`google/gemini-3.7-flash`

ID modelu

- `gemini-3.7-flash`
- `google/gemini-3.7-flash`

### Start

Gemini 3.7 Flash łączy rozumowanie multimodalne z programowaniem i wieloetapową pracą agentów. Profil Google 3.7 kładzie nacisk na wierność makietom projektowym i agentowe rozumienie wideo, z rozumowaniem low, medium i high. Przyjmuje tekst i media, zwraca tekst i ma udokumentowane limity wejścia/wyjścia 1,048,576/65,536 tokenów.

Akceptowane dane wejściowe

Tekst

Wyniki

Tekst

### Dostępne w Ailoot · dane wejściowe i metody

**Ailoot Ultra · OpenAI Chat** `POST /v1/chat/completions`

Wejście

`text`

Wyjście

`text`

Format wyjściowy

json lub SSE

| Pole | Typ | Wymaganie | Wartości i limity | Domyślnie |
| --- | --- | --- | --- | --- |
| Pole`model` | Typ`string` | WymaganieWymagane | Wartości i limity google/gemini-3.7-flash | Domyślnie— |
| Pole`messages` | Typ`message[]` | WymaganieWymagane | Wartości i limity Minimalna liczba elementów: 1 | Domyślnie— |
| Pole`messages[].role` | Typ`string` | WymaganieWymagane | Wartości i limity Przykłady: system, user, assistant, tool, function Warunki: Te role są jawnie reprezentowane przez typy zgodności w kodzie źródłowym; dokładny zestaw ról pozostaje właściwy dla danego modelu. Zależy od modelu | Domyślnie— |
| Pole`messages[].content` | Typ`string\|content_part[]\|null` | WymaganieOpcjonalne | Wartości i limity | Domyślnie— |
| Pole`messages[].tool_calls` | Typ`tool_call[]` | WymaganieOpcjonalne | Wartości i limity | Domyślnie— |
| Pole`messages[].tool_call_id` | Typ`string` | WymaganieOpcjonalne | Wartości i limity Obowiązuje, gdy: role=tool; użyj rzeczywiście zwróconego ID | Domyślnie— |
| Pole`messages[].name` | Typ`string` | WymaganieOpcjonalne | Wartości i limity | Domyślnie— |
| Pole`messages[].reasoning_content` | Typ`string` | WymaganieOpcjonalne | Wartości i limity Obowiązuje, gdy: Przekazuj z powrotem rzeczywiście zwróconą treść rozumowania, gdy ten model jej używa | Domyślnie— |
| Pole`messages[].reasoning_details` | Typ`object\|array` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`max_tokens` | Typ`integer` | WymaganieOpcjonalne | Wartości i limity Minimum: 1 Zależy od modelu | Domyślnie— |
| Pole`max_completion_tokens` | Typ`integer` | WymaganieOpcjonalne | Wartości i limity Minimum: 1 Zależy od modelu | Domyślnie— |
| Pole`stream` | Typ`boolean` | WymaganieOpcjonalne | Wartości i limity | Domyślniefalse |
| Pole`stream_options.include_usage` | Typ`boolean` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`temperature` | Typ`number` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`top_p` | Typ`number` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`stop` | Typ`string\|string[]` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`tools` | Typ`function_tool[]` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`tools[].type` | Typ`string` | WymaganieOpcjonalne | Wartości i limity function Zależy od modelu | Domyślnie— |
| Pole`tools[].function.name` | Typ`string` | WymaganieWymagane | Wartości i limity Obowiązuje, gdy: udostępnione narzędzie funkcji | Domyślnie— |
| Pole`tools[].function.description` | Typ`string` | WymaganieOpcjonalne | Wartości i limity | Domyślnie— |
| Pole`tools[].function.parameters` | Typ`JSON_schema` | WymaganieOpcjonalne | Wartości i limity | Domyślnie— |
| Pole`tool_choice` | Typ`string\|object` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`parallel_tool_calls` | Typ`boolean` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`response_format` | Typ`object` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`reasoning_effort` | Typ`string` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`reasoning` | Typ`object` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`service_tier` | Typ`string` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`instructions` | Typ`string` | WymaganieOpcjonalne | Wartości i limity Pole zgodności | Domyślnie— |
| Pole`functions` | Typ`function[]` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`function_call` | Typ`string\|object` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`prompt_cache_options` | Typ`object` | WymaganieOpcjonalne | Wartości i limity Zależy od modelu | Domyślnie— |
| Pole`modalities` | Typ`string[]` | WymaganieOpcjonalne | Wartości i limity text | Domyślnie— |
| Pole`provider` | Typ`object` | WymaganieOpcjonalne | Wartości i limity Warunki: provider.options jest odrzucane na tej tekstowej trasie Ultra | Domyślnie— |
| Pole`cache_control.ttl` | Typ`string` | WymaganieOpcjonalne | Wartości i limity Warunki: 1h jest odrzucane w rzeczywistych miejscach pamięci podręcznej promptów | Domyślnie— |

Kombinacje materiałów wejściowych

**Tekst** · tekst UTF8

`messages[].content`

Parametry i cykl życia metody

| Parametr | Kontrakt |
| --- | --- |
| Parametr`content_type` | Kontraktapplication/json |
| Parametr`required` | Kontraktmodel, messages |
| Parametr`material_types` | Kontrakttext |
| Parametr`messages` | Kontrakttablica wiadomości o strukturze role/content |
| Parametr`file_material` | Kontraktrzeczywisty dokument UTF-8 wstawiony jako dosłowny tekst; bez wywnioskowanego ID pliku |
| Parametr`optional_controls` | Kontraktstream, temperature, top\_p, stop, max\_tokens, max\_completion\_tokens, reasoning, response\_format, tools, tool\_choice |
| Parametr`control_scope` | Kontraktwłaściwe dla modelu; narzędzia funkcji użytkownika różnią się od narzędzi hostowanych |
| Parametr`output_modalities` | Kontrakttext |
| Parametr`hosted_operations` | Kontraktfalse |
| Parametr`multimodal_input_binding` | Kontraktnull |

Cykl życia: `synchronous_or_streamed`

Wyślij dokładne ID modelu wraz z messages.

Długość kontekstu nie jest limitem wyjścia.

Plik tekstowy może dostarczyć dosłowny tekst; wejścia obrazowe/dźwiękowe/obiekty plików wymagają dokładnego powiązania.

### Cennik

Informacje taryfowe nie dodają opcji żądania. Obsługiwane parametry podano przy wybranej metodzie.

Tryb szybki

Nie określono Gdy wybrany jest tryb szybki

Tryb flex

Nie określono Gdy wybrany jest tryb flex

Maksymalna intensywność rozumowania

Nie określono Gdy dla maksymalnej intensywności rozumowania stosowana jest domyślna korekta (default)

Wycena jawnej pamięci podręcznej

Niewłączone Gdy zażądano jawnej pamięci podręcznej

#### Stawki Ailoot

#### Ceny według konfiguracji

| Konfiguracja | Tabela stawek | Opłata |
| --- | --- | --- |
| KonfiguracjaPodstawowe stawki za tokeny | Tabela stawekStawka podstawowa | Opłata Wejście · Tokeny wejściowe **$0.003** / 1K tokenów Wyjście · Tokeny wyjściowe **$0.015** / 1K tokenów Wejście · Odczyt cache **$0.0003** / 1K tokenów Wejście · Zapis do cache **—** / 1K tokenów Wejście · Zapis do cache, 1 godz. **—** / 1K tokenów |

Ailoot rezerwuje szacowaną kwotę przed żądaniem. Po otrzymaniu wyniku rozlicza ostateczną opłatę według zmierzonego użycia. Rozliczenie strumieniowania korzysta z końcowego rekordu użycia. [Jak działają rezerwacja i rozliczenie →](https://ailoot.ai/docs/pl/billing/reserve/)

### Przykładowe żądania

#### Ailoot Ultra · OpenAI Chat

curlPython SDKStrumień w Pythonie

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "google/gemini-3.7-flash", "messages": [{"role": "user", "content": "Explain the difference between an observation and a hypothesis in three sentences."}]}')

Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
r=json.loads(Path("result.json").read_text())
for x in r.get("choices",[]):
    if x.get("message",{}).get("content"): print(x["message"]["content"])
PY_RESULT
```

```python
from openai import OpenAI
import os

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
result=client.chat.completions.create(model='google/gemini-3.7-flash',messages=[{"role":"user","content":"Explain observations and hypotheses in three sentences."}])
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(result.to_dict(mode="json"))
```

```python
from openai import OpenAI
import os
from pathlib import Path

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

with client.chat.completions.stream(model='google/gemini-3.7-flash',messages=[{"role":"user","content":"Explain observations and hypotheses in three sentences."}]) as stream:
    with Path("stream-events.jsonl").open("w",encoding="utf-8") as log:
        for event in stream:
            payload=event.to_dict(mode="json")
            log.write(json.dumps(payload,ensure_ascii=False)+"\n"); log.flush()
            print(json.dumps(payload,ensure_ascii=False))
    final=stream.get_final_completion()
    save_result(final.to_dict(mode="json"),"stream-result")
```

### Odbieranie i zapisywanie wyników

#### Ailoot Ultra · OpenAI Chat

json lub SSE

##### Zachowaj wszystkie ukończone wyniki

Zachowaj każdą kompletną zwróconą odpowiedź, plik i część treści.

Zachowaj każdy wariant i jego treść/wywołania narzędzi/rozumowanie. W SSE składaj przyrosty według indeksu wariantu/narzędzia, zachowując końcowy powód zakończenia i dane użycia.

##### Jeśli trzeba sprawdzić pierwotną odpowiedź

Zachowaj ID i nagłówki żądań/odpowiedzi. Nie udostępniono ogólnego URL pobierania zadania tekstowego.

Pola odpowiedzi

| Pole | Typ |
| --- | --- |
| Pole`choices[].index` | Typinteger |
| Pole`choices[].message.content` | Typstring\|null |
| Pole`choices[].message.tool_calls` | Typtool\_call\[\] |
| Pole`choices[].message.reasoning_content` | Typstring |
| Pole`choices[].message.reasoning_details` | Typobject\|array |
| Pole`choices[].finish_reason` | Typstring\|null |
| Pole`usage` | Typobject |

Błędy i dalsze kroki

| Odpowiedź | Warunek | Następny krok |
| --- | --- | --- |
| Odpowiedź400 · `invalid_request_error` | WarunekNieprawidłowe wymagane pola, sposób reprezentacji materiału lub wartość parametru | Następny krokPopraw wskazane pola przed nowym żądaniem utworzenia. |

### Aliasy

#### Aliasy modelu

<strong>Ailoot</strong> [`gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Core&caller=gemini-3.7-flash)
**Ailoot Ultra** [`gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Ultra&caller=gemini-3.7-flash&fmt=chat), [`google/gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Ultra&caller=google%2Fgemini-3.7-flash&fmt=chat)

#### Aliasy ścieżek metod

`/chat/completions`

#### Powiązane ID modeli

[`google/gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Ultra&caller=google%2Fgemini-3.7-flash&fmt=chat), [`gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Core&caller=gemini-3.7-flash), [`gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Ultra&caller=gemini-3.7-flash&fmt=chat)

**Ailoot Ultra · Anthropic Messages** `POST /v1/messages` `google/gemini-3.7-flash`

[`google/gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Ultra&caller=google%2Fgemini-3.7-flash&fmt=messages)

Google /`google/gemini-3.7-flash`

ID modelu

- `gemini-3.7-flash`
- `google/gemini-3.7-flash`

### Start

Gemini 3.7 Flash łączy rozumowanie multimodalne z programowaniem i wieloetapową pracą agentów. Profil Google 3.7 kładzie nacisk na wierność makietom projektowym i agentowe rozumienie wideo, z rozumowaniem low, medium i high. Przyjmuje tekst i media, zwraca tekst i ma udokumentowane limity wejścia/wyjścia 1,048,576/65,536 tokenów.

Akceptowane dane wejściowe

Tekst

Wyniki

json · sse

### Dostępne w Ailoot · dane wejściowe i metody

**Ailoot Ultra · Anthropic Messages** `POST /v1/messages`

Wejście

`text`

Wyjście

`json`, `sse`

Format wyjściowy

JSON lub SSE

| Pole | Typ | Wymaganie | Wartości i limity | Domyślnie |
| --- | --- | --- | --- | --- |
| Pole`model` | Typ`string` | WymaganieWymagane | Wartości i limity google/gemini-3.7-flash | Domyślnie— |
| Pole`messages` | Typ`message[]` | WymaganieWymagane | Wartości i limity | Domyślnie— |
| Pole`messages[].role` | Typ`string` | WymaganieWymagane | Wartości i limity user, assistant | Domyślnie— |
| Pole`messages[].content` | Typ`string` | WymaganieWymagane | Wartości i limity | Domyślnie— |
| Pole`max_tokens` | Typ`integer` | WymaganieWymagane | Wartości i limity | Domyślnie— |
| Pole`stream` | Typ`boolean` | WymaganieOpcjonalne | Wartości i limity | Domyślniefalse |

Kombinacje materiałów wejściowych

**Tekst** · tekst UTF-8

`ciąg messages[].content`

Parametry i cykl życia metody

| Parametr | Kontrakt |
| --- | --- |
| Parametr`content_type` | Kontraktapplication/json |
| Parametr`required` | Kontraktmodel, messages, max\_tokens |
| Parametr`optional_controls` | Kontraktstream |
| Parametr`material_types` | Kontrakttext |
| Parametr`text_file_material` | KontraktOdczytaj rzeczywisty dokument UTF-8 i umieść jego tekst we wskazanym polu input lub w ciągu treści wiadomości. |

Cykl życia: `synchronous_or_streamed`

### Cennik

Informacje taryfowe nie dodają opcji żądania. Obsługiwane parametry podano przy wybranej metodzie.

Tryb szybki

Nie określono Gdy wybrany jest tryb szybki

Tryb flex

Nie określono Gdy wybrany jest tryb flex

Maksymalna intensywność rozumowania

Nie określono Gdy dla maksymalnej intensywności rozumowania stosowana jest domyślna korekta (default)

Wycena jawnej pamięci podręcznej

Niewłączone Gdy zażądano jawnej pamięci podręcznej

#### Stawki Ailoot

#### Ceny według konfiguracji

| Konfiguracja | Tabela stawek | Opłata |
| --- | --- | --- |
| KonfiguracjaPodstawowe stawki za tokeny | Tabela stawekStawka podstawowa | Opłata Wejście · Tokeny wejściowe **$0.003** / 1K tokenów Wyjście · Tokeny wyjściowe **$0.015** / 1K tokenów Wejście · Odczyt cache **$0.0003** / 1K tokenów Wejście · Zapis do cache **—** / 1K tokenów Wejście · Zapis do cache, 1 godz. **—** / 1K tokenów |

Ailoot rezerwuje szacowaną kwotę przed żądaniem. Po otrzymaniu wyniku rozlicza ostateczną opłatę według zmierzonego użycia. Rozliczenie strumieniowania korzysta z końcowego rekordu użycia. [Jak działają rezerwacja i rozliczenie →](https://ailoot.ai/docs/pl/billing/reserve/)

### Przykładowe żądania

#### Ailoot Ultra · Anthropic Messages

Kompletna minimalna treść żądania JSONcurl · użyj swojego dokumentu UTF-8Python · zapisz kompletny wynik

```json
{
  "model": "google/gemini-3.7-flash",
  "max_tokens": 128,
  "messages": [
    {
      "role": "user",
      "content": "Summarize the incident report."
    }
  ],
  "stream": false
}
```

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 document}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json, os
from pathlib import Path

source_file = Path(os.environ['AILOOT_TEXT_FILE'])
if not source_file.is_file():
    raise SystemExit('Set AILOOT_TEXT_FILE to your actual UTF-8 document')
text = source_file.read_text(encoding='utf-8')
if not text.strip():
    raise SystemExit('Choose a document containing text')
payload = {'model': 'google/gemini-3.7-flash', 'max_tokens': 128, 'messages': [{'role': 'user', 'content': 'Summarize the incident report.'}]}
payload['messages'][0]['content'] = 'Summarize this material and quote supporting source passages.\n\n' + text
Path('request.json').write_text(json.dumps(payload, ensure_ascii=False), encoding='utf-8')
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/messages \
  -H "x-api-key: $AILOOT_API_KEY" -H 'anthropic-version: 2023-06-01' -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path

result = json.loads(Path('result.json').read_text(encoding='utf-8'))
print(json.dumps(result, ensure_ascii=False, indent=2))
PY_RESULT
```

```python
import json, os
from pathlib import Path

source_file = Path(os.environ['AILOOT_TEXT_FILE'])
if not source_file.is_file():
    raise SystemExit('Set AILOOT_TEXT_FILE to your actual UTF-8 document')
text = source_file.read_text(encoding='utf-8')
if not text.strip():
    raise SystemExit('Choose a document containing text')
payload = {'model': 'google/gemini-3.7-flash', 'max_tokens': 128, 'messages': [{'role': 'user', 'content': 'Summarize the incident report.'}]}
payload['messages'][0]['content'] = 'Summarize this material and quote supporting source passages.\n\n' + text
from urllib.request import Request, urlopen
from urllib.error import HTTPError

api_key = os.environ['AILOOT_API_KEY']
if not api_key.strip():
    raise SystemExit('Set AILOOT_API_KEY before making a request')
headers = {'x-api-key': 'PLACEHOLDER_KEY', 'anthropic-version': '2023-06-01', 'Content-Type': 'application/json'}
headers['x-api-key'] = api_key
request = Request('https://api.ailoot.ai/v1/messages', data=json.dumps(payload, ensure_ascii=False).encode('utf-8'), headers=headers, method='POST')
try:
    with urlopen(request, timeout=120) as response:
        raw = response.read()
        Path('response-headers.txt').write_text(str(response.headers), encoding='utf-8')
except HTTPError as error:
    Path('result.json').write_bytes(error.read())
    Path('response-headers.txt').write_text(str(error.headers), encoding='utf-8')
    raise
Path('result.json').write_bytes(raw)
import json
from pathlib import Path

result = json.loads(Path('result.json').read_text(encoding='utf-8'))
print(json.dumps(result, ensure_ascii=False, indent=2))
```

### Odbieranie i zapisywanie wyników

#### Ailoot Ultra · Anthropic Messages

JSON lub SSE

##### Zachowaj wszystkie ukończone wyniki

Zachowaj każdą kompletną zwróconą odpowiedź, plik i część treści.

Zachowaj wszystkie bloki treści, sygnatury myślenia i rzeczywiste ID użycia narzędzi. Złóż wszystkie przyrosty bloków SSE; pierwszy blok tekstowy nie jest pełnym wyjściem.

##### Jeśli trzeba sprawdzić pierwotną odpowiedź

Zachowaj ID i nagłówki żądań/odpowiedzi. Nie udostępniono ogólnego URL pobierania zadania tekstowego.

Pola odpowiedzi

| Pole | Typ |
| --- | --- |
| Pole`id` | Typstring |
| Pole`model` | Typstring |
| Pole`content[]` | Typtext\|thinking\|tool\_use\|other content block |
| Pole`stop_reason` | Typstring\|null |
| Pole`usage` | Typobject |

Błędy i dalsze kroki

| Odpowiedź | Warunek | Następny krok |
| --- | --- | --- |
| Odpowiedź400 · `invalid_request_error` | WarunekNieprawidłowe wymagane pola, sposób reprezentacji materiału lub wartość parametru | Następny krokPopraw wskazane pola przed nowym żądaniem utworzenia. |

### Aliasy

#### Aliasy modelu

<strong>Ailoot</strong> [`gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Core&caller=gemini-3.7-flash&fmt=messages)
**Ailoot Ultra** [`gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Ultra&caller=gemini-3.7-flash&fmt=messages), [`google/gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Ultra&caller=google%2Fgemini-3.7-flash&fmt=messages)

#### Aliasy ścieżek metod

`/chat/completions`

#### Powiązane ID modeli

[`google/gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Ultra&caller=google%2Fgemini-3.7-flash&fmt=messages), [`gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Core&caller=gemini-3.7-flash&fmt=messages), [`gemini-3.7-flash`](https://ailoot.ai/models/pl/#m=google%2Fgemini-3.7-flash&route=Ultra&caller=gemini-3.7-flash&fmt=messages)

FAQ · Google: Gemini 3.7 Flash

Jakie dane wejściowe i wyniki są dostępne?

`POST /v1/messages` · `gemini-3.7-flash`: `text`, `image` → `text` `POST /v1beta/models/{model}:generateContent` · `gemini-3.7-flash`: `text`, `image` → `text` `POST /v1/chat/completions` · `gemini-3.7-flash`: `text` → `text` `POST /v1/messages` · `gemini-3.7-flash`: `text` → `json`, `sse` `POST /v1/chat/completions` · `google/gemini-3.7-flash`: `text` → `text` `POST /v1/messages` · `google/gemini-3.7-flash`: `text` → `json`, `sse`

Jakich pól używa żądanie?

`POST /v1/messages` · `gemini-3.7-flash`: `model`, `messages`, `system`, `max_tokens`, `stream`, `metadata` `POST /v1beta/models/{model}:generateContent` · `gemini-3.7-flash`: `contents`, `systemInstruction`, `sessionId` `POST /v1/chat/completions` · `gemini-3.7-flash`: `model`, `messages`, `stream` `POST /v1/messages` · `gemini-3.7-flash`: `model`, `messages`, `max_tokens`, `stream` `POST /v1/chat/completions` · `google/gemini-3.7-flash`: `model`, `messages`, `stream`, `modalities`, `provider` `POST /v1/messages` · `google/gemini-3.7-flash`: `model`, `messages`, `max_tokens`, `stream`

Jakie limity obowiązują?

`POST /v1/messages` · `gemini-3.7-flash`: `ctx`: `1048576`; `max_out`: `65536`; `messages.min_items`: `1`; `max_tokens.minimum`: `1` `POST /v1beta/models/{model}:generateContent` · `gemini-3.7-flash`: `contents.min_items`: `1` `POST /v1/chat/completions` · `gemini-3.7-flash`: `messages.min_items`: `1` `POST /v1/chat/completions` · `google/gemini-3.7-flash`: `messages.min_items`: `1`

Połącz Ailoot z Claude Code, OpenCode, Hermes albo własną aplikacją.

## Firma i jej portfel projektów

Firma i jej portfel projektów: miliony klientów; miesięczna sprzedaż liczona w miliardach.

## Kupuj tokeny z rabatem.

Rabat subskrypcji do regularnej pracy. Kody promocyjne — do 50% na tokeny.

Subskrypcja

Wybierz plan z rabatem do regularnych żądań.

Kod promocyjny do 50%

Wpisz kod przy zakupie. Cena zostanie przeliczona według aktualnej promocji.

Koszty w historii

Model, tokeny i kwota są zapisywane dla każdego żądania.

[Wybierz subskrypcję](https://ailoot.ai/docs/pl/billing/subscriptions/) · [Sprawdź ceny modeli](https://ailoot.ai/models/pl/)

## Połącz API z produktem, który sprzedajesz.

SaaS, aplikacje i boty na warunkach oferty i umowy licencyjnej Ailoot. Do odsprzedaży poproś o licencję resellerską.

Aplikacja komercyjna

Wbuduj generowanie tekstu, obrazów, wideo i dźwięku w płatne funkcje usługi.

Licencja resellerska

Prześlij opis projektu i schemat dostępu. Poproś o pisemne warunki używania i odsprzedaży.

Dokumenty na stronie

Oferta, umowa licencyjna i polityka przetwarzania danych są dostępne przed połączeniem.

[Poproś o licencję resellerską](mailto:support@ailoot.ai) · [Oferta i umowa licencyjna](https://ailoot.ai/legal/offer?lang=pl)

## Ailoot · Firma i jej portfel projektów





Ailoot opiera się na zgromadzonym doświadczeniu operacyjnym, szerokiej bazie klientów, stabilnej usłudze i stałej kontroli KPI.





Firma i jej portfel projektów: miliony klientów; miesięczna sprzedaż liczona w miliardach.





Ailoot wykorzystuje to doświadczenie operacyjne, zapewniając dostęp przez API do funkcji AI w produktach klientów, agentach, aplikacjach i automatyzacjach.
