gemini-3.5-flash

Gemini · 对话 · 上下文 1M
按 token 计费

接入信息

模型名gemini-3.5-flash
Gemini 原生https://api.kingyunai.xyz/v1beta/models · generateContent

价格

计费项单价
输入¥9.9225
输出¥59.53

单位:元 / 百万 tokens。 实际扣费以控制台用量为准。

调用示例

curl

curl https://api.kingyunai.xyz/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gemini-3.5-flash","messages":[{"role":"user","content":"你好"}],"stream":true}'

Python(OpenAI SDK)

from openai import OpenAI
client = OpenAI(base_url="https://api.kingyunai.xyz/v1", api_key="sk-你的密钥")

resp = client.chat.completions.create(
    model="gemini-3.5-flash",
    messages=[{"role": "user", "content": "你好"}],
    stream=True,
)
for chunk in resp:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")

Gemini 原生格式

curl "https://api.kingyunai.xyz/v1beta/models/gemini-3.5-flash:generateContent" \
  -H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" \
  -d '{"contents":[{"parts":[{"text":"你好"}]}]}'

说明

← 返回模型索引