Gemini 3.1 Flash Lite Preview
gemini-3.1-flash-lite-previewAvailableGemini 3.1 Flash Lite Preview. Text generation model.
- Context
- 1.05M tokens
- vs. official price
- 10% cheaper
Pricing (USD per 1M tokens)
How prices are calculated| Item | Official | Basic | Premium |
|---|---|---|---|
| Input | $0.25≈ ¥39.7 | $0.225≈ ¥36.0 | $0.20≈ ¥32.0 |
| Output | $1.50≈ ¥238 | $1.35≈ ¥216 | $1.20≈ ¥192 |
| Cache read | $0.025≈ ¥4.0 | $0.0225≈ ¥3.6 | $0.02≈ ¥3.2 |
How to call
POST/v1/chat/completions
import os
from openai import OpenAI
client = OpenAI(
base_url="https://token.echohub.io/v1",
api_key=os.environ["ECHO_API_KEY"],
)
res = client.chat.completions.create(
model="gemini-3.1-flash-lite-preview",
messages=[{"role": "user", "content": "Hello"}],
)
print(res.choices[0].message.content)import os
from anthropic import Anthropic
# The Anthropic SDK adds /v1 at the end automatically
client = Anthropic(
base_url="https://token.echohub.io",
api_key=os.environ["ECHO_API_KEY"],
)
msg = client.messages.create(
model="gemini-3.1-flash-lite-preview",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello"}],
)
print(msg.content[0].text)curl https://token.echohub.io/v1/chat/completions \
-H "Authorization: Bearer $ECHO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.1-flash-lite-preview",
"messages": [{"role": "user", "content": "Hello"}]
}'