Change to api.comfy.org

This commit is contained in:
Robin Huang 2025-04-22 19:31:09 -07:00
parent 79c85a9452
commit 9bf1fc71d7
2 changed files with 5 additions and 3 deletions

View File

@ -25,7 +25,7 @@ jobs:
- name: Generate API models - name: Generate API models
run: | run: |
datamodel-codegen --use-subclass-enum --url https://stagingapi.comfy.org/openapi --output comfy_api_nodes/apis --output-model-type pydantic_v2.BaseModel datamodel-codegen --use-subclass-enum --url https://api.comfy.org/openapi --output comfy_api_nodes/apis --output-model-type pydantic_v2.BaseModel
- name: Check for changes - name: Check for changes
id: git-check id: git-check

View File

@ -212,6 +212,8 @@ class ApiClient:
error_message = "Unauthorized: Please login first to use this node." error_message = "Unauthorized: Please login first to use this node."
if status_code == 402: if status_code == 402:
error_message = "Payment Required: Please add credits to your account to use this node." error_message = "Payment Required: Please add credits to your account to use this node."
if status_code == 429:
error_message = "Rate Limit Exceeded: Please try again later."
raise Exception(error_message) raise Exception(error_message)
# Parse and return JSON response # Parse and return JSON response
@ -263,7 +265,7 @@ class SynchronousOperation(Generic[T, R]):
endpoint: ApiEndpoint[T, R], endpoint: ApiEndpoint[T, R],
request: T, request: T,
files: Optional[Dict[str, Any]] = None, files: Optional[Dict[str, Any]] = None,
api_base: str = "https://stagingapi.comfy.org", api_base: str = "https://api.comfy.org",
auth_token: Optional[str] = None, auth_token: Optional[str] = None,
timeout: float = 60.0, timeout: float = 60.0,
verify_ssl: bool = True, verify_ssl: bool = True,