Gemini Embedding 2 API — 实时定价、参数规格与 SDK 接入指南

Technical Summary & Live Pricing

通过 API Store Hub 调用 Gemini Embedding 2 API(req/gemini-embedding-2),低至 150 ST/次 · 8K context,支持 /v1/chat/completions(OpenAI Compatible & Gemini /v1beta)。透明 ST 预付计费,提供 cURL、Python、TypeScript 完整示例。

Model Name
Gemini Embedding 2
Primary Model ID
req/gemini-embedding-2
Model Family
Google Gemini
Starting Price
150 ST/次 (1 VND = 1 ST)
Context Window
8K tokens
Max Output
3K tokens
Protocol & Endpoint
/v1/chat/completions — OpenAI Compatible & Gemini /v1beta
Compatible Apps & SDKs
Google GenAI SDK (/v1beta), OpenAI SDK (/v1), Cursor, Cline, Open WebUI, Dify

Active Lanes & Variants

Gemini Embedding 2
Model IDLaneBilling UnitPrice (ST / VND)Min/RequestContext WindowMax OutputFeatures
req/gemini-embedding-2Fixed Request (req/)Per request150 ST/req-8K3KEmbeddings, OpenAI API

Practical Cost Estimator (ST / VND)

VolumeEstimated Cost (ST)VND Equivalent
10 requests1,500 ST1,500 VNĐ
100 requests15,000 ST15,000 VNĐ
1,000 requests150,000 ST150,000 VNĐ
10,000 requests1,500,000 ST1,500,000 VNĐ

Integration Snippets: cURL, Python, TypeScript & Anthropic / Claude Code

cURL

curl https://apistorehub.com/v1/chat/completions \
  -H "Authorization: Bearer sk-ash-your_key" \
  -H "Content-Type: application/json" \
  -d '{"model":"req/gemini-embedding-2","messages":[{"role":"user","content":"Hello"}]}'

Python SDK

import os
from openai import OpenAI

client = OpenAI(base_url="https://apistorehub.com/v1", api_key=os.environ["API_KEY"])
resp = client.chat.completions.create(
    model="req/gemini-embedding-2",
    messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)

TypeScript SDK

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://apistorehub.com/v1", apiKey: process.env.API_KEY });
const res = await client.chat.completions.create({
  model: "req/gemini-embedding-2",
  messages: [{ role: "user", content: "Hello" }],
});
console.log(res.choices[0].message.content);

Anthropic / Claude Code & CLI

export OPENAI_BASE_URL="https://apistorehub.com/v1"
export OPENAI_API_KEY="sk-ash-your_key"
export ANTHROPIC_BASE_URL="https://apistorehub.com"
export ANTHROPIC_AUTH_TOKEN="sk-ash-your_key"
export MODEL_ID="req/gemini-embedding-2"

Model FAQ

How much does Gemini Embedding 2 API cost on API Store Hub?
Gemini Embedding 2 is live across 1 lane variant(s) starting from 150 ST/次 (1 VND = 1 ST), settled accurately to actual usage.
What context window and protocol does Gemini Embedding 2 support?
Gemini Embedding 2 (Google Gemini) provides 8K context over /v1/chat/completions (OpenAI Compatible & Gemini /v1beta) and works with Google GenAI SDK (/v1beta), OpenAI SDK (/v1), Cursor, Cline, Open WebUI, Dify.
How do I integrate Gemini Embedding 2 with Python, TypeScript, or Claude Code?
Set base_url to https://apistorehub.com/v1 (OpenAI SDK) or https://apistorehub.com (Anthropic SDK / Claude Code), pass model="req/gemini-embedding-2", and authenticate with a sk-ash- key.
Does Gemini Embedding 2 share one ST credit balance with other AI models?
Yes. Every model on API Store Hub shares one prepaid ST credit balance and a single API key.