Getting 404/405 when using curl #100

Closed
opened 2026-02-16 00:16:52 -05:00 by yindo · 2 comments
Owner

Originally created by @mk0y on GitHub (May 3, 2024).

Hi, i'm trying Llama Parse with curl from the docs, I copy paste and seemingly getting an error (404 or 405).

I'm hitting the endpoint defined at:
https://docs.cloud.llamaindex.ai/llamaparse/API/upload-file-api-parsing-upload-post

The command:

curl -v -L -X POST 'https://docs.cloud.llamaindex.ai/api/parsing/upload' \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer ...' \
-F 'file=@"/path/to/file"'

Notice the -v flag that I added to get verbose result, otherwise curl returns nothing, even though in the docs it's written that response should be a JSON with "id" and "status".

Result:

*   Trying 76.76.21.241:443...                                                                                                                                
* Connected to docs.cloud.llamaindex.ai (76.76.21.241) port 443                                                                                               
* ALPN: curl offers h2,http/1.1                                                                                                                               
* (304) (OUT), TLS handshake, Client hello (1):                                                                                                               
*  CAfile: /etc/ssl/cert.pem                                                                                                                                  
*  CApath: none                                                                                                                                               
* (304) (IN), TLS handshake, Server hello (2):                                                                                                                
* (304) (IN), TLS handshake, Unknown (8):                                                                                                                     
* (304) (IN), TLS handshake, Certificate (11):                                                                                                                
* (304) (IN), TLS handshake, CERT verify (15):                                                                                                                
* (304) (IN), TLS handshake, Finished (20):                                                                                                                   
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-AES128-GCM-SHA256
* ALPN: server accepted h2
* Server certificate:
*  subject: CN=docs.cloud.llamaindex.ai
*  start date: Mar 21 21:06:50 2024 GMT
*  expire date: Jun 19 21:06:49 2024 GMT
*  subjectAltName: host "docs.cloud.llamaindex.ai" matched cert's "docs.cloud.llamaindex.ai"
*  issuer: C=US; O=Let's Encrypt; CN=R3
*  SSL certificate verify ok.
* using HTTP/2
* [HTTP/2] [1] OPENED stream for https://docs.cloud.llamaindex.ai/api/parsing/upload
* [HTTP/2] [1] [:method: POST]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: docs.cloud.llamaindex.ai]
* [HTTP/2] [1] [:path: /api/parsing/upload]
* [HTTP/2] [1] [user-agent: curl/8.4.0]
* [HTTP/2] [1] [accept: application/json]
* [HTTP/2] [1] [authorization: Bearer ...]
* [HTTP/2] [1] [content-length: 491764]
* [HTTP/2] [1] [content-type: multipart/form-data; boundary=------------------------ZKB3uLpNN3JerTbWEDlcdp]
> POST /api/parsing/upload HTTP/2
> Host: docs.cloud.llamaindex.ai
> User-Agent: curl/8.4.0
> Accept: application/json
> Authorization: Bearer ...
> Content-Length: 491764
> Content-Type: multipart/form-data; boundary=------------------------ZKB3uLpNN3JerTbWEDlcdp
> 
* We are completely uploaded and fine
< HTTP/2 405 
< cache-control: public, max-age=0, must-revalidate
< content-disposition: inline; filename="404.html"
< content-type: text/html; charset=utf-8
< date: Fri, 03 May 2024 21:04:54 GMT
< server: Vercel
< strict-transport-security: max-age=63072000
< x-vercel-cache: BYPASS
< x-vercel-id: fra1::5bxd9-1714770293922-824a922df651
< 
* Connection #0 to host docs.cloud.llamaindex.ai left intact

Anyone else with such behaviour?

