Start with ServerNet hourly GPU rental and choose the ComfyUI app. The current package provides an API and web API documentation. Its name does not guarantee the graph editor, every custom node or a video-generation model.
Choose resources before ordering
Identify your model, image dimensions, concurrent outputs and VRAM requirement. System RAM and GPU VRAM are separate resources. Only apps compatible with the selected card can be ordered. Check the current rate and starting credit in the configurator; starting credit is not a commitment to consume 24 hours.
1. Create the service and verify application readiness
- Select a card and ComfyUI on the GPU page, then submit the request.
- Follow allocation, download and application readiness in Console. A capacity request is not a ready application.
- After delivery, obtain the access address and token from that service page. This product does not provide a VPS root password or SSH session.
- Open the app documentation using the panel button. Confirm the workflow path and response format for the delivered version.
2. Submit a small image request
On your own computer, prepare Python and the requests package. Put the HTTPS address and token in SNET_GPU_URL and SNET_GPU_TOKEN environment variables. Keep tokens out of source control and screenshots. This example uses the default route shown in Console. The 300-second timeout is a client setting, not a generation-time promise.
import os, json, base64
from pathlib import Path
import requests
base = os.environ["SNET_GPU_URL"].rstrip("/")
headers = {"X-SN-Token": os.environ["SNET_GPU_TOKEN"]}
r = requests.post(base + "/workflow/sd1.5/txt2img",
headers=headers,
json={"input": {"prompt": "a red apple on a wooden table"}},
timeout=300)
r.raise_for_status()
result = r.json()
Path("response.json").write_text(json.dumps(result), encoding="utf-8")
# For the synchronous base64 images response described by this app:
for i, image in enumerate(result.get("images", [])):
if not isinstance(image, str) or image.startswith(("http://", "https://")):
raise ValueError("Use the response format documented by this instance")
payload = image.split(",", 1)[-1] if image.startswith("data:") else image
Path(f"output-{i + 1}.png").write_bytes(base64.b64decode(payload, validate=True))
if not result.get("images"):
raise ValueError("No images returned; inspect response.json and the instance docs")3. Save the returned output
For a synchronous response containing a Base64 images array, the example saves files beside the script. If your instance documents a download URL or job identifier instead, follow that version’s response contract. An empty response is not evidence of success. Open the saved image and keep response.json private. The PNG filename assumes the default output format; change the extension if you request another format.
Troubleshooting
- 401 or 403: check this service’s address, token and X-SN-Token header. Another service’s token will not work.
- 404: opening a POST route in a browser address bar does not call the API. Check the panel example and instance docs.
- 503 or timeout: inspect the actual app state in Console. A timeout does not prove that a job was never run; check its result or state before retrying.
- Out of VRAM: reduce image size or concurrency, or select a suitable card. Adding system RAM alone does not add VRAM.
Finish with an external copy
The environment may be interrupted or recreated, and local disk is temporary. Copy images and important settings to your computer or external storage and verify that the files open. Closing the browser does not stop the service; use the panel’s stop or cancel action and verify the resulting state. For Python work and checkpoints, see the hourly GPU Jupyter guide.
The instructions follow the current panel contract. This example has not been benchmarked on a live GPU; no generation time, cost per image or output result is claimed.
Comments 0
No comments yet — be the first!