{
  "openapi": "3.1.0",
  "info": {
    "title": "Mobius 3D Transfer API",
    "version": "1.0.0",
    "description": "3D Transfer API for converting images to 3D models.\n\n## Overview\n\nThis API provides endpoints for:\n- Getting available 3D transfer styles\n- Uploading images and initiating 3D conversion\n- Checking conversion status and retrieving results\n\n## Authentication\n\nAll endpoints require Bearer token authentication:\n```\nAuthorization: Bearer <your-api-token>\n```\n\n## Workflow\n\n1. Call `GET /3d-transfer/styles` to get available styles\n2. Call `POST /3d-transfer/convert` with an image and style\n3. Poll `GET /3d-transfer/{requestId}/status` until status is COMPLETED\n4. Retrieve the 3D model URL from the response"
  },
  "servers": [
    {
      "url": "/api",
      "description": "Relative API path - configure baseURL via createTransfer3DClient() or environment variables"
    }
  ],
  "security": [
    {
      "http": []
    }
  ],
  "paths": {
    "/3d-transfer/add-to-cart": {
      "get": {
        "operationId": "addToCart",
        "description": "Accepts multiple products via query parameters and adds them to the cart.\nWorks for both logged-in users and guests (session-based cart).",
        "summary": "Add products to cart and redirect",
        "tags": [
          "3D Transfer",
          "Transfer3D"
        ],
        "parameters": [
          {
            "name": "products",
            "in": "query",
            "description": "Parse products from query parameter",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "redirect_url",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "/cart"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "integer",
                  "enum": [
                    302
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/3d-transfer/product/{slug}": {
      "get": {
        "operationId": "getTransfer3DProduct",
        "description": "Retrieves product details including name, description, price, images, and variants.",
        "summary": "Get product information by slug",
        "tags": [
          "3D Transfer",
          "Transfer3D"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "integer",
                  "enum": [
                    200
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/3d-transfer/styles": {
      "get": {
        "operationId": "getTransfer3DStyles",
        "description": "Returns a list of available 3D transfer styles with their configurations.\nOptionally filter to a single style by providing the default_style query parameter.",
        "summary": "Get available 3D transfer styles",
        "tags": [
          "3D Transfer",
          "Transfer3D"
        ],
        "parameters": [
          {
            "name": "default_style",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "integer",
                  "enum": [
                    200
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/3d-transfer/convert": {
      "post": {
        "operationId": "initiateTransfer3DConversion",
        "description": "Upload an image and start the 3D conversion process. The image will first\nbe processed through 2D style transfer, then converted to a 3D model.",
        "summary": "Upload image and initiate 3D conversion",
        "tags": [
          "3D Transfer",
          "Transfer3D"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "image": {
                    "type": "string",
                    "format": "binary",
                    "contentMediaType": "application/octet-stream",
                    "maxLength": 10240
                  },
                  "style": {
                    "type": "string",
                    "enum": [
                      ""
                    ]
                  },
                  "additional_instruction": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  },
                  "auto_3d": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Accept string values from form-data: \"true\", \"false\", \"1\", \"0\"",
                    "enum": [
                      "true",
                      "false",
                      "1",
                      "0",
                      "TRUE",
                      "FALSE"
                    ]
                  }
                },
                "required": [
                  "image",
                  "style"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "integer",
                  "enum": [
                    200
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      }
    },
    "/3d-transfer/convert-3d": {
      "post": {
        "operationId": "triggerTransfer3DConversion",
        "description": "Use this endpoint when you initiated a conversion with auto_3d=false.\nAfter 2D style transfer completes (status: 2D_COMPLETED), call this endpoint\nto trigger the 3D model generation.",
        "summary": "Trigger 3D conversion for a request that completed 2D styling",
        "tags": [
          "3D Transfer",
          "Transfer3D"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "request_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "integer",
                  "enum": [
                    200
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      }
    },
    "/3d-transfer/{requestId}/status": {
      "get": {
        "operationId": "getTransfer3DStatus",
        "description": "Query the status of a conversion request. Returns the current phase,\nprogress, and result URLs when available.",
        "summary": "Get conversion status",
        "tags": [
          "3D Transfer",
          "Transfer3D"
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "integer",
                  "enum": [
                    200
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/3d-transfer/{requestId}/model.glb": {
      "get": {
        "operationId": "proxyTransfer3DModel",
        "description": "Proxies the GLB model file to avoid CORS issues when loading from external domains.",
        "summary": "Proxy GLB model file",
        "tags": [
          "3D Transfer",
          "Transfer3D"
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "integer",
                  "enum": [
                    200
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    }
  },
  "components": {
    "responses": {
      "AuthenticationException": {
        "description": "Unauthenticated",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string",
                  "description": "Error overview."
                }
              },
              "required": [
                "message"
              ]
            }
          }
        }
      },
      "ValidationException": {
        "description": "Validation error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string",
                  "description": "Errors overview."
                },
                "errors": {
                  "type": "object",
                  "description": "A detailed description of each field that failed validation.",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "required": [
                "message",
                "errors"
              ]
            }
          }
        }
      }
    }
  }
}