model_urlstringobligatoire
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.
Essayer le modèle
PNG, JPEG, WebP ou GIF · 20 MiB maximum
PNG, JPEG, WebP, or GIF · 20 MiB maximum each · up to 4
Que souhaitez-vous faire ensuite ?
Sélectionnez un exemple pour charger ses entrées et son résultat dans le 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.
Commencer à construire
Soumettez ce modèle via l'API Unified Run de SandBase.
# 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"Créez une clé API SandBase et définissez-la dans l'environnement de votre serveur. Toutes les requêtes utilisent l'authentification Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conservez la clé sur votre serveur. Ne l'exposez pas dans le code du navigateur et ne la committez pas dans un dépôt.
Faites un POST sur /v1/run avec cet ID de modèle et ses entrées. L'exemple de requête ci-dessus inclut la soumission et le polling.
Utilisez l'ID d'exécution renvoyé pour interroger jusqu'à ce que le statut soit completed, failed ou timeout. Ne lisez la sortie qu'une fois completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Passez une URL de fichier accessible publiquement dans le champ image, video ou audio du modèle. Les formats pris en charge et les limites sont indiqués à côté de chaque entrée du Playground.
Utilisez le contrôle upload ou replace sur les champs image pris en charge dans le Playground. Les champs URL vidéo acceptent une vidéo de conduite hébergée ; cela n'implique pas la prise en charge de l'importation vidéo.
model_urlstringobligatoireURL 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.
Par défaut : 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
}Une exécution terminée expose son résultat dans output. Ce qui suit est l'exemple enregistré du modèle, et non une nouvelle génération.
[
{
"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"
}
]