Skip to main content

Using the REST API

If you prefer to use the LlamaParse API directly, that's great! You can use it in any language that can make HTTP requests. Here are some sample calls:

Upload a file and start parsing:

curl -X 'POST' \
'https://api.cloud.llamaindex.ai/api/parsing/upload' \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \
-F 'file=@/path/to/your/file.pdf;type=application/pdf'

Check the status of the parsing job:

curl -X 'GET' \
'https://api.cloud.llamaindex.ai/api/parsing/job/<job_id>' \
-H 'accept: application/json' \
-H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"

Get the results in Markdown:

curl -X 'GET' \
'https://api.cloud.llamaindex.ai/api/parsing/job/<job_id>/result/markdown' \
-H 'accept: application/json' \
-H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"

You can see all the available endpoints in our full API documentation