浏览代码

update APIs

Sergiu 9 月之前
父节点
当前提交
adc54f6ce9

+ 0 - 0
03_blender/sd_blender/zs_ai_ddl.py → 03_blender/sd_blender/_deprecated_zs_ai_ddl.py


+ 2 - 2
03_blender/sd_blender/zs_ai_post_3d_render_script.py

@@ -37,7 +37,7 @@ def update_3d_image_task_status(row_id, new_status):
 
 def get_3d_image_task(row_id):
     # Define the URL for the API endpoint
-    url = "{}/tasks/3d-image/{}".format(api_path, row_id)
+    url = "{}/creation-module/3d-image/{}".format(api_path, row_id)
     print("Constructed URL:", url)  # Print the URL for debugging
 
     # Make a GET request to the API endpoint
@@ -62,7 +62,7 @@ def find_image_and_convert_to_base64(image_path):
 
 
 def upload_image_to_anvil(row_id, image_base64):
-    url = "{}/test-2".format(api_path)
+    url = "{}/api/creation-module/3d-image/upload-preview".format(api_path)
     payload = {"row_id": row_id, "image_base64": image_base64}
     response = requests.post(url, json=payload)
     if response.status_code == 200:

+ 1 - 1
03_blender/sd_blender/zs_ai_pre_3d_render_script.py

@@ -11,7 +11,7 @@ api_path = "https://canvas-api-test.anvil.app/_/api"
 
 def update_3d_image_task_status(row_id, new_status):
     # Define the URL for the API endpoint
-    url = "{}/tasks/3d-image/update-status".format(api_path)
+    url = "{}/creation-module/3d-image/update-status".format(api_path)
 
     # Create a JSON payload
     payload = {"row_id": row_id, "new_status": new_status}

+ 3 - 3
04_stable_diffusion/sd_comfy_api_v2.py

@@ -21,7 +21,7 @@ image_path = "D:/Temp/ComfyUI_windows_portable_nvidia/ComfyUI_windows_portable/C
 
 def update_ai_image_task_status(row_id, new_status):
     # Define the URL for the API endpoint
-    url = "{}/tasks/ai-image/update-status".format(api_path)
+    url = "{}//creation-module/ai-image/update-status".format(api_path)
 
     # Create a JSON payload
     payload = {"row_id": row_id, "new_status": new_status}
@@ -41,7 +41,7 @@ def update_ai_image_task_status(row_id, new_status):
 
 def get_ai_image_task(row_id):
     # Define the URL for the API endpoint
-    url = "{}/tasks/ai-image/{}".format(api_path, row_id)
+    url = "{}/api/creation-module/ai-image/{}".format(api_path, row_id)
     print("Constructed URL:", url)  # Print the URL for debugging
 
     # Make a GET request to the API endpoint
@@ -64,7 +64,7 @@ def find_image_and_convert_to_base64(image_path):
         return image_base64
 
 def upload_image_to_anvil(row_id, image_base64):
-    url = "{}/test-3".format(api_path)
+    url = "{}/api/creation-module/ai-image/upload-preview".format(api_path)
     payload = {"row_id": row_id, "image_base64": image_base64}
     response = requests.post(url, json=payload)
     if response.status_code == 200: