VGGT-1B
整合
模型 id
vggt-1b
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/vggt-1b?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY"
const API = "https://api.doitong.com/v1";
const headers = {
"Authorization": "Bearer " + process.env.DOITONG_API_KEY,
"Content-Type": "application/json",
};
// Run the model; wait up to 20 s for the finished result in the same call
let res = await fetch(API + "/run/vggt-1b?wait=20", {
method: "POST",
headers,
body: JSON.stringify({}),
});
let request = await res.json();
if (!res.ok) throw new Error(request.error.code + ": " + request.error.message);
// Not finished yet: long-poll until it is
while (request.status === "queued" || request.status === "running") {
res = await fetch(API + "/requests/" + request.id + "?wait=20", { headers });
request = await res.json();
}
if (request.status !== "succeeded") throw new Error(JSON.stringify(request.error));
console.log(request.outputs.map((o) => o.url), request.cost.credits + " API credits ($" + request.cost.usd + ")");
import os
import requests
API = "https://api.doitong.com/v1"
headers = {"Authorization": "Bearer " + os.environ["DOITONG_API_KEY"]}
payload = {}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/vggt-1b", params={"wait": 20}, json=payload, headers=headers)
request = r.json()
if not r.ok:
raise RuntimeError(request["error"]["code"] + ": " + request["error"]["message"])
# Not finished yet: long-poll until it is
while request["status"] in ("queued", "running"):
request = requests.get(API + "/requests/" + request["id"], params={"wait": 20}, headers=headers).json()
if request["status"] != "succeeded":
raise RuntimeError(request["error"])
print([o["url"] for o in request["outputs"]], request["cost"]["credits"], "API credits", "$" + request["cost"]["usd"])
# 1. Connect once (Claude Code; Cursor, VS Code, Claude Desktop: https://doitong.com/zh-TW/developers/docs/mcp)
claude mcp add --transport http doitong-models https://api.doitong.com/v1/mcp \
--header "Authorization: Bearer $DOITONG_API_KEY"
# 2. Your agent calls the "run" tool with:
{
"model_id": "vggt-1b",
"input": {}
}
透過 Doitong API 呼叫 VGGT-1B 模型(vggt-1b)。代理程式文件:https://doitong.com/zh-TW/developers/models/vggt-1b.md
POST https://api.doitong.com/v1/run/vggt-1b?wait=20
Authorization: Bearer $DOITONG_API_KEY
Content-Type: application/json
{}
如果回應狀態為 "queued" 或 "running",請輪詢 GET https://api.doitong.com/v1/requests/REQUEST_ID?wait=20,直到狀態變為 "succeeded";檔案位於 outputs[].url。使用相同主體傳送 POST https://api.doitong.com/v1/quote/vggt-1b,可在執行前取得確切價格。
每次執行最多 $1.755 依實際用量收費,其餘金額會退款 在此頁面執行
您的新 API 金鑰。 僅會在此時顯示,且已填入下方的程式碼與 API 金鑰欄位。請妥善保密:切勿將其放入在瀏覽器中執行的程式碼。
建立請求
控制項是根據模型結構描述生成的。變更設定時,程式碼和價格會同步更新。
POST
/run/vggt-1b?wait=20
報價 → $1.755
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/vggt-1b?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY"
const API = "https://api.doitong.com/v1";
const headers = {
"Authorization": "Bearer " + process.env.DOITONG_API_KEY,
"Content-Type": "application/json",
};
// Run the model; wait up to 20 s for the finished result in the same call
let res = await fetch(API + "/run/vggt-1b?wait=20", {
method: "POST",
headers,
body: JSON.stringify({}),
});
let request = await res.json();
if (!res.ok) throw new Error(request.error.code + ": " + request.error.message);
// Not finished yet: long-poll until it is
while (request.status === "queued" || request.status === "running") {
res = await fetch(API + "/requests/" + request.id + "?wait=20", { headers });
request = await res.json();
}
if (request.status !== "succeeded") throw new Error(JSON.stringify(request.error));
console.log(request.outputs.map((o) => o.url), request.cost.credits + " API credits ($" + request.cost.usd + ")");
import os
import requests
API = "https://api.doitong.com/v1"
headers = {"Authorization": "Bearer " + os.environ["DOITONG_API_KEY"]}
payload = {}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/vggt-1b", params={"wait": 20}, json=payload, headers=headers)
request = r.json()
if not r.ok:
raise RuntimeError(request["error"]["code"] + ": " + request["error"]["message"])
# Not finished yet: long-poll until it is
while request["status"] in ("queued", "running"):
request = requests.get(API + "/requests/" + request["id"], params={"wait": 20}, headers=headers).json()
if request["status"] != "succeeded":
raise RuntimeError(request["error"])
print([o["url"] for o in request["outputs"]], request["cost"]["credits"], "API credits", "$" + request["cost"]["usd"])
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "run",
"arguments": {
"model_id": "vggt-1b",
"input": {},
"wait_seconds": 20
}
}
}
關於 VGGT-1B
從多個視角估算幾何結構。在 `image_urls` 中提供最多 48 張影像,也可選擇加入每隔 `frame_sampling_rate` 幀取樣的 `video_url`。會返回每幀深度圖、相機外部參數和內部參數、原始預測檔案,以及包含相機視錐的 GLB 點雲。`confidence_percentile` 和 `max_points` 可控制點雲的密度。
參數
請傳送標準名稱或原生名稱其中之一,不要同時傳送兩者。 標準名稱
名稱類型
預設值允許值
說明
image_urls選填
images
類型url[] · image
≤ 48 個項目
重建來源圖像;每張都會填充為正方形,並調整大小,使最長邊為 518 像素。接受 JPEG、PNG、WEBP,以及 Pillow 可解碼的其他圖像格式。
video_url選填
video
類型url · video
選用的來源影片,其取樣影格會接續在合併輸入中的 image_urls 之後。取樣會每隔 `frame_sampling_rate` 個影格取一格,並始終包含第一格和最後一格。
frame_sampling_rate選填
類型integer
預設值24
1 – 1,000
僅在透過 `video_url` 提供影片時套用影格間隔;否則不會產生作用。無論間隔為何,都會保留兩個邊界影格,並在其間取樣每第 n 個影格。
alpha_blend_onto選填
類型enum
預設值white
keepwhiteblackmean
Alpha 通道處理提供四種選擇:'keep' 會移除 alpha,但不變更原始像素值;'mean' 會以 ImageNet 平均 RGB 進行合成。若要使用純色背景,請選擇 'white' 或 'black',以對應顏色進行合成。
export_prediction_data選填
類型boolean
預設值true
將原始預測結果匯出為個別影格的 JSON 檔案。每個檔案都包含深度及其信賴度、遮罩,以及編碼後的相機姿態。
export_depth_maps選填
類型boolean
預設值true
將深度點陣圖匯出,使用 `depth_range` 線性對映至像素值 0–65535。每個影格會取得一個獨立的 16 位元灰階 PNG,精度為 16 位元。
export_point_cloud選填
類型boolean
預設值true
以 GLB 格式匯出融合後的彩色點雲,並在場景中以個別圓錐網格表示估算出的相機。
array_encoding選填
類型enum
預設值base64
base64list
預測 JSON 檔案的陣列儲存格式;'list' 所需空間遠大於 'base64'。巢狀 JSON 清單請選擇 'list';包含 {data, shape, dtype} 的物件則選擇 'base64'。
exclude_keys選填
類型enum[]
從每個預測 JSON 檔案中排除的索引鍵。
confidence_percentile選填
類型number
預設值50
0 – 100
用於建構點雲的信賴度篩選百分比:0 會停用篩選;其他值會從信賴度最低的點開始,排除該百分比的點。
max_points選填
類型integer
預設值250000
1,000 – 5,000,000
GLB 點數上限,預設值為 250,000。為降低序列化和上傳延遲,當點雲超過此預算時,會寫入均勻次取樣的結果。
enable_safety_checker選填
類型boolean
預設值true
輸入圖像和影片的安全檢查切換開關。
必填
標準名稱,也可使用
檔案參數接受公開的 https:// URL、最大 10 MB 的 data: URI,或上傳檔案的 file_url。 檔案
輸出
GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
"id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
"object": "request",
"model": "vggt-1b",
"status": "succeeded",
"created_at": "2026-10-20T12:00:00Z",
"started_at": "2026-10-20T12:00:02Z",
"completed_at": "2026-10-20T12:00:09Z",
"queue_position": null,
"cost": {
"credits": 1755,
"usd": "1.755",
"charged": 1755,
"refunded": 0
},
"input": {},
"output": {
"point_cloud": {
"url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
"content_type": "image/jpeg",
"file_name": "0-output.jpeg",
"file_size": 1843200
},
"depth_maps": [
{
"url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
"content_type": "image/jpeg",
"file_name": "0-output.jpeg",
"file_size": 1843200,
"width": 1024,
"height": 768
}
],
"prediction_data": [
{
"url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
"content_type": "image/jpeg",
"file_name": "0-output.jpeg",
"file_size": 1843200
}
],
"num_frames": 1,
"depth_range": [
1.0
],
"extrinsics": [
[
[
1.0
]
]
],
"intrinsics": [
[
[
1.0
]
]
],
"timings": {}
},
"outputs": [
{
"type": "file",
"url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
"content_type": "image/jpeg",
"file_size": 1843200,
"stored": true
}
],
"error": null,
"metrics": {
"inference_seconds": 6.8
},
"urls": {
"self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
"cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
}
}
您的檔案,由您選擇每個 outputs[].url 都是儲存空間中的副本:可永久保留(按 GB-月計費),或免費保留 7 天;可透過帳戶設定或 ?storage= 設定。
所有模型使用相同結構圖片、影片和音訊皆包含 type、url、content_type、width、height 和 duration。output 是模型自己的結果物件。
輸出欄位
- point_cloud
- object {url, content_type, file_name, file_size} | null當 `export_point_cloud` 為 true 時回傳的點雲匯出結果;其 GLB 場景會將融合後的點雲與相機圓錐結合。
- depth_maps
- array of object {url, content_type, file_name, file_size, width, height}當 `export_depth_maps` 為 true 時可取得的深度圖匯出結果。項目會依照來源影格順序排列,每個影格都以 16 位元灰階 PNG 點陣圖表示。
- prediction_data
- array of object {url, content_type, file_name, file_size}原始預測匯出結果:當 `export_prediction_data` 為 true 時,每個影格都有自己的 JSON 檔案,且檔案會依照影格順序排列。
- num_frames
- integer重建後的影格總數,包括圖像和從影片取樣的影格。
- depth_range
- array of number用於 `depth_maps` 量化的深度界限 [min, max]。深度可使用 min + pixel * (max - min) / 65535 還原。
- extrinsics
- array of array of array of number每個影格的世界座標至相機座標外部參數矩陣,大小為 3x4;OpenCV 軸向為 x 向右、y 向下、z 向前。
- intrinsics
- array of array of array of number每個影格的針孔內部參數矩陣,大小為 3x3,以模型 518x518 影格的像素座標表示。
- timings
- object每個階段經過的實際時間,以秒為單位。
更多模型:視覺
給 AI 代理程式:此頁面的 Markdown 位於 https://doitong.com/zh-TW/developers/models/vggt-1b.md. 所有模型與指南: https://doitong.com/developers/llms.txt