向量模型
Voyage 4 Large
voyageai/voyage-4-large
voyageai/voyage-4-large 是 Voyage AI 推出的文本向量模型,可通过 OceanToken API 调用,上下文窗口 32K token。
价格卡、相似模型和常见问题:oceantoken.ai 上的 Voyage 4 Large。
概览
| 模型 ID | voyageai/voyage-4-large |
|---|---|
| 类型 | 向量 |
| 发布方 | Voyage AI |
| 上下文窗口 | 32,000 token |
| 价格 | 在 oceantoken.ai 查看 |
| 端点 | /v1/embeddings |
| API 格式 | 兼容 OpenAI |
| 上架日期 | 2026-07-27 |
API
POST /v1/embeddings。Base URL 为 https://api.oceantoken.ai,用你的 OceanToken API Key 作为 Bearer token。OpenAI SDK 无需改动即可使用;见快速开始。
下载本模型的规格(JSON) · llms.txt(供 AI 助手读取)
基础示例
- curl
- Python
- JavaScript
curl https://api.oceantoken.ai/v1/embeddings \
-H "Authorization: Bearer $OCEANTOKEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "voyageai/voyage-4-large",
"input": "The quick brown fox"
}'
import os
from openai import OpenAI
client = OpenAI(base_url="https://api.oceantoken.ai/v1", api_key=os.environ["OCEANTOKEN_API_KEY"])
result = client.embeddings.create(
model="voyageai/voyage-4-large",
input="The quick brown fox",
)
print(len(result.data[0].embedding))
import OpenAI from 'openai';
const client = new OpenAI({baseURL: 'https://api.oceantoken.ai/v1', apiKey: process.env.OCEANTOKEN_API_KEY});
const result = await client.embeddings.create({
"model": "voyageai/voyage-4-large",
"input": "The quick brown fox"
});
console.log(result.data[0].embedding.length);
请求参数
只列出本模型接受的参数。请求中的其他字段在到达模型之前会被去掉。
| 参数 | 类型 | 说明 |
|---|---|---|
model必填 | string | 本模型的 ID。 |
input必填 | string 或 array | 一个字符串,或在一次请求中生成向量的字符串列表。 |
encoding_format | string float, base64 默认值 "float" | 向量返回的方式。 |
响应
| 字段 | 类型 | 说明 |
|---|---|---|
data[].embedding | array | 向量。 |
usage.prompt_tokens | integer | 输入 token。 |
响应示例
{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [
0.0123,
-0.0456
]
}
],
"usage": {
"prompt_tokens": 5,
"total_tokens": 5
}
}
更多示例,以及错误和计费说明:向量与重排序。
与相似模型比较
OceanToken 上与 voyageai/voyage-4-large 价格相近的向量模型。价格对比见 oceantoken.ai。
| 模型 | 发布方 | 上下文窗口 |
|---|---|---|
Voyage 4 Largevoyageai/voyage-4-large | Voyage AI | 32,000 |
Text Embedding 3 Largeopenai/text-embedding-3-large | OpenAI | 8K |
Mistral Embed 2312mistralai/mistral-embed-2312 | Mistral AI | 8K |
Text Embedding Ada 002openai/text-embedding-ada-002 | OpenAI | 8K |
Voyage AI 的更多模型
- Rerank 2.5
voyageai/rerank-2.5 - Rerank 2.5 Lite
voyageai/rerank-2.5-lite - Voyage 4
voyageai/voyage-4 - Voyage 4 Lite
voyageai/voyage-4-lite - Voyage Code 4
voyageai/voyage-code-4 - Voyage Multimodal 3.5
voyageai/voyage-multimodal-3.5
开始使用
本页信息读取自 OceanToken 线上模型目录,读取时间为文档构建时的 2026-12-02(UTC)。价格公布在 oceantoken.ai。