ai-dock / comfyui

ComfyUI docker images for use in GPU cloud and local environments. Includes AI-Dock base for authentication and improved user experience.
Other
546 stars 193 forks source link

API Auth #100

Open Naurislv opened 2 weeks ago

Naurislv commented 2 weeks ago

I am calling the API from my local computer and it obviously is not getting through the login window. How should one access the API outside of Swagger UI https://XXX.proxy.runpod.net/ai-dock/api/docs?

curl -X 'POST' \ 'https://XXX.proxy.runpod.net/ai-dock/api/payload' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ "input": { "handler": "RawWorkflow", "s3": { "access_key_id": "your-s3-access-key", "secret_access_key": "your-s3-secret-access-key", "endpoint_url": "https://my-endpoint.backblaze.com", "bucket_name": "your-bucket" }, "webhook": { "webhook_url": "your-webhook-url", "webhook_extra_params": {} }, "modifiers": {}, "workflow_json": { ... } }'

robballantyne commented 2 weeks ago

You'll need to pass header Authorization: Bearer $WEB_TOKEN.

Alternatively, and maybe preferably, create a SSH tunnel and forward port 18188 - All services are proxied, with the proxy handling Auth. The ComfyUI service is actually bound to localhost 10,000 ports higher than the exposed port without auth so it's very flexible