Webhook
1 Webhook Notifications

Webhook Notifications

Our Image-to-3D service supports webhooks for real-time event notifications.

You can configure your webhook URL on your profile page at 3d.csm.ai (opens in a new tab).

The configured webhook URL should accept a POST request, with the request body containing a JSON object structured as follows:

{
  "type": "type of event",
  "payload": {
    // event-specific data
  }
}

Event Types

The type field indicates the type of event, with the following possible values:

  • spin_generate_processing: Spin generation is in progress.
  • spin_generate_done: Spin generation is complete.
  • spin_generate_failed: Spin generation has failed.
  • preview_done: Preview mesh has been generated.
  • preview_failed: Preview mesh generation has failed.
  • refine_done: Refined mesh has been generated.
  • refine_failed: Refined mesh generation has failed.

The payload field will vary depending on the event type.

Payload Examples

Spin Generation

An example payload for a completed spin generation event:

{
  "session_id": "SESSION_P_44569824122",
  "status": "spin_generate_done",
  "spins": [ "https://spin-url.com/spin1" ]
}

Preview Generation

An example payload for a completed preview generation event:

{
  "session_id": "SESSION_P_44569824122",
  "status": "preview_done",
  "preview_mesh_url": "https://preview-mesh-url.com",
  "preview_mesh_url_fbx": "https://preview-mesh-url-fbx.com",
  "selected_spin_index": 0
}

Refine Generation

An example payload for a completed refine generation event:

{
  "session_id": "SESSION_P_44569824122",
  "status": "refine_done",
  "mesh_url": "https://refine-mesh-url.com",
  "mesh_url_fbx": "https://refine-mesh-url-fbx.com"
}