File size: 2,205 Bytes
4f50176 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | # Tips for agents/apps calling these endpoints
Endpoints (H100, FlashBoot, scale 0-2). Auth: `RUNPOD_API_KEY` bearer token.
| task | endpoint id | scripts | warm exec |
|---|---|---|---|
| outfit/general edit, 2-image ref | `dom5lwr0o5wq6u` | `qwen_edit_{sync,async}.py` | turbo-4 ~27-42s, turbo-8 ~60s |
| single-image edit (Rapid-AIO NSFW) | `tplcz9jtzihoxa` | `qwen_edit_nsfw_{sync,async}.py` | ~7-8s @ 8 steps |
| head/face swap (Flux-2-Klein) | `qkeibkeoefcrk3` | `faceswap_lissie_{sync,async}.py` | ~12-13s |
1. Sync scripts for single jobs; async `--no-wait` + `--job-id` for batches
(2 workers/endpoint, jobs queue).
2. Warm/FlashBoot = sub-second delay. A brand-new host pays a one-time image
pull (10-25 min) — huge `delayTime` means that; it won't repeat on that
host. First job on a fresh worker adds ~20-60s model load. Use >=600s
timeouts for a session's first call.
3. Payloads: ~10 MB `/run`, ~20 MB `/runsync`; base64 adds ~33%. Keep inputs
under ~7 MB combined — workflows downscale internally anyway (2048px turbo,
1 MP nsfw/lissie), bigger uploads are wasted bytes.
4. Omitted seed = randomized and returned — save it to reproduce.
5. Custom graphs: `--workflow-json graph.json` (API format). Only models/nodes
baked in that image; LoadImage values must exactly match uploaded image
names; friendly params don't apply (edit nodes in your JSON or use `--set`).
6. Small tweaks: `--set NODE.INPUT=VALUE` patches the baked workflow, e.g.
`--set 43.cfg=1.5`. Param-name -> node maps: `../endpoints/<name>/params/`.
7. Batch health check: `GET https://api.runpod.ai/v2/<id>/health` —
`workers.idle/ready>0` warm-ish, `initializing` = pull in progress.
8. Outputs: base64 in `output.images[].data` (PNG; nsfw returns webp).
9. `output.error` = handler message (invalid params list the valid options —
trust it). RunPod `FAILED` status = infra; retry.
10. Batch related jobs back-to-back: workers idle 60s (billed) then FlashBoot
keeps them resumable free — bursts are cheaper and faster than spread-out
calls. Prefer these scripts over hand-rolled HTTP: they already handle
/runsync's early IN_QUEUE return and polling edge cases.
|