Originally created by @mk0y on GitHub (May 3, 2024). Hi, i'm trying Llama Parse with curl from the docs, I copy paste and seemingly getting an error (404 or 405). I'm hitting the endpoint defined at: https://docs.cloud.llamaindex.ai/llamaparse/API/upload-file-api-parsing-upload-post The command: ```sh curl -v -L -X POST 'https://docs.cloud.llamaindex.ai/api/parsing/upload' \ -H 'Content-Type: multipart/form-data' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer ...' \ -F 'file=@"/path/to/file"' ``` Notice the `-v` flag that I added to get verbose result, otherwise curl returns nothing, even though in the docs it's written that response should be a JSON with "id" and "status". Result: ``` * Trying 76.76.21.241:443... * Connected to docs.cloud.llamaindex.ai (76.76.21.241) port 443 * ALPN: curl offers h2,http/1.1 * (304) (OUT), TLS handshake, Client hello (1): * CAfile: /etc/ssl/cert.pem * CApath: none * (304) (IN), TLS handshake, Server hello (2): * (304) (IN), TLS handshake, Unknown (8): * (304) (IN), TLS handshake, Certificate (11): * (304) (IN), TLS handshake, CERT verify (15): * (304) (IN), TLS handshake, Finished (20): * (304) (OUT), TLS handshake, Finished (20): * SSL connection using TLSv1.3 / AEAD-AES128-GCM-SHA256 * ALPN: server accepted h2 * Server certificate: * subject: CN=docs.cloud.llamaindex.ai * start date: Mar 21 21:06:50 2024 GMT * expire date: Jun 19 21:06:49 2024 GMT * subjectAltName: host "docs.cloud.llamaindex.ai" matched cert's "docs.cloud.llamaindex.ai" * issuer: C=US; O=Let's Encrypt; CN=R3 * SSL certificate verify ok. * using HTTP/2 * [HTTP/2] [1] OPENED stream for https://docs.cloud.llamaindex.ai/api/parsing/upload * [HTTP/2] [1] [:method: POST] * [HTTP/2] [1] [:scheme: https] * [HTTP/2] [1] [:authority: docs.cloud.llamaindex.ai] * [HTTP/2] [1] [:path: /api/parsing/upload] * [HTTP/2] [1] [user-agent: curl/8.4.0] * [HTTP/2] [1] [accept: application/json] * [HTTP/2] [1] [authorization: Bearer ...] * [HTTP/2] [1] [content-length: 491764] * [HTTP/2] [1] [content-type: multipart/form-data; boundary=------------------------ZKB3uLpNN3JerTbWEDlcdp] > POST /api/parsing/upload HTTP/2 > Host: docs.cloud.llamaindex.ai > User-Agent: curl/8.4.0 > Accept: application/json > Authorization: Bearer ... > Content-Length: 491764 > Content-Type: multipart/form-data; boundary=------------------------ZKB3uLpNN3JerTbWEDlcdp > * We are completely uploaded and fine < HTTP/2 405 < cache-control: public, max-age=0, must-revalidate < content-disposition: inline; filename="404.html" < content-type: text/html; charset=utf-8 < date: Fri, 03 May 2024 21:04:54 GMT < server: Vercel < strict-transport-security: max-age=63072000 < x-vercel-cache: BYPASS < x-vercel-id: fra1::5bxd9-1714770293922-824a922df651 < * Connection #0 to host docs.cloud.llamaindex.ai left intact ``` Anyone else with such behaviour?
yindo closed this issue 2026-02-16 00:16:52 -05:00
Author
Owner

@L42y commented on GitHub (May 5, 2024):

change from docs.cloud.llamaindex.ai to api.cloud.llamaindex.ai should work

@L42y commented on GitHub (May 5, 2024): change from `docs.cloud.llamaindex.ai` to `api.cloud.llamaindex.ai` should work
Author
Owner

@mk0y commented on GitHub (May 6, 2024):

Thank you @L42y , it works now, in the docs it was docs. but i see it's changed now. Thank you!

@mk0y commented on GitHub (May 6, 2024): Thank you @L42y , it works now, in the docs it was `docs.` but i see it's changed now. Thank you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/llama_cloud_services#100