Quick Start

Gemini API setup: model IDs, Base URL and protocols

Set up Gemini APIs on AIFast Link with an offline model-ID checker and request template. Verify Base URL, protocols, group access and billing before calling.

Updated 2026-11-02Verified 2026-11-02Estimated reading time: 8 minutesCovers the public Gemini catalog and setup; paid requests have not been verified
Configuration fields were checked against public documentation. Models, prices, and capabilities can change; verify current values in the console and live API responses.
Topic: What Is an OpenAI-Compatible API? Scope and Limits

Get started with Gemini APIs

AIFast Link now lists Gemini alongside GPT and Claude. Create a separate limited Link key, confirm Gemini group access, copy an ID from your account's model list, and send a short text request through the OpenAI-compatible endpoint. Do not use a Google AI Studio key for Link or send your Link key to another provider.

On November 2, 2026, we checked the public catalog and Google's protocol documentation. We did not send authenticated, billable model requests. The commands below are setup examples, not successful request records. Images, audio, tool calls and long context require separate tests for the selected model.

Download templates and check before calling

The separate Link GitHub repository provides Gemini request JSON and an offline model-ID checker. Run it with Node.js 22 or later. It only reads a local model list and does not read keys or use the network. Exact matches, missing IDs and invalid input return exit codes 0, 2 and 1 respectively. The example list is synthetic data, not a response from your account.

Gemini templates and offline checks

For a real investigation, query /v1/models with the same key, host and group. Keep only data[].id in a private JSON file outside the repository and pass it to the checker. A match only proves that the snapshot contains the ID, not current permissions, protocol compatibility or availability. Do not commit keys or raw request logs to GitHub.

OpenAI compatibility lets you reuse the relevant SDK request format. It does not make accounts, keys, billing or every feature interchangeable. Choose a provider, then use that provider's endpoint, credentials and model ID. Changing a model name does not turn a Google account into a Link account.

Connection option SDK Base URL Credential source
Link OpenAI-compatible API https://www.aifast.link/v1 A separate, spending-limited key created in Link
Google's OpenAI-compatible API https://generativelanguage.googleapis.com/v1beta/openai/ Google Gemini API Key

Both options use the Chat Completions request structure, but permissions, billing and supported parameters depend on the provider. Google's endpoint is not a fallback route for Link. Do not send a Link key to Google or a Google key to Link.

This public catalog snapshot, checked on November 2, 2026, contains 13 IDs. These are Link catalog names, not certification of official Google releases, underlying model identity or continued availability. All entries declare the Gemini group and the openai and gemini endpoint types. Check the live catalog for prices and your account's permissions.

Model ID Catalog label
gemini-2.5-flash Listed in catalog
gemini-2.5-flash-lite Listed in catalog
gemini-2.5-pro Listed in catalog
gemini-3-flash-preview Preview ID
gemini-3.1-flash-lite Listed in catalog
gemini-3.1-flash-lite-preview Deprecated; avoid as a default for new projects
gemini-3.1-pro-preview Preview ID
gemini-3.5-flash Listed in catalog
gemini-3.5-flash-lite Listed in catalog
gemini-3.6-flash Listed in catalog
gemini-3.7-flash Listed in catalog
gemini-3.8-flash Listed in catalog
gemini-4-argon Listed in catalog

View current Link models and prices

OpenAI-compatible client configuration

Field Link setting
Base URL https://www.aifast.link/v1
Model list GET /v1/models
Chat endpoint POST /v1/chat/completions
API Key A separate Link key with a usage limit
Model A Gemini ID from your account's model list
Group Check whether the key can access the Gemini group

Set AIFAST_API_KEY securely in your own terminal, then query models visible to your account. The public price catalog and authenticated model list serve different purposes. A public listing does not mean every account or key has access.

curl --fail-with-body --silent --show-error \
  --connect-timeout 10 --max-time 30 \
  https://www.aifast.link/v1/models \
  -H "Authorization: Bearer ${AIFAST_API_KEY:?Set AIFAST_API_KEY locally before running}"

The example below uses the catalog ID gemini-2.5-flash. Confirm that your model list includes it before running, or replace it as needed. This request incurs real API usage. Use a temporary limited key and do not print it in shared terminals or public logs.

