EN ▾
Get API key

Gemini Live API Documentation Alternative for Text

If you searched for Gemini Live API documentation, you want Google's pages for real-time audio and video sessions. This site documents something narrower: a text-only chat completions API with streaming, tool calling and JSON mode.

Updated:

Stacked glass panels linked by light beams, representing sections of an API reference

Key points

  1. This API is text only. There is no live audio or video session, no image generation and no embeddings.
  2. Two endpoints exist: POST /v1/chat/completions and GET /v1/models, authenticated with a Bearer key.
  3. Streaming, tool calling and JSON mode follow the OpenAI format, and sampling parameters are passed through.
  4. Limits: 8 concurrent and 300 per minute on a full key, 2 and 60 on a trial key.

First, which API are you looking for

The name in your search is Google's. Their live API is built for low-latency, real-time sessions, and its reference belongs on Google's own developer pages, which are the only reliable source for its message formats and limits. Nothing on this site replaces them, and this service is not Gemini and not affiliated with Google.

What follows is the reference for a different product: a hosted, OpenAI-compatible text API with one open-weight model, run by an independent provider and tuned to answer without content refusals for lawful adult use. If you were using a Gemini model for chat, story generation or agents, and you only ever sent and received text, this is a possible substitute. If you need speech in and out, camera input or a persistent bidirectional socket, it is not.

NeedThis API
Text in, text outYes
Streaming of textYes, server-sent events
Tool calling and JSON modeYes
Live audio or video sessionsNo
Image, audio or video generationNo
Embeddings or fine-tuningNo

Endpoints and authentication

The base URL is https://api.uncensoredgemini.top/v1. Two methods are available.

  • POST /v1/chat/completions generates a reply from a list of messages.
  • GET /v1/models lists the model IDs your key can use. The only chat model is uncensored.

Every request carries an Authorization: Bearer YOUR_KEY header. The maximum request body is 8 MB. A minimal call with curl looks like this:

curl https://api.uncensoredgemini.top/v1/chat/completions \
  -H "Authorization: Bearer $UNCENSORED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [
      {"role": "system", "content": "You write short, vivid scenes."},
      {"role": "user", "content": "Describe a market at dawn in three sentences."}
    ],
    "temperature": 0.8
  }'

The reply is the standard chat completions object: a choices list whose first item holds message.content, plus a usage block with prompt and completion token counts. Keys come from the API key page.

Message format

The messages array holds objects with a role and content. Supported roles are system, user, assistant and tool. Send the system message first. The model is stateless: it sees only what is in the request, so any conversation memory has to be included by your code in each call.

Content is plain text. There are no image parts, audio parts or file attachments, and sending them will not work. If you are porting a Gemini integration, flatten any multi-part content to strings before the call. Keep an eye on length: the 100,000-token window covers everything you send plus everything generated, so a 90,000-token prompt leaves room for a completion of at most about 10,000 tokens.

A rough estimate for English is that one token is about four characters, or three quarters of a word. Count real tokens from the usage block rather than guessing when cost matters.

Parameters that are passed through

Beyond model and messages, these parameters are supported: temperature, top_p, stop, seed, the frequency and presence penalties, stream, tools, tool_choice and response_format. max_tokens is optional. If you leave it out, the completion may use whatever is left of the 100,000-token window, which is shared by the prompt and the output.

Two practical points. Set max_tokens anyway when you build user-facing features, so one runaway reply cannot spend more than you planned. And use seed with a low temperature if you want repeatable output for tests, while remembering that exact reproducibility is a best-effort property of sampling, not a promise.

Streaming

Add "stream": true and the response becomes a series of server-sent events, each a JSON chunk with a delta, ending with data: [DONE]. Usage is reported at the end of the stream. With the OpenAI Python SDK you do not parse events yourself:

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.uncensoredgemini.top/v1",
    api_key=os.environ["UNCENSORED_API_KEY"],
)

usage = None
stream = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "List five prompts for a mystery novel."}],
    stream=True,
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)
    if getattr(chunk, "usage", None):
        usage = chunk.usage
print()
print(usage)

A streamed request keeps its concurrency slot until the stream ends. Read every stream to completion or close the connection explicitly, otherwise slots stay busy longer than you expect.

Tool calling

Declare functions in tools, optionally force a choice with tool_choice, and read tool_calls from the assistant message. When streaming, tool calls arrive in pieces that you assemble by index. After running the function, send its result back as a message with role: "tool" and the matching tool_call_id.

import json
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.uncensoredgemini.top/v1",
    api_key=os.environ["UNCENSORED_API_KEY"],
)

tools = [{
    "type": "function",
    "function": {
        "name": "roll_dice",
        "description": "Roll a die with the given number of sides.",
        "parameters": {
            "type": "object",
            "properties": {"sides": {"type": "integer"}},
            "required": ["sides"],
        },
    },
}]

