-
Notifications
You must be signed in to change notification settings - Fork 13
Authentication failed (Error 1002) when using SDK for Image-to-3D #13
Copy link
Copy link
Open
Description
Body:
Hi, I encountered an error while using the SDK to convert images to 3D models.
Error Message:
tripo3d.exceptions.TripoAPIError: [1002] Authentication failed. Suggestion: Check if your credentials are valid and ensure they are set correctly.
Context:
I initialized the client with the following code(Offical example):
import asyncio
from tripo3d import TripoClient
from tripo3d.models import TaskStatus
async def multiview_to_model_example():
async with TripoClient(IS_GLOBAL=False) as client:
# Create multi-view to 3D model task
task_id = await client.multiview_to_model(
images=[
"front_697b43aeff31fdbee0400ad0861e315b.jpg", # Front view (required)
"back_697b43aeff31fdbee0400ad0861e315b.jpg", # Back view (optional)
"left_697b43aeff31fdbee0400ad0861e315b.jpg", # Left view (optional)
"right_697b43aeff31fdbee0400ad0861e315b.jpg"
],
)
print(f"Task ID: {task_id}")
# Wait for task completion and show progress
task = await client.wait_for_task(task_id, verbose=True)
if task.status == TaskStatus.SUCCESS:
print(f"Task completed successfully!")
# Download model files
downloaded_files = await client.download_task_models(task, "./output")
# Print downloaded file paths
for model_type, file_path in downloaded_files.items():
if file_path:
print(f"Downloaded {model_type}: {file_path}")
asyncio.run(multiview_to_model_example())
Questions:
-
Does IS_GLOBAL=False mean the SDK will use the mainland China service endpoint?
-
How can I resolve this authentication error? I have verified that my API key is active in the dashboard.
Any suggestions would be appreciated!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels