fix: Upgrade Meshy API to V2 endpoints to support meshy-6 and fix infinite stuck states
Build and Deploy / build-and-push (push) Successful in 28s
Build and Deploy / build-and-push (push) Successful in 28s
This commit is contained in:
@@ -326,7 +326,7 @@ export const ImageTo3DModal: React.FC<ImageTo3DModalProps> = ({ isOpen, onClose,
|
||||
}
|
||||
}
|
||||
|
||||
const taskRes = await fetch('https://api.meshy.ai/openapi/v1/image-to-3d', {
|
||||
const taskRes = await fetch('https://api.meshy.ai/openapi/v2/image-to-3d', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
@@ -342,7 +342,7 @@ export const ImageTo3DModal: React.FC<ImageTo3DModalProps> = ({ isOpen, onClose,
|
||||
let isDone = false;
|
||||
while (!isDone) {
|
||||
await new Promise(r => setTimeout(r, 2000));
|
||||
const pollRes = await fetch(`https://api.meshy.ai/openapi/v1/image-to-3d/${taskId}`, {
|
||||
const pollRes = await fetch(`https://api.meshy.ai/openapi/v2/image-to-3d/${taskId}`, {
|
||||
headers: {
|
||||
'Authorization': `Bearer ${meshyApiKey}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user