# Gradio Curl for Image input Not wokring

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-curl-for-image-input-not-wokring%2F129288%3E%5C
**Category:** Beginners\
**Created:** [December 4, 2024, 8:09pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-curl-for-image-input-not-wokring%2F129288 "2024-12-04T20:09:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shrijayan](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/shrijayan/32/28178_2.png) [@shrijayan](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fshrijayan)%5C
**Post date:** [December 4, 2024, 8:09pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-curl-for-image-input-not-wokring%2F129288%2F1 "2024-12-04T20:09:03Z")

</div>

I have a spaces which will get image as input and gives output as text. I have build the interface with Gradio which works and now I want to use it as API, it shows me a curl command.

Eg.

```auto
curl -X POST https://kazeo57-image-processing.hf.space/gradio_api/call/image_processing -s -H "Content-Type: application/json" -d '{
  "data": [
							{"path":"https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png"},
							"Négatif",
							0,
							3,
							3,
							3
]}' \
  | awk -F'"' '{ print $4}' \
  | read EVENT_ID; curl -N https://kazeo57-image-processing.hf.space/gradio_api/call/image_processing/$EVENT_ID

```

Which will first get the Event ID and then again pass a CURL to get the result.

I can get the Event ID but not the result I think the issue with file location

Error Logs

```auto
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/gradio/queueing.py", line 624, in process_events
    response = await route_utils.call_process_api(
  File "/usr/local/lib/python3.10/site-packages/gradio/route_utils.py", line 323, in call_process_api
    output = await app.get_blocks().process_api(
  File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 2015, in process_api
    inputs = await self.preprocess_data(
  File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1710, in preprocess_data
    processed_input.append(block.preprocess(inputs_cached))
  File "/usr/local/lib/python3.10/site-packages/gradio/components/image.py", line 228, in preprocess
    im = PIL.Image.open(file_path)
  File "/usr/local/lib/python3.10/site-packages/PIL/Image.py", line 3469, in open
    fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/app/https:/example.com/image.png'

```

---

<div class="post-metadata">

**Author:** ![huzpsb](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/huzpsb/32/37148_2.png) [@huzpsb](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fhuzpsb)%5C
**Post date:** [December 9, 2024, 4:18am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-curl-for-image-input-not-wokring%2F129288%2F2 "2024-12-09T04:18:09Z")

</div>

+1  
I got this problem too
