model_urlstringbắt buộc
URL of the 3D model to texture. Supports .glb, .gltf, .obj, .fbx and .stl.
meshy/n1/retextureMeshy N1 Retexture repaints an existing 3D model from one reference image or up to four reference views, producing a 2K base color texture.
Thử model
PNG, JPEG, WebP hoặc GIF · tối đa 20 MiB
PNG, JPEG, WebP, or GIF · 20 MiB maximum each · up to 4
Bạn muốn làm gì tiếp theo?
Chọn một ví dụ để nạp đầu vào và kết quả của nó vào playground.
{
"image_style_url": "https://static.sandbase.ai/examples/e0fc4828-821c-4974-966e-116c53e8ca86/input/7f895d34-8025-4201-a8da-dc4bff72e967.png",
"model_url": "https://static.sandbase.ai/examples/e0fc4828-821c-4974-966e-116c53e8ca86/input/c7fd980b-df7a-4f18-b6ca-4d1fe7e5638e.glb"
}Meshy N1 Retexture repaints an existing 3D model from one reference image or up to four reference views, producing a 2K base color texture.
| Field | Type | Default | Notes |
|---|---|---|---|
model_url | string, required | — | URL of the 3D model to texture. Supports .glb, .gltf, .obj, .fbx and .stl. |
image_style_url | image URL | — | Single reference image of the target texture, treated as the front view. Provide this or multiview_image_urls. |
multiview_image_urls | image URLs (1–4) | — | 1 to 4 reference views of the target texture; the first is the front view. Cannot be combined with image_style_url. |
enable_original_uv | boolean | true | Use the model's original UV mapping instead of generating new UVs. |
url: Main 3D file (GLB unless another export format is selected).thumbnail: Preview image rendered by the provider.$0.40 per request. Failed runs are not charged.
Other Meshy 3D endpoints: meshy/6.0-lite/retexture, meshy/6.0/retexture, meshy/7.0/image-to-3d, meshy/7.0/multi-image-to-3d.
Bắt đầu xây dựng
Gửi model này qua SandBase Unified Run API.
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "meshy/n1/retexture",
"model_url": "https://static.sandbase.ai/examples/meshy/n1/retexture/input_model_url_0.glb",
"enable_original_uv": true
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"Tạo một SandBase API key và đặt nó trong môi trường máy chủ của bạn. Tất cả request sử dụng xác thực Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Giữ key trên máy chủ. Không hiển thị trong mã trình duyệt hoặc commit vào repository.
POST tới /v1/run với model ID này và các đầu vào của nó. Ví dụ request ở trên bao gồm cả bước gửi và polling.
Dùng run ID được trả về để poll cho đến khi trạng thái là completed, failed hoặc timeout. Chỉ đọc đầu ra sau khi completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Cung cấp một URL tệp có thể truy cập công khai trong trường image, video hoặc audio của model. Các định dạng và giới hạn được hỗ trợ hiển thị bên cạnh từng input trong Playground.
Dùng điều khiển upload hoặc replace trên các trường image được hỗ trợ trong Playground. Trường URL video chấp nhận một video driving được host; điều này không đồng nghĩa hỗ trợ tải lên video.
model_urlstringbắt buộcURL of the 3D model to texture. Supports .glb, .gltf, .obj, .fbx and .stl.
image_style_urlstringSingle reference image of the target texture, treated as the front view. Provide this or multiview_image_urls.
enable_original_uvbooleanUse the model's original UV mapping instead of generating new UVs.
Mặc định: true
multiview_image_urlsarray1 to 4 reference views of the target texture; the first is the front view. Cannot be combined with image_style_url.
{
"model": "meshy/n1/retexture",
"model_url": "https://static.sandbase.ai/examples/meshy/n1/retexture/input_model_url_0.glb",
"enable_original_uv": true
}Một run đã hoàn tất sẽ hiển thị kết quả trong output. Phần sau là ví dụ đã lưu của model, không phải một lần tạo mới.
[
{
"poster": "https://static.sandbase.ai/examples/e0fc4828-821c-4974-966e-116c53e8ca86/output/9ca739e6-5e70-4b7b-a2ed-b1c4b6a6de73.png",
"thumbnail": "https://static.sandbase.ai/examples/e0fc4828-821c-4974-966e-116c53e8ca86/output/9ca739e6-5e70-4b7b-a2ed-b1c4b6a6de73.png",
"url": "https://static.sandbase.ai/examples/e0fc4828-821c-4974-966e-116c53e8ca86/output/433c982c-f7da-48c4-b6df-98db701b814d.glb"
}
]