messages = [{"role": "user", "content": "Roll a twenty-sided die for my attack."}]
first = client.chat.completions.create(model="uncensored", messages=messages, tools=tools)
msg = first.choices[0].message
messages.append(msg)

for call in msg.tool_calls or []:
    args = json.loads(call.function.arguments)
    messages.append({"role": "tool", "tool_call_id": call.id, "content": "17"})

second = client.chat.completions.create(model="uncensored", messages=messages, tools=tools)
print(second.choices[0].message.content)

Always parse arguments defensively, since it is a string the model wrote. Validate it against your own schema before acting on it, and never pass it straight to a shell or a database.

Handling errors in code

A small retry wrapper covers almost every transient failure. It waits five seconds on overload, uses growing delays for rate limits, and gives up after a few attempts.

import os
import time
from openai import OpenAI, RateLimitError

client = OpenAI(
    base_url="https://api.uncensoredgemini.top/v1",
    api_key=os.environ["UNCENSORED_API_KEY"],
    max_retries=0,
)

def ask(prompt, attempts=4):
    for i in range(attempts):
        try:
            r = client.chat.completions.create(
                model="uncensored",
                messages=[{"role": "user", "content": prompt}],
            )
            return r.choices[0].message.content
        except RateLimitError:
            time.sleep(5 * (i + 1))
    raise RuntimeError("still limited after retries")

print(ask("Give me one sentence about lighthouses."))

The wrapper disables the SDK's own retries so that the delays are yours. In a real service you would also log the X-Request-Id header on failures, since it identifies the exact call if you need to ask support about it.

Billing and balance in practice

Billing is per token and settled from prepaid credit, so there is no invoice to reconcile. The usage block gives prompt and completion tokens for each call, and the X-Balance-USD header shows what is left after it. Log both, and you can compute cost per feature, per user or per conversation without any extra tooling.

A quick method for a monthly estimate: take the average input and output tokens per request from your logs, multiply by request volume, and apply the two prices. With 20,000 requests a month at 2,500 input and 500 output tokens, input is 50,000,000 tokens costing 50 × $0.15 = $7.50 and output is 10,000,000 tokens costing 10 × $0.50 = $5.00, so about $12.50 a month. Credit never expires, which means a top-up bought in a quiet month is not wasted.

Porting checklist for an existing integration

  1. Replace the base URL and key, and set the model to uncensored.
  2. Remove any parameter that belongs to a vendor-specific SDK and has no OpenAI equivalent.
  3. Flatten multi-part content to plain strings.
  4. Cap concurrency at 8, or 2 on a trial key, and handle 429 with the delays above.
  5. Re-test prompts, because a different model will phrase and structure its answers differently.

JSON mode

Send "response_format": {"type": "json_object"} and the model is constrained to return a JSON object. Tell it in the prompt which keys you want, and include the word JSON in the instruction. Treat the output as untrusted input: parse it in a try block, check required keys, and retry once on failure.

curl https://api.uncensoredgemini.top/v1/chat/completions \
  -H "Authorization: Bearer $UNCENSORED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "response_format": {"type": "json_object"},
    "messages": [
      {"role": "user", "content": "Return JSON with keys name and motto for a pirate guild."}
    ]
  }'

Limits, errors and response headers

Key typeConcurrent requestsRequests per minute
Full key8300
Trial key260

Exceeding a limit returns HTTP 429. The error code rate_limited means too many requests per minute. The code concurrency means too many at once. A 429 with a Retry-After: 5 header signals temporary overload, so wait five seconds and try again. Use exponential backoff with jitter for anything beyond that.

Every response carries X-Request-Id (quote it when you contact support), X-Balance-USD, X-RateLimit-Limit-Requests and X-RateLimit-Limit-Concurrency. Failed or refused requests are not charged.

The price is $0.15 per 1M input tokens and $0.50 per 1M output tokens from prepaid credit, with no subscription. For example, a request with 8,000 input tokens and 1,000 output tokens costs 8,000 × $0.15 / 1M = $0.0012 plus 1,000 × $0.50 / 1M = $0.0005, so $0.0017. Top-ups run from $20 to $500 in whole amounts, with bonuses of 5%, 10% and 15% from $50, $100 and $200. Payment is crypto only (USDT on TRC20 or USDC on Base). See the pricing page for the full table.

Where to go next

The shortest route into a working integration is the three-line client switch described in the quickstart docs. New accounts can claim $0.50 of trial credit with one click on the key page after sign-up, valid for 7 days with no payment needed. Sign-up works with Google or with email and password. Prompts are not used for training.

Questions and answers

Does this API support live audio or video sessions?

No. It is a text-only chat completions API. For real-time voice or camera sessions you need a provider built for them.

Is this the Gemini API?

No. It is an independent service running one open-weight model, not made by Google, and it does not route to Gemini.

Which models does GET /v1/models return?

The chat model is uncensored. Use that ID in the model field of every chat completions request.

What is the largest request I can send?

The body limit is 8 MB, and the context window is 100,000 tokens shared by the prompt and the completion.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Get API key