Gemini icon对话 API已上线

gemini API

Gemini 已通过 API in One 接入真实生产路由 /api/v1/chat/completions,后端节点为 node62。一个 API Key 即可调用并按成功请求计费。

真实能力

以下能力来自当前已接入的模型配置和后端路由,不展示未上线 API。

稳定生产路由

OpenAI-compatible /chat/completions format — drop-in replacement

统一接口

One of the cheapest LLM APIs available

透明计费

128K token context window for long documents

快速接入

No Google Cloud or Vertex AI setup required

请求方式

浏览器端只调用同源 API,服务端 BFF 再转发到对应 Worker。

参数

messagesarray

Array of message objects with role (user/assistant/system/developer) and content

必填
streamboolean

Enable SSE streaming responses

可选 · 默认 true
include_thoughtsboolean

Include model reasoning/thinking steps

可选 · 默认 true
reasoning_effortstring

Reasoning depth: "low" or "high"

可选 · 默认 high
toolsarray

Tool definitions for function calling (OpenAI-compatible format)

可选
response_formatobject

Force structured output (e.g. {type: "json_object"})

可选

示例请求

{
  "endpoint": "/api/v1/chat/completions",
  "headers": {
    "Authorization": "Bearer <API_KEY>",
    "Content-Type": "application/json"
  },
  "body": {
    "model": "gemini",
    "messages": [
      {
        "role": "user",
        "content": "Explain quantum computing in simple terms."
      }
    ],
    "stream": false,
    "include_thoughts": true
  }
}

价格

~5 credits pre-deduct, pay-per-token

基础价格$0.05
积分5
计费按成功请求

使用场景

这些场景可通过当前模型和对应后端节点实现。

01

Build AI-powered chatbots and customer support agents

02

Generate and summarize text content at scale

03

Create AI coding assistants and code generation tools

04

Power reasoning and analysis features in your application

常见问题

Is the Gemini API compatible with OpenAI's format?

Yes. API in One uses the standard OpenAI chat/completions format. You can switch from OpenAI to Gemini by changing the base URL and model name — no other code changes needed.

How much does the Gemini API cost?

5 credits are pre-deducted per request, then adjusted based on actual token usage (pay-per-token). One of the most affordable LLM APIs. Free credits included on sign up.

Does the Gemini API support streaming?

Yes. Streaming is enabled by default via SSE (Server-Sent Events). Set stream to false for synchronous responses.

What is the maximum context length?

Gemini 3 Flash supports up to 1M tokens of context, suitable for processing long documents and maintaining extended conversations.