Google (Gemini)
Google's Gemini models — native multimodal understanding, long context, thinking, image/video generation, TTS/STT, and embeddings.
Overview
Google AI provides the Gemini family of natively multimodal models, with long context, built-in reasoning, and a broad range of generation and understanding capabilities.
Official Website: https://ai.google.dev API Documentation: https://ai.google.dev/gemini-api/docs
Key features
- Native multimodal — built-in vision, video, and audio understanding
- Long context — very large context windows
- Thinking — extended reasoning for complex problems
- Image & video generation — text-to-image and text-to-video models
- Audio — text-to-speech and speech-to-text
- Embeddings — text embeddings for semantic search
- Context caching — cache reused content to cut cost and latency
- Realtime — low-latency bidirectional streaming (Gemini Live)
Using Google with Yunxin
Address Gemini models by prefixing the model id with the google slug — google/<model> (for example google/gemini-...). You always call the same Yunxin base URL, https://api.yuhuanstudio.com/v1, with your sk- API key; Yunxin routes the request to Google's Gemini API.
Usage example
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["YUNXIN_API_KEY"],
base_url="https://api.yuhuanstudio.com/v1",
)
response = client.chat.completions.create(
model="google/gemini-model-id",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"},
],
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.YUNXIN_API_KEY,
baseURL: "https://api.yuhuanstudio.com/v1",
});
const response = await client.chat.completions.create({
model: "google/gemini-model-id",
messages: [
{ role: "system", content: "You are a helpful assistant." },
{ role: "user", content: "Hello!" },
],
});
console.log(response.choices[0].message.content);curl https://api.yuhuanstudio.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $YUNXIN_API_KEY" \
-d '{
"model": "google/gemini-model-id",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
]
}'Available models
List the models currently available for this provider:
curl "https://api.yuhuanstudio.com/v1/models?provider=google" \
-H "Authorization: Bearer $YUNXIN_API_KEY"Capabilities and pricing are per-model. Use the Models API to discover which Gemini models are available and what each one supports.
Official resources
How is this guide?