R
RunPod6mo ago
georg

Runpod Custom API request and rp_handler.py

I try to deploy a runpod worker with a network volume for ComfyUI. The handler should be able to process a minimal request and enhance it to a full-on comfyUI API request. Example Request:
prompt_text = {"img" : "someBase64", "positive_prompt" : "pos", "negative_prompt" : "neg", "flow_id" : 1 }
prompt_text = {"img" : "someBase64", "positive_prompt" : "pos", "negative_prompt" : "neg", "flow_id" : 1 }
this should be posted to the serverless endpoint. after this it should be going to the handler function as event and is processed there further. Unfortunately it get caught as Error by the get_job() function from the rp_job.py module of the runpod python library and throws a Error:
{"requestId": null, "message": "Job has missing field(s): input.", "level": "ERROR"}
{"requestId": null, "message": "Job has missing field(s): input.", "level": "ERROR"}
. Is there a way to implement my idea in this way or should i try a other way or skip the error handling in the get_job() function?
Solution:
Payload needs to have everything within the input key. ``` { "input": {}...
Jump to solution
3 Replies
Solution
ashleyk
ashleyk6mo ago
Payload needs to have everything within the input key.
{
"input": {}
}
{
"input": {}
}
ashleyk
ashleyk6mo ago
Severless doesn't work without it. Similarly the output is returned in the output key.
georg
georg6mo ago
ok. thank you very much!
Want results from more Discord servers?
Add your server
More Posts