Migrating from v2 to v3
This guide helps you migrate from our previous v2 API to the new v3 API. The new API provides improved performance, better quality outputs, and additional configuration options.
Key Changes
- Endpoint Change: The endpoint for creating sessions has changed.
- Request Format: The request format has been updated to include a session type and a structured input object.
- Response Format: The response now includes more detailed information about the session and output files.
Reason for Changes
- The new API is designed to enhance the user experience by providing a more structured and consistent interface.
- The changes also enable us to introduce new features in the future without breaking existing functionality.
- The change also makes sure that no matter what tool you use, the APIs structure and response will always stay consistent
Migration Steps
1. Update Your Endpoints
Previous endpoints:
New endpoints:
2. Update Your Request Format
The new API uses a more structured request format that includes a session type and a dedicated settings object.
Previous API Request:
New API Request:
3. Update Output Handling
Detailed information on the response format for each session type can be found in the sessions documentation.
To check the status of your session, use the status
field, which can be one of incomplete
, complete
, or failed
. To get the
mesh results, for Image to 3D, use the output.meshes[0].data.glb_url
field (or .obj_url
, .fbx_url
, .usdz_url
).
Previous API Response:
New API Response:
Need Help?
If you encounter any issues during migration, please contact us at hello@csm.ai.
For complete older API documentation, visit our v2 docs.