gemini-3.1-flash-lite

by GoogleText

Gemini 3.1 Flash Lite API by Google on TTAPI supports chat requests. Use this compact Gemini 3.1 Flash Lite model through an OpenAI-compatible chat endpoint.

Last updated:
InputMessagesGemini request formats
Models11listed in current documentation
FlowSync + SSEstream is optional for chat
Price40% offofficial
gemini-3.1-flash-liteExample conversation
You

Review a TypeScript webhook handler for reliability risks and propose the highest-value fixes. Keep the answer practical for a gemini-3.1-flash-lite integration.

gemini-3.1-flash-lite logo
gemini-3.1-flash-lite

Verify signatures against the raw body, reject stale events, deduplicate by event ID, acknowledge quickly, and move slow work to a retried background queue. This example is tailored to the gemini-3.1-flash-lite model page.

Examples

A request and response, in context

01 · Code reviewgemini-3.1-flash-lite
You

Review a TypeScript webhook handler for reliability risks and propose the highest-value fixes. Keep the answer practical for a gemini-3.1-flash-lite integration.

gemini-3.1-flash-lite logo
gemini-3.1-flash-lite

Verify signatures against the raw body, reject stale events, deduplicate by event ID, acknowledge quickly, and move slow work to a retried background queue. This example is tailored to the gemini-3.1-flash-lite model page.

02 · Query designgemini-3.1-flash-lite
You

Explain how to choose indexes for a job table filtered by owner, status, and creation time. Keep the answer practical for a gemini-3.1-flash-lite integration.

gemini-3.1-flash-lite logo
gemini-3.1-flash-lite

Begin from the most common filter order, use a composite index that supports the leading predicates, measure the actual query plan, and retain a simple retention strategy for old rows. This example is tailored to the gemini-3.1-flash-lite model page.

03 · Product briefgemini-3.1-flash-lite
You

Summarize a product brief for a developer API in five concise bullets. Keep the answer practical for a gemini-3.1-flash-lite integration.

gemini-3.1-flash-lite logo
gemini-3.1-flash-lite

Cover the customer problem, primary workflow, integration surface, pricing or quota rule, and the measurable outcome that defines adoption. This example is tailored to the gemini-3.1-flash-lite model page.

Capabilities

What you can build with gemini-3.1-flash-lite

Prompt driven generation

Submit a concise prompt and get production-ready responses output through one TTAPI job.

Core controls only

Keep integration simple with prompt, model, output settings, and callback handling.

Async result flow

Use polling or webhook callbacks so long-running generations do not block your UI.

Ready for product UI

Return Gemini results that can be displayed, stored, or passed into downstream workflows.

Pricing

Token billing rules

One key and one balance across supported text models.

Token billing ruleOfficial pricing
PlatformTTAPI billing
Gemini40% off official pricing
API request

Requests by operation

Switch between operation-specific endpoints and request fields.

Gemini

Gemini Completions

Chat-compatible format. Send messages and model in the body; stream is an optional boolean.

POSThttps://api.ttapi.io/gemini/chat/completions

Headers

TT-API-KEYstringrequired

Your TTAPI API key.

Content-Typestringrequired

Use application/json.

Body

messagesobject[]required

Conversation messages with role and content, as documented by TTAPI.

messages[].rolestringoptional

Role of this conversation message, for example user.

messages[].contentstringoptional

Text content of this conversation message.

modelstringrequired

Supported Gemini model identifier. Use the model ID shown in the request example.

streambooleanoptional

Enable server-sent events for progressive responses. Defaults to false.

Open this TTAPI channel documentation
Integrate

Integrate the selected channel

Choose a channel and operation, then copy the matching endpoint, request body, and code sample.

Gemini

Gemini Completions integration

POST https://api.ttapi.io/gemini/chat/completions

curl --request POST \
  --url https://api.ttapi.io/gemini/chat/completions \
  --header "TT-API-KEY: $TTAPI_KEY" \
  --header 'Content-Type: application/json' \
  --data '{"model":"gemini-3.1-flash-lite","messages":[{"role":"user","content":"Review this migration plan and identify the three highest risks."}],"stream":false}'