该模型已从在售目录下线,以下信息为存档内容。 厂商建议迁移到 gemini-embedding-2。
embedding
text-embedding-004 是 Google 上一代文本嵌入模型,发布于 2024 年 4 月 9 日。
- 输入
- 文本 $0.025/M
- 输出
- 文本
规格与限制
模型
| 模态 | 文本 → 文本 |
|---|
- Google's previous-generation text embedding model. Its shutdown date on Google's own deprecation page is 2026-01-14, with gemini-embedding-2 named as the replacement
- that date is in the past as of this transcription, so the model is retired upstream rather than merely scheduled. Dimensionality and input limits are deliberately not recorded here: the model no longer appears in Google's current model reference, so there is no current vendor page to transcribe them from, and the standing rule is that an unverifiable value is left absent rather than carried over from memory
30 秒用上 Text Embedding 004
OpenAI 兼容:换掉 base_url,SDK 不用改。POST /v1/embeddings
from openai import OpenAI
client = OpenAI(
base_url="https://synthorai.io/v1",
api_key="sk-syn-...",
)
resp = client.chat.completions.create(
model="text-embedding-004",
messages=[{"role": "user", "content": "Summarize this diff"}],
)
print(resp.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://synthorai.io/v1",
apiKey: "sk-syn-...",
});
const resp = await client.chat.completions.create({
model: "text-embedding-004",
messages: [{ role: "user", content: "Summarize this diff" }],
});
console.log(resp.choices[0].message.content);curl https://synthorai.io/v1/chat/completions \
-H "Authorization: Bearer sk-syn-..." \
-H "Content-Type: application/json" \
-d '{
"model": "text-embedding-004",
"messages": [{"role": "user", "content": "Hello"}]
}'package main
import (
"context"
"fmt"
"github.com/openai/openai-go/v3"
"github.com/openai/openai-go/v3/option"
)
func main() {
client := openai.NewClient(
option.WithBaseURL("https://synthorai.io/v1"),
option.WithAPIKey("sk-syn-..."),
)
resp, _ := client.Chat.Completions.New(context.TODO(), openai.ChatCompletionNewParams{
Model: "text-embedding-004",
Messages: []openai.ChatCompletionMessageParamUnion{
openai.UserMessage("Summarize this diff"),
},
})
fmt.Println(resp.Choices[0].Message.Content)
}import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.chat.completions.*;
OpenAIClient client = OpenAIOkHttpClient.builder()
.baseUrl("https://synthorai.io/v1")
.apiKey("sk-syn-...")
.build();
ChatCompletion resp = client.chat().completions().create(
ChatCompletionCreateParams.builder()
.model("text-embedding-004")
.addUserMessage("Summarize this diff")
.build());
System.out.println(resp.choices().get(0).message().content().orElse(""));关于 Text Embedding 004
- 它已经不再可用:Google 自己的弃用页给出的停用日期是 2026 年 1 月 14 日,替代模型为 gemini-embedding-2,而该日期已经过去。
- 它也不再出现在 Google 现行的模型参考页中,因此本页不记录它的维度、输入上限与任务类型:没有可查证的现行厂商页面可供转录,而本目录的规则是无法核验的值宁可留空,也不凭记忆补写。
- 如果你是从旧集成来到这里,Google 指定的迁移目标是 gemini-embedding-2。
常见问题
Text Embedding 004 API 可以免费试用吗?
可以。新账号可获得 10 次试用调用和最高 $1 的免费额度,无需绑卡。足够在添加付款方式之前,用真实工作负载试一试 Text Embedding 004。
Text Embedding 004 最擅长什么?
上游已于 2026 年 1 月 14 日停用、Google 指定 gemini-embedding-2 为替代、厂商已不再公布其规格。完整能力请见「关于」部分,内容取自厂商官方发布说明。
Text Embedding 004 的价格是多少?
在 Synthorai 上,Text Embedding 004 输入 $0.025/百万 token、输出 $0/百万 token,即厂商牌价,无平台加价。
Text Embedding 004 支持提示词缓存(prompt caching)吗?
Text Embedding 004 目前在 Synthorai 上没有缓存读取折扣。网关上的其他模型仍支持提示词缓存,可在价格表中查看支持缓存的替代模型。 各厂商缓存对比 →
如何开通 Text Embedding 004?
把现有 OpenAI SDK 的 base_url 指向 "https://synthorai.io/v1",model 设为 "text-embedding-004" 即可。一把 API key 通用网关上的全部模型。
相关模型
对比
本页每个值都转录自厂商自己的文档(链接见上),并带有核对日期。价格在全目录范围内比较;各厂商定义不同的规格值,只说明差异而不作图表对比。此处没有任何由我们测量的数据,也不做评分。