# Gemini 3.5 Flash-Lite > The cheapest Gemini text tier — built for high-volume agentic tasks, translation and simple data processing over an OpenAI-compatible endpoint. ## Overview - **Endpoint**: `https://queue.modelrunner.run/google/gemini-3.5-flash-lite` - **Model ID**: `google/gemini-3.5-flash-lite` - **Category**: text-to-text - **Kind**: inference - **Tags**: gemini, gemini-3.5, flash-lite, lite, cheap, llm, text-to-text, chat, chat-completions, openai-compatible, high-volume, translation, streaming, tool-calling, json-mode ## Pricing - **Input tokens**: $0.42 per 1M - **Cached input tokens**: $0.042 per 1M - **Output tokens**: $3.5 per 1M ## Request Lifecycle This model runs on the ModelRunner **asynchronous queue API** — a single POST does not return the output. Every call requires an `Authorization: Key $MODEL_RUNNER_KEY` header. Run three steps: 1. **Submit** — `POST https://queue.modelrunner.run/google/gemini-3.5-flash-lite` with a JSON body holding the input fields at the top level. The body may also include a reserved top-level `metadata` object — a flat string map (max 16 keys, key ≤64 / value ≤512 chars) stored on the request for your own tagging. It is never sent to the model; filter your request history with `GET https://queue.modelrunner.run/requests?metadata=` (exact key=value matches, AND-ed). The response carries request handles only (no output yet): ```json { "status": "IN_QUEUE", "request_id": "<21-char id>", "status_url": "https://queue.modelrunner.run/google/gemini-3.5-flash-lite/requests//status", "response_url": "https://queue.modelrunner.run/google/gemini-3.5-flash-lite/requests/", "cancel_url": "https://queue.modelrunner.run/google/gemini-3.5-flash-lite/requests//cancel" } ``` 2. **Poll status** — `GET ` until `status` is `COMPLETED`. Possible values are `IN_QUEUE`, `IN_PROGRESS`, `COMPLETED`, `FAILED`, `CANCELLED`. A `FAILED` request responds with HTTP 400 and an `error` field. 3. **Read result** — `GET `. Returns the finished request, including the generated `output`: ```json { "id": "", "status": "COMPLETED", "output": ..., "input": ... } ``` The JavaScript and Python SDKs below perform steps 2–3 for you. In any language without an SDK (Swift, Go, Kotlin, etc.) you must implement the polling loop and the final result fetch yourself — see the cURL example for the full flow. ### Input Schema - **`seed`** (`integer`, _optional_): Best-effort determinism hint. - **`stop`** (`unknown`, _optional_): Up to 4 stop sequences. - **`tools`** (`array`, _optional_): OpenAI-format tool definitions the model may call. - **`stream`** (`boolean`, _optional_): Return the reply as a Server-Sent Events stream of deltas terminated by \`data: \[DONE\]\`. - Default: `false` - **`messages`** (`array`, _required_): OpenAI-style conversation history. Each item is an object with a \`role\` (\`system\`, \`user\`, \`assistant\` or \`tool\`) and \`content\`. - **`max_tokens`** (`integer`, _optional_): Upper bound on generated tokens. - Range: `1` to `"+inf"` - **`tool_choice`** (`unknown`, _optional_): \`auto\`, \`none\`, \`required\`, or a specific tool. - **`response_format`** (`object`, _optional_): Set \`{"type":"json_object"}\` for JSON mode. ### Output Schema - **`id`** (`string`, _optional_): - **`model`** (`string`, _optional_): - **`usage`** (`object`, _optional_): - **`object`** (`string`, _optional_): - **`choices`** (`array`, _optional_): - **`created`** (`integer`, _optional_): ## Default Example **Input** ```json { "messages": [ { "role": "user", "content": "Extract the order details as JSON with keys order_id, customer, items (array of {name, qty, unit_price}), and total. Text: Order #A-8842 for Dana Whitfield: 3x cold brew concentrate at 12.50 each, 1x ceramic pour-over at 34.00, 2x filter pack at 6.25. Charged 105.00 to card ending 4417." } ], "max_tokens": 4000, "response_format": { "type": "json_object" } } ``` **Output** ```json { "id": "chatcmpl-XkCdwQ8ugclHEbMDP1IeO", "model": "google/gemini-3.5-flash-lite", "usage": { "total_tokens": 263, "prompt_tokens": 104, "completion_tokens": 159 }, "object": "chat.completion", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "{\n \"order_id\": \"A-8842\",\n \"customer\": \"Dana Whitfield\",\n \"items\": [\n {\n \"name\": \"cold brew concentrate\",\n \"qty\": 3,\n \"unit_price\": 12.50\n },\n {\n \"name\": \"ceramic pour-over\",\n \"qty\": 1,\n \"unit_price\": 34.00\n },\n {\n \"name\": \"filter pack\",\n \"qty\": 2,\n \"unit_price\": 6.25\n }\n ],\n \"total\": 105.00\n}", "extra_content": { "upstream": { "thought_signature": "AY89a18wtCEGBK9tzZCg7f/J8jeWLtHKKVaRvcsYI/IYOBZdmVVkBtH+LWxLB7F3Ub+ueQR7YqeO3OD7OrkjTARAB3AK5I5VKraNZhOBDOt/CdE=" } } }, "logprobs": null, "finish_reason": "stop" } ], "created": 1786739883 } ``` ## Usage Examples ### cURL The queue API is asynchronous: submit the request, poll `status_url` until it is `COMPLETED`, then read the result from `response_url`. Requires `jq`. ```bash # 1. Submit the request (returns request handles, not the output) SUBMIT=$(curl --silent --request POST \ --url https://queue.modelrunner.run/google/gemini-3.5-flash-lite \ --header "Authorization: Key $MODEL_RUNNER_KEY" \ --header "Content-Type: application/json" \ --data '{ "messages": [ { "role": "user", "content": "Extract the order details as JSON with keys order_id, customer, items (array of {name, qty, unit_price}), and total. Text: Order #A-8842 for Dana Whitfield: 3x cold brew concentrate at 12.50 each, 1x ceramic pour-over at 34.00, 2x filter pack at 6.25. Charged 105.00 to card ending 4417." } ], "max_tokens": 4000, "response_format": { "type": "json_object" } }') STATUS_URL=$(echo "$SUBMIT" | jq -r '.status_url') RESPONSE_URL=$(echo "$SUBMIT" | jq -r '.response_url') # 2. Poll until the request leaves the queue / in-progress state while true; do STATUS=$(curl --silent --url "$STATUS_URL" \ --header "Authorization: Key $MODEL_RUNNER_KEY" | jq -r '.status') echo "Status: $STATUS" case "$STATUS" in COMPLETED) break ;; FAILED|CANCELLED) echo "Request $STATUS"; exit 1 ;; esac sleep 1 done # 3. Read the finished request, including the generated output curl --silent --url "$RESPONSE_URL" \ --header "Authorization: Key $MODEL_RUNNER_KEY" ``` ### JavaScript ```javascript import { modelrunner } from "@modelrunner/client"; const result = await modelrunner.subscribe("google/gemini-3.5-flash-lite", { input: { "messages": [ { "role": "user", "content": "Extract the order details as JSON with keys order_id, customer, items (array of {name, qty, unit_price}), and total. Text: Order #A-8842 for Dana Whitfield: 3x cold brew concentrate at 12.50 each, 1x ceramic pour-over at 34.00, 2x filter pack at 6.25. Charged 105.00 to card ending 4417." } ], "max_tokens": 4000, "response_format": { "type": "json_object" } } }); console.log(result.data); ``` ### Python ```python import asyncio import modelrunner_ai async def main(): response = await modelrunner_ai.submit_async( "google/gemini-3.5-flash-lite", arguments={ "messages": [ { "role": "user", "content": "Extract the order details as JSON with keys order_id, customer, items (array of {name, qty, unit_price}), and total. Text: Order #A-8842 for Dana Whitfield: 3x cold brew concentrate at 12.50 each, 1x ceramic pour-over at 34.00, 2x filter pack at 6.25. Charged 105.00 to card ending 4417." } ], "max_tokens": 4000, "response_format": { "type": "json_object" } } ) result = await response.get() print(result["output"]) asyncio.run(main()) ``` ## Additional Resources - [Playground](https://modelrunner.ai/models/google/gemini-3.5-flash-lite) - [OpenAPI Schema](https://modelrunner.ai/models/google/gemini-3.5-flash-lite/openapi.json) - [LLM Instructions](https://modelrunner.ai/models/google/gemini-3.5-flash-lite/llms.txt)