curl --fail-with-body --silent --show-error \
  --connect-timeout 10 --max-time 60 \
  https://www.aifast.link/v1/chat/completions \
  -H "Authorization: Bearer ${AIFAST_API_KEY:?Set AIFAST_API_KEY locally before running}" \
  -H "Content-Type: application/json" \
  -d '{"model":"gemini-2.5-flash","messages":[{"role":"user","content":"Reply with OK."}],"stream":false}'

Record the HTTP status, response body, model, usage and Link usage log. The 60-second limit is this example's client timeout, not a service response guarantee. After a timeout, check the final charge before resubmitting. One successful text response does not validate streaming or tool calls.

Native Gemini versus OpenAI-compatible requests

The Link catalog declares the native path POST https://www.aifast.link/v1beta/models/{model}:generateContent. Google's native protocol uses contents and parts; OpenAI-compatible requests use messages. Response structures and streaming events differ, so changing only the URL while retaining the other protocol's body will not work.

Link native authentication, streamGenerateContent, file uploads and Google-specific tools have not been verified. Before using a native client, confirm its version, authentication, final path and required parameters with Link. Google's official API documentation is a protocol reference.

View the API compatibility matrix

Check Gemini billing and plan coverage

Check Gemini models, groups and billing specifically for Link. Review input, output, cache and group pricing in the model directory, then check the final usage for a few real tasks. This page makes no fixed discount, exchange-rate or Gemini plan-price claim and does not extend existing GPT/Claude plan coverage to Gemini.

Public Gemini entries checked on November 2, 2026 use tiered_expr billing expressions. A single ratio is not the final price. The cost calculator estimates text usage with one input and one output rate; reconcile caching, long-context tiers, thinking output and tool charges separately against the bill.

Usage-based funding and monthly plan coverage

Estimate task costs

Common setup problems

Response or symptom Check first Next step
401 / invalid_api_key Check that the key and request domain belong to the same provider and that the running process has loaded the environment variable. Check authentication headers and environment variables
404 or an HTML page Check for a duplicated /v1; check whether the generateContent path was passed to a Chat Completions client. Check the final request URL
model not found Check the same key's /v1/models, exact model ID capitalization and Gemini group permissions. Check model and group access
429 Check whether the response indicates rate limiting or insufficient balance or quota, and whether it includes Retry-After Distinguish rate limits from quota issues
Text works but tools or streaming fail Check the client version, protocol, parameters and stream completion events. One successful text request does not establish compatibility. Verify each API capability

Keep the status code and a redacted response, then handle the specific error. Adding funds cannot fix a mistyped model name or an incorrect path. Timeouts and disconnected streams do not prove that processing or billing stopped; avoid unlimited retries.

If your Chatbox, Cherry Studio or Dify version supports a custom compatible provider, start with its OpenAI-compatible configuration, then test the target model's features. A Gemini listing does not make it a direct replacement for Claude Code Messages or Codex Responses. Validate each tool and protocol separately.

Chatbox and Cherry Studio setup

Dify model setup

Base URL checker

FAQ

Can I access Gemini APIs through AIFast Link?

The Link public catalog checked on November 2, 2026 lists a Gemini group and 13 Gemini model IDs, with declared OpenAI-compatible and Gemini endpoints. Check your current account catalog for IDs, access and pricing; listing does not mean a call has passed acceptance testing.

What Base URL should I use for Gemini?

For an OpenAI-compatible client on Link, use https://www.aifast.link/v1; the final chat path is /v1/chat/completions. Native Gemini generateContent uses a different path and request structure, so a Chat Completions configuration is not a direct substitute.

Does a GPT or Claude plan include Gemini?

Do not assume coverage. The public catalog places Gemini in a separate Gemini group, while existing plans apply to specified groups. Check plan scope, billing priority and wallet fallback before purchasing. A model listing alone does not establish subscription benefits.

Source checked

Reference and Check Sources

Next step

Test the current API before fixing, migrating, or creating a test key

Use a temporary, limited key to inspect model declarations, token fields, SSE, and tool calls. Review current models and pricing only when you need a replacement API.

Model Quality CheckModel PricingCreate Account