Llama Cloud Services SDK (Deprecated)

0.6.94 · deprecated · verified Sun Mar 29

This library provides tailored SDK clients for LlamaCloud services such as LlamaParse, LlamaExtract, and LlamaCloud Index. As of January 2026, this package is officially deprecated and will only be maintained until May 1, 2026. Users are strongly advised to migrate to the `llama-cloud` Python package for continued support and new features.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to initialize the LlamaParse client using the `llama-cloud-services` package. It uses an API key, preferably from an environment variable. Note that to actually parse a document, you would first need to upload a file to LlamaCloud and use its `file_id`.

import os
from llama_cloud_services import LlamaParse

# Get your API key from LlamaCloud. Recommended to use environment variables.
LLAMA_CLOUD_API_KEY = os.environ.get('LLAMA_CLOUD_API_KEY', 'your_api_key_here')

if LLAMA_CLOUD_API_KEY == 'your_api_key_here':
    print("WARNING: Please set the LLAMA_CLOUD_API_KEY environment variable or replace 'your_api_key_here' with your actual key.")

# Initialize LlamaParse
parser = LlamaParse(api_key=LLAMA_CLOUD_API_KEY)

# Example usage (assuming you have a file_id from an uploaded document)
# This is a conceptual example as parsing a file requires prior upload.
# For a full workflow, refer to the LlamaCloud documentation.
print("LlamaParse client initialized. You can now use it to parse documents.")
# To parse a document, you would typically upload a file first and then use its ID:
# job = parser.create(tier="agentic", version="latest", file_id="your_uploaded_file_id")
# print(f"Parsing job created with ID: {job.id}")

view raw JSON →