https://token.pencilai.top gemini-3-flash-preview-free 安定運用のためにクライアント側でリトライやフォールバックを設定推奨
curl https://token.pencilai.top/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "gemini-3-flash-preview-free",
"messages": [{"role": "user", "content": "Hello!"}],
"stream": true
}' from openai import OpenAI
client = OpenAI(
base_url="https://token.pencilai.top",
api_key="YOUR_API_KEY"
)
response = client.chat.completions.create(
model="gemini-3-flash-preview-free",
messages=[{"role": "user", "content": "Hello!"}],
stream=True
)
for chunk in response:
content = chunk.choices[0].delta.content or ""
print(content, end="", flush=True) import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://token.pencilai.top",
apiKey: "YOUR_API_KEY"
});
const stream = await client.chat.completions.create({
model: "gemini-3-flash-preview-free",
messages: [{ role: "user", content: "Hello!" }],
stream: true,
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content || "");
} {
"apiProvider": "openai",
"openAiBaseUrl": "https://token.pencilai.top",
"openAiApiKey": "YOUR_API_KEY",
"openAiModelId": "gemini-3-flash-preview-free"
}