Gemini iconChat APIActive

gemini API

Access Google Gemini through API in One's OpenAI-compatible chat API. Advanced text generation, reasoning, and conversation capabilities. 5 credits are pre-deducted, then adjusted by token usage.

Live capabilities

These capabilities come from the current model config and backend route. Unreleased APIs are not listed.

OpenAI

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

One of the cheapest LLM APIs available

One of the cheapest LLM APIs available

128K token context window for long documents

128K token context window for long documents

No Google Cloud or Vertex AI setup required

No Google Cloud or Vertex AI setup required

Request format

Clients call same-origin API routes; the server BFF forwards to the matching Worker.

Parameters

messagesarray

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

Required
streamboolean

Enable SSE streaming responses

Optional · Default true
include_thoughtsboolean

Include model reasoning/thinking steps

Optional · Default true
reasoning_effortstring

Reasoning depth: "low" or "high"

Optional · Default high
toolsarray

Tool definitions for function calling (OpenAI-compatible format)

Optional
response_formatobject

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

Optional

Example request

{
  "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
  }
}

Pricing

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

Base cost$0.05
Credits5
BillingSuccessful requests

Use cases

These workflows are supported by the current model and backend node.

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

FAQ

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.