gemini-3.8-flash — 通用主力,响应快gemini-3-flash — 更便宜,适合批量任务gemini-4-carbon / gemini-4-argon / gemini-4-hydrogen — 新一代,按需选择gemini-3-pro-image-preview — 生图完整清单与实时价格以 价格页 为准(公开接口 /api/pricing)。
from openai import OpenAI client = OpenAI( api_key="sk-你的密钥", base_url="https://api.hardysapi.com/v1", ) resp = client.chat.completions.create( model="gemini-3.8-flash", messages=[{"role": "user", "content": "用一句话介绍你自己"}], ) print(resp.choices[0].message.content)
import OpenAI from "openai"; const client = new OpenAI({ apiKey: "sk-你的密钥", baseURL: "https://api.hardysapi.com/v1", }); const res = await client.chat.completions.create({ model: "gemini-3.8-flash", messages: [{ role: "user", content: "hi" }], }); console.log(res.choices[0].message.content);
curl https://api.hardysapi.com/v1/chat/completions \ -H "authorization: Bearer sk-你的密钥" \ -H "content-type: application/json" \ -d '{"model":"gemini-3.8-flash","messages":[{"role":"user","content":"hi"}]}'
Cursor、Cherry Studio、Chatbox、Open WebUI 等凡支持「OpenAI 兼容」的客户端,按下面填即可:
https://api.hardysapi.com/v1sk- 开头的密钥gemini-3.8-flash(部分客户端不会自动拉取列表)更多错误码见 报错排查指南。
/v1beta 原生协议暂未开放。