LlamaParse Platform Quickstart
Install the SDK, get an API key, and run your first call against Parse, Extract, Classify, Split, Sheets, or Index — all from one platform.
Build document agents powered by agentic OCR.
LlamaParse is the enterprise platform for turning documents into production AI pipelines. One API key, one SDK, and six composable products: Parse (agentic OCR), Extract (structured data), Classify, Split, Sheets, and Index.
Install
Section titled “Install”pip install llama-cloud>=2.8npm install @llamaindex/llama-cloudgo get github.com/run-llama/llama-parse-goimplementation("ai.llamaindex:llama-cloud:1.3.0")go install github.com/run-llama/llama-parse-cli/cmd/llp@latestSet your API key:
export LLAMA_CLOUD_API_KEY=llx-...Get an API key from the LlamaCloud dashboard.
Which product do I want?
Section titled “Which product do I want?”Map what you’re trying to do to the right product:
| I want to… | Use |
|---|---|
| Turn PDFs, scans, or images into clean LLM-ready text | Parse |
| Pull structured JSON out of documents that matches my schema | Extract |
| Route documents into categories with natural-language rules | Classify |
| Split concatenated documents into their logical parts | Split |
| Work with spreadsheet-like data and reason over rows | Sheets |
| Build a hosted vector search pipeline for RAG | Index |
| New here? Start with Parse—it’s the foundation most pipelines build on. Or scroll down for a runnable snippet in every product below. |
Quick Start
Section titled “Quick Start”Agentic OCR and parsing for 130+ formats. Turn PDFs and scans into LLM-ready text—the foundation for document agents.
from llama_cloud import LlamaCloud
client = LlamaCloud() # Uses LLAMA_CLOUD_API_KEY env var
# Upload and parse a documentfile = client.files.create(file="document.pdf", purpose="parse")result = client.parsing.parse( file_id=file.id, tier="agentic", version="latest", expand=["markdown"],)
# Get markdown outputprint(result.markdown.pages[0].markdown)import LlamaCloud from '@llamaindex/llama-cloud';import fs from 'fs';
const client = new LlamaCloud(); // Uses LLAMA_CLOUD_API_KEY env var
// Upload and parse a documentconst file = await client.files.create({ file: fs.createReadStream('document.pdf'), purpose: 'parse',});const result = await client.parsing.parse({ file_id: file.id, tier: 'agentic', version: 'latest', expand: ['markdown']});
// Get markdown outputconsole.log(result.markdown.pages[0].markdown);package main
import ( "context" "fmt" "log" "os" "time"
llamacloud "github.com/run-llama/llama-parse-go")
func main() { ctx := context.Background() client := llamacloud.NewClient() // Uses LLAMA_CLOUD_API_KEY env var
// Upload and parse a document f, err := os.Open("document.pdf") if err != nil { log.Fatal(err) } defer f.Close()
file, err := client.Files.New(ctx, llamacloud.FileNewParams{ File: f, Purpose: "parse", }) if err != nil { log.Fatal(err) }
job, err := client.Parsing.New(ctx, llamacloud.ParsingNewParams{ FileID: llamacloud.String(file.ID), Tier: llamacloud.ParsingNewParamsTierAgentic, Version: llamacloud.ParsingNewParamsVersionLatest, }) if err != nil { log.Fatal(err) }
// Poll until the job reaches a terminal state getParams := llamacloud.ParsingGetParams{Expand: []string{"markdown"}} result, err := client.Parsing.Get(ctx, job.ID, getParams) if err != nil { log.Fatal(err) } for result.Job.Status == "PENDING" || result.Job.Status == "RUNNING" { time.Sleep(2 * time.Second) result, err = client.Parsing.Get(ctx, job.ID, getParams) if err != nil { log.Fatal(err) } }
// Get markdown output fmt.Println(result.Markdown.Pages[0].Markdown)}import ai.llamaindex.llamacloud.client.LlamaCloudClient;import ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;import ai.llamaindex.llamacloud.models.files.FileCreateParams;import ai.llamaindex.llamacloud.models.files.FileCreateResponse;import ai.llamaindex.llamacloud.models.parsing.ParsingCreateParams;import ai.llamaindex.llamacloud.models.parsing.ParsingCreateResponse;import ai.llamaindex.llamacloud.models.parsing.ParsingGetParams;import ai.llamaindex.llamacloud.models.parsing.ParsingGetResponse;import java.nio.file.Paths;
public class ParseQuickStart { public static void main(String[] args) throws Exception { LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv(); // Uses LLAMA_CLOUD_API_KEY env var
// Upload and parse a document FileCreateResponse file = client.files().create(FileCreateParams.builder() .file(Paths.get("document.pdf")) .purpose("parse") .build());
ParsingCreateResponse job = client.parsing().create(ParsingCreateParams.builder() .fileId(file.id()) .tier(ParsingCreateParams.Tier.AGENTIC) .version(ParsingCreateParams.Version.LATEST) .build());
// Poll until the job reaches a terminal state ParsingGetParams getParams = ParsingGetParams.builder() .jobId(job.id()) .addExpand("markdown") .build(); ParsingGetResponse result = client.parsing().get(getParams); while (result.job().status().equals(ParsingGetResponse.Job.Status.PENDING) || result.job().status().equals(ParsingGetResponse.Job.Status.RUNNING)) { Thread.sleep(2000); result = client.parsing().get(getParams); }
// Get markdown output System.out.println(result.markdown().get().pages().get(0).asMarkdownResult().markdown()); }}# Upload and parse a documentFILE_ID=$(llp files create --file document.pdf --purpose parse | jq -r '.id')JOB_ID=$(llp parsing create --file-id "$FILE_ID" --tier agentic --version latest | jq -r '.id')
# Poll until the job reaches a terminal statewhile true; do STATUS=$(llp parsing get --job-id "$JOB_ID" | jq -r '.job.status') case "$STATUS" in COMPLETED|FAILED|CANCELLED) break ;; esac sleep 2done
# Get markdown outputllp parsing get --job-id "$JOB_ID" --expand markdown | jq -r '.markdown.pages[0].markdown'Structured data from documents with custom schemas. Feed agents with clean entities, tables, and fields.
from pydantic import BaseModel, Fieldfrom llama_cloud import LlamaCloud
# Define your schemaclass Resume(BaseModel): name: str = Field(description="Full name of candidate") email: str = Field(description="Email address") skills: list[str] = Field(description="Technical skills")
client = LlamaCloud()
# Upload and extractfile = client.files.create(file="resume.pdf", purpose="extract")job = client.extract.run( file_input=file.id, configuration={ "data_schema": Resume.model_json_schema(), "tier": "agentic", },)print(job.extract_result)import LlamaCloud from '@llamaindex/llama-cloud';import { z } from 'zod';import fs from 'fs';
// Define your schema with Zodconst ResumeSchema = z.object({ name: z.string().describe('Full name of candidate'), email: z.string().describe('Email address'), skills: z.array(z.string()).describe('Technical skills'),});
const client = new LlamaCloud();
// Upload and extractconst file = await client.files.create({ file: fs.createReadStream('resume.pdf'), purpose: 'extract',});let job = await client.extract.run({ file_input: file.id, configuration: { data_schema: z.toJSONSchema(ResumeSchema), tier: 'agentic', },});console.log(job.extract_result);package main
import ( "context" "fmt" "log" "os" "time"
llamacloud "github.com/run-llama/llama-parse-go")
func main() { ctx := context.Background() client := llamacloud.NewClient()
// Define your schema dataSchema := map[string]*llamacloud.ExtractConfigurationDataSchemaUnionParam{ "type": {OfString: llamacloud.String("object")}, "properties": {OfAnyMap: map[string]any{ "name": map[string]any{"type": "string", "description": "Full name of candidate"}, "email": map[string]any{"type": "string", "description": "Email address"}, "skills": map[string]any{ "type": "array", "items": map[string]any{"type": "string"}, "description": "Technical skills", }, }}, }
// Upload and extract f, err := os.Open("resume.pdf") if err != nil { log.Fatal(err) } defer f.Close()
file, err := client.Files.New(ctx, llamacloud.FileNewParams{ File: f, Purpose: "extract", }) if err != nil { log.Fatal(err) }
job, err := client.Extract.New(ctx, llamacloud.ExtractNewParams{ ExtractV2JobCreate: llamacloud.ExtractV2JobCreateParam{ FileInput: file.ID, Configuration: llamacloud.ExtractConfigurationParam{ DataSchema: dataSchema, Tier: llamacloud.ExtractConfigurationTierAgentic, }, }, }) if err != nil { log.Fatal(err) }
// Poll until the job reaches a terminal state for job.Status == "PENDING" || job.Status == "RUNNING" { time.Sleep(2 * time.Second) job, err = client.Extract.Get(ctx, job.ID, llamacloud.ExtractGetParams{}) if err != nil { log.Fatal(err) } }
fmt.Println(job.ExtractResult.RawJSON())}import ai.llamaindex.llamacloud.client.LlamaCloudClient;import ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;import ai.llamaindex.llamacloud.core.JsonValue;import ai.llamaindex.llamacloud.models.extract.ExtractConfiguration;import ai.llamaindex.llamacloud.models.extract.ExtractCreateParams;import ai.llamaindex.llamacloud.models.extract.ExtractGetParams;import ai.llamaindex.llamacloud.models.extract.ExtractV2Job;import ai.llamaindex.llamacloud.models.extract.ExtractV2JobCreate;import ai.llamaindex.llamacloud.models.files.FileCreateParams;import ai.llamaindex.llamacloud.models.files.FileCreateResponse;import java.nio.file.Paths;import java.util.Map;
public class ExtractQuickStart { public static void main(String[] args) throws Exception { LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();
// Define your schema ExtractConfiguration.DataSchema dataSchema = ExtractConfiguration.DataSchema.builder() .putAdditionalProperty("type", JsonValue.from("object")) .putAdditionalProperty("properties", JsonValue.from(Map.of( "name", Map.of("type", "string", "description", "Full name of candidate"), "email", Map.of("type", "string", "description", "Email address"), "skills", Map.of("type", "array", "items", Map.of("type", "string"), "description", "Technical skills")))) .build();
// Upload and extract FileCreateResponse file = client.files().create(FileCreateParams.builder() .file(Paths.get("resume.pdf")) .purpose("extract") .build());
ExtractV2Job job = client.extract().create(ExtractCreateParams.builder() .extractV2JobCreate(ExtractV2JobCreate.builder() .fileInput(file.id()) .configuration(ExtractConfiguration.builder() .dataSchema(dataSchema) .tier(ExtractConfiguration.Tier.AGENTIC) .build()) .build()) .build());
// Poll until the job reaches a terminal state while (job.status().equals("PENDING") || job.status().equals("RUNNING")) { Thread.sleep(2000); job = client.extract().get(ExtractGetParams.builder().jobId(job.id()).build()); }
System.out.println(job.extractResult()); }}# Define your schemaSCHEMA='{type: object, properties: {name: {type: string, description: "Full name of candidate"}, email: {type: string, description: "Email address"}, skills: {type: array, items: {type: string}, description: "Technical skills"}}}'
# Upload and extractFILE_ID=$(llp files create --file resume.pdf --purpose extract | jq -r '.id')JOB_ID=$(llp extract create \ --file-input "$FILE_ID" \ --configuration.tier agentic \ --configuration.data-schema "$SCHEMA" | jq -r '.id')
# Poll until the job reaches a terminal statewhile true; do JOB=$(llp extract get --job-id "$JOB_ID") STATUS=$(echo "$JOB" | jq -r '.status') case "$STATUS" in COMPLETED|FAILED|CANCELLED) break ;; esac sleep 2done
echo "$JOB" | jq '.extract_result'Categorize documents with natural-language rules. Pre-processing for extraction, parsing, or indexing.
from llama_cloud import LlamaCloud
client = LlamaCloud()
# Upload a documentfile = client.files.create(file="document.pdf", purpose="classify")
# Classify with natural language rulesresult = client.classifier.classify( file_ids=[file.id], rules=[ { "type": "invoice", "description": "Documents with invoice numbers, line items, and totals" }, { "type": "receipt", "description": "Short POS receipts with merchant and total" }, { "type": "contract", "description": "Legal agreements with terms and signatures" }, ], mode="FAST", # or "MULTIMODAL" for visual docs)
for item in result.items: print(f"Type: {item.result.type}, Confidence: {item.result.confidence}")import LlamaCloud from '@llamaindex/llama-cloud';import fs from 'fs';
const client = new LlamaCloud();
// Upload a documentconst file = await client.files.create({ file: fs.createReadStream('document.pdf'), purpose: 'classify',});
// Classify with natural language rulesconst result = await client.classifier.classify({ file_ids: [file.id], rules: [ { type: 'invoice', description: 'Documents with invoice numbers, line items, and totals', }, { type: 'receipt', description: 'Short POS receipts with merchant and total', }, { type: 'contract', description: 'Legal agreements with terms and signatures', }, ], mode: 'FAST', // or 'MULTIMODAL' for visual docs});
for (const item of result.items) { if (item.result) { console.log(`Type: ${item.result.type}, Confidence: ${item.result.confidence}`); }}package main
import ( "context" "fmt" "log" "os" "time"
llamacloud "github.com/run-llama/llama-parse-go")
func main() { ctx := context.Background() client := llamacloud.NewClient()
// Upload a document f, err := os.Open("document.pdf") if err != nil { log.Fatal(err) } defer f.Close()
file, err := client.Files.New(ctx, llamacloud.FileNewParams{ File: f, Purpose: "classify", }) if err != nil { log.Fatal(err) }
// Classify with natural language rules job, err := client.Classifier.Jobs.New(ctx, llamacloud.ClassifierJobNewParams{ FileIDs: []string{file.ID}, Rules: []llamacloud.ClassifierRuleParam{ {Type: "invoice", Description: "Documents with invoice numbers, line items, and totals"}, {Type: "receipt", Description: "Short POS receipts with merchant and total"}, {Type: "contract", Description: "Legal agreements with terms and signatures"}, }, Mode: llamacloud.ClassifierJobNewParamsModeFast, // or Multimodal for visual docs }) if err != nil { log.Fatal(err) }
// Poll until the job reaches a terminal state for job.Status == llamacloud.StatusEnumPending { time.Sleep(2 * time.Second) job, err = client.Classifier.Jobs.Get(ctx, job.ID, llamacloud.ClassifierJobGetParams{}) if err != nil { log.Fatal(err) } }
result, err := client.Classifier.Jobs.GetResults(ctx, job.ID, llamacloud.ClassifierJobGetResultsParams{}) if err != nil { log.Fatal(err) } for _, item := range result.Items { fmt.Printf("Type: %s, Confidence: %v\n", item.Result.Type, item.Result.Confidence) }}import ai.llamaindex.llamacloud.client.LlamaCloudClient;import ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;import ai.llamaindex.llamacloud.models.classifier.jobs.ClassifierRule;import ai.llamaindex.llamacloud.models.classifier.jobs.ClassifyJob;import ai.llamaindex.llamacloud.models.classifier.jobs.JobCreateParams;import ai.llamaindex.llamacloud.models.classifier.jobs.JobGetResultsResponse;import ai.llamaindex.llamacloud.models.files.FileCreateParams;import ai.llamaindex.llamacloud.models.files.FileCreateResponse;import ai.llamaindex.llamacloud.models.parsing.StatusEnum;import java.nio.file.Paths;
public class ClassifyQuickStart { public static void main(String[] args) throws Exception { LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();
// Upload a document FileCreateResponse file = client.files().create(FileCreateParams.builder() .file(Paths.get("document.pdf")) .purpose("classify") .build());
// Classify with natural language rules ClassifyJob job = client.classifier().jobs().create(JobCreateParams.builder() .addFileId(file.id()) .addRule(ClassifierRule.builder() .type("invoice") .description("Documents with invoice numbers, line items, and totals") .build()) .addRule(ClassifierRule.builder() .type("receipt") .description("Short POS receipts with merchant and total") .build()) .addRule(ClassifierRule.builder() .type("contract") .description("Legal agreements with terms and signatures") .build()) .mode(JobCreateParams.Mode.FAST) // or MULTIMODAL for visual docs .build());
// Poll until the job reaches a terminal state while (job.status().equals(StatusEnum.PENDING)) { Thread.sleep(2000); job = client.classifier().jobs().get(job.id()); }
JobGetResultsResponse results = client.classifier().jobs().getResults(job.id()); for (JobGetResultsResponse.Item item : results.items()) { item.result().ifPresent(r -> System.out.println("Type: " + r.type().orElse("") + ", Confidence: " + r.confidence())); } }}# Upload a documentFILE_ID=$(llp files create --file document.pdf --purpose classify | jq -r '.id')
# Classify with natural language rulesJOB_ID=$(llp classifier:jobs create \ --file-id "$FILE_ID" \ --rule '{type: invoice, description: "Documents with invoice numbers, line items, and totals"}' \ --rule '{type: receipt, description: "Short POS receipts with merchant and total"}' \ --rule '{type: contract, description: "Legal agreements with terms and signatures"}' \ --mode FAST | jq -r '.id')
# Poll until the job reaches a terminal statewhile true; do STATUS=$(llp classifier:jobs get --classify-job-id "$JOB_ID" | jq -r '.status') [ "$STATUS" = "PENDING" ] || break sleep 2done
llp classifier:jobs get-results --classify-job-id "$JOB_ID" | jq -r '.items[].result | .type, .confidence'Segment concatenated PDFs into logical sections. AI-powered classification to split combined documents.
from llama_cloud import LlamaCloud
client = LlamaCloud()
# Upload a combined PDFfile = client.files.create(file="combined.pdf", purpose="split")
# Split into logical sectionsresult = await client.beta.split.split( categories=[ { "name": "invoice", "description": "Commercial document with line items and totals" }, { "name": "contract", "description": "Legal agreement with terms and signatures" }, ], document_input={"type": "file_id", "value": file.id},)
for segment in result.result.segments: print(f"Pages {segment.pages}: {segment.category} ({segment.confidence_category})")import LlamaCloud from '@llamaindex/llama-cloud';import fs from 'fs';
const client = new LlamaCloud();
// Upload a combined PDFconst file = await client.files.create({ file: fs.createReadStream('combined.pdf'), purpose: 'split',});
// Split into logical sectionsconst result = await client.beta.split.split({ categories: [ { name: 'invoice', description: 'Commercial document with line items and totals', }, { name: 'contract', description: 'Legal agreement with terms and signatures', }, ], document_input: { type: 'file_id', value: file.id },});
for (const segment of result.result.segments) { console.log(`Pages ${segment.pages}: ${segment.category} (${segment.confidence_category})`);}package main
import ( "context" "fmt" "log" "os" "time"
llamacloud "github.com/run-llama/llama-parse-go")
func main() { ctx := context.Background() client := llamacloud.NewClient()
// Upload a combined PDF f, err := os.Open("combined.pdf") if err != nil { log.Fatal(err) } defer f.Close()
file, err := client.Files.New(ctx, llamacloud.FileNewParams{ File: f, Purpose: "split", }) if err != nil { log.Fatal(err) }
// Split into logical sections job, err := client.Beta.Split.New(ctx, llamacloud.BetaSplitNewParams{ DocumentInput: llamacloud.SplitDocumentInputParam{Type: "file_id", Value: file.ID}, Configuration: llamacloud.BetaSplitNewParamsConfiguration{ Categories: []llamacloud.SplitCategoryParam{ {Name: "invoice", Description: llamacloud.String("Commercial document with line items and totals")}, {Name: "contract", Description: llamacloud.String("Legal agreement with terms and signatures")}, }, }, }) if err != nil { log.Fatal(err) }
// Poll until the job reaches a terminal state (Split statuses are lowercase) result, err := client.Beta.Split.Get(ctx, job.ID, llamacloud.BetaSplitGetParams{}) if err != nil { log.Fatal(err) } for result.Status == "pending" || result.Status == "processing" { time.Sleep(2 * time.Second) result, err = client.Beta.Split.Get(ctx, job.ID, llamacloud.BetaSplitGetParams{}) if err != nil { log.Fatal(err) } }
for _, segment := range result.Result.Segments { fmt.Printf("Pages %v: %s (%s)\n", segment.Pages, segment.Category, segment.ConfidenceCategory) }}import ai.llamaindex.llamacloud.client.LlamaCloudClient;import ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;import ai.llamaindex.llamacloud.models.beta.split.SplitCategory;import ai.llamaindex.llamacloud.models.beta.split.SplitCreateParams;import ai.llamaindex.llamacloud.models.beta.split.SplitCreateResponse;import ai.llamaindex.llamacloud.models.beta.split.SplitDocumentInput;import ai.llamaindex.llamacloud.models.beta.split.SplitGetResponse;import ai.llamaindex.llamacloud.models.beta.split.SplitSegmentResponse;import ai.llamaindex.llamacloud.models.files.FileCreateParams;import ai.llamaindex.llamacloud.models.files.FileCreateResponse;import java.nio.file.Paths;
public class SplitQuickStart { public static void main(String[] args) throws Exception { LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();
// Upload a combined PDF FileCreateResponse file = client.files().create(FileCreateParams.builder() .file(Paths.get("combined.pdf")) .purpose("split") .build());
// Split into logical sections SplitCreateResponse job = client.beta().split().create(SplitCreateParams.builder() .documentInput(SplitDocumentInput.builder().type("file_id").value(file.id()).build()) .configuration(SplitCreateParams.Configuration.builder() .addCategory(SplitCategory.builder() .name("invoice") .description("Commercial document with line items and totals") .build()) .addCategory(SplitCategory.builder() .name("contract") .description("Legal agreement with terms and signatures") .build()) .build()) .build());
// Poll until the job reaches a terminal state (Split statuses are lowercase) SplitGetResponse result = client.beta().split().get(job.id()); while (result.status().equals("pending") || result.status().equals("processing")) { Thread.sleep(2000); result = client.beta().split().get(job.id()); }
for (SplitSegmentResponse segment : result.result().get().segments()) { System.out.println("Pages " + segment.pages() + ": " + segment.category() + " (" + segment.confidenceCategory() + ")"); } }}# Upload a combined PDFFILE_ID=$(llp files create --file combined.pdf --purpose split | jq -r '.id')
# Split into logical sectionsJOB_ID=$(llp beta:split create \ --document-input "{type: file_id, value: $FILE_ID}" \ --configuration '{categories: [{name: invoice, description: "Commercial document with line items and totals"}, {name: contract, description: "Legal agreement with terms and signatures"}]}' \ | jq -r '.id')
# Poll until the job reaches a terminal state (Split statuses are lowercase)while true; do STATUS=$(llp beta:split get --split-job-id "$JOB_ID" | jq -r '.status') case "$STATUS" in completed|failed|cancelled) break ;; esac sleep 2done
llp beta:split get --split-job-id "$JOB_ID" | jq -c '.result.segments[]'Extract tables and metadata from messy spreadsheets. Output as Parquet files with rich cell metadata.
from llama_cloud import LlamaCloud
client = LlamaCloud()
# Upload a spreadsheetfile = client.files.create(file="spreadsheet.xlsx", purpose="parse")
# Extract tables and regionsresult = client.beta.sheets.parse( file_id=file.id, config={"generate_additional_metadata": True},)
# Print extracted regionsprint(f"Found {len(result.regions)} regions")for region in result.regions: print(f" - {region.region_id}: {region.title} ({region.location})")import LlamaCloud from '@llamaindex/llama-cloud';import fs from 'fs';
const client = new LlamaCloud();
// Upload a spreadsheetconst file = await client.files.create({ file: fs.createReadStream('spreadsheet.xlsx'), purpose: 'parse',});
// Extract tables and regionsconst result = await client.beta.sheets.parse({ file_id: file.id, config: { generate_additional_metadata: true },});
// Print extracted regionsconsole.log(`Found ${result.regions?.length || 0} regions`);for (const region of result.regions || []) { console.log(` - ${region.region_id}: ${region.title} (${region.location})`);}package main
import ( "context" "fmt" "log" "os" "time"
llamacloud "github.com/run-llama/llama-parse-go")
func main() { ctx := context.Background() client := llamacloud.NewClient()
// Upload a spreadsheet f, err := os.Open("spreadsheet.xlsx") if err != nil { log.Fatal(err) } defer f.Close()
file, err := client.Files.New(ctx, llamacloud.FileNewParams{ File: f, Purpose: "parse", }) if err != nil { log.Fatal(err) }
// Extract tables and regions job, err := client.Beta.Sheets.New(ctx, llamacloud.BetaSheetNewParams{ FileID: file.ID, Config: llamacloud.SheetsParsingConfigParam{ GenerateAdditionalMetadata: llamacloud.Bool(true), }, }) if err != nil { log.Fatal(err) }
// Poll until the job reaches a terminal state getParams := llamacloud.BetaSheetGetParams{IncludeResults: llamacloud.Bool(true)} result, err := client.Beta.Sheets.Get(ctx, job.ID, getParams) if err != nil { log.Fatal(err) } for result.Status == llamacloud.SheetsJobStatusPending { time.Sleep(3 * time.Second) result, err = client.Beta.Sheets.Get(ctx, job.ID, getParams) if err != nil { log.Fatal(err) } }
// Print extracted regions fmt.Printf("Found %d regions\n", len(result.Regions)) for _, region := range result.Regions { fmt.Printf(" - %s: %s (%s)\n", region.RegionID, region.Title, region.Location) }}import ai.llamaindex.llamacloud.client.LlamaCloudClient;import ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;import ai.llamaindex.llamacloud.models.beta.sheets.SheetCreateParams;import ai.llamaindex.llamacloud.models.beta.sheets.SheetGetParams;import ai.llamaindex.llamacloud.models.beta.sheets.SheetsJob;import ai.llamaindex.llamacloud.models.beta.sheets.SheetsParsingConfig;import ai.llamaindex.llamacloud.models.files.FileCreateParams;import ai.llamaindex.llamacloud.models.files.FileCreateResponse;import java.nio.file.Paths;import java.util.List;
public class SheetsQuickStart { public static void main(String[] args) throws Exception { LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();
// Upload a spreadsheet FileCreateResponse file = client.files().create(FileCreateParams.builder() .file(Paths.get("spreadsheet.xlsx")) .purpose("parse") .build());
// Extract tables and regions SheetsJob job = client.beta().sheets().create(SheetCreateParams.builder() .fileId(file.id()) .configuration(SheetsParsingConfig.builder().generateAdditionalMetadata(true).build()) .build());
// Poll until the job reaches a terminal state SheetGetParams getParams = SheetGetParams.builder() .spreadsheetJobId(job.id()) .includeResults(true) .build(); SheetsJob result = client.beta().sheets().get(getParams); while (result.status().equals(SheetsJob.Status.PENDING)) { Thread.sleep(3000); result = client.beta().sheets().get(getParams); }
// Print extracted regions List<SheetsJob.Region> regions = result.regions().orElse(List.of()); System.out.println("Found " + regions.size() + " regions"); for (SheetsJob.Region region : regions) { System.out.println(" - " + region.regionId().orElse("") + ": " + region.title().orElse("") + " (" + region.location() + ")"); } }}# Upload a spreadsheetFILE_ID=$(llp files create --file spreadsheet.xlsx --purpose parse | jq -r '.id')
# Extract tables and regionsJOB_ID=$(llp beta:sheets create \ --file-id "$FILE_ID" \ --config '{generate_additional_metadata: true}' | jq -r '.id')
# Poll until the job reaches a terminal statewhile true; do STATUS=$(llp beta:sheets get --spreadsheet-job-id "$JOB_ID" | jq -r '.status') [ "$STATUS" = "PENDING" ] || break sleep 3done
# Print extracted regionsllp beta:sheets get --spreadsheet-job-id "$JOB_ID" --include-results \ | jq -r '.regions // [] | "Found \(length) regions", (.[] | " - \(.region_id): \(.title) (\(.location))")'Ingest, chunk, and embed into searchable indexes. Power RAG and retrieval for document agents. Index is designed for UI-first setup with SDK integration. Start in the LlamaCloud dashboard to create your index, then integrate:
from llama_cloud import LlamaCloud
client = LlamaCloud() # Uses LLAMA_CLOUD_API_KEY env var
# Retrieve relevant nodes from the indexresults = client.pipelines.retrieve( pipeline_id="your-pipeline-id", query="Your query here", # -- Customize search behavior -- # dense_similarity_top_k=20, # sparse_similarity_top_k=20, # alpha=0.5, # -- Control reranking behavior -- # enable_reranking=True, # rerank_top_n=5,)
for n in results.retrieval_nodes: print(f"Score: {n.score}, Text: {n.node.text}")import LlamaCloud from '@llamaindex/llama-cloud';
const client = new LlamaCloud(); // Uses LLAMA_CLOUD_API_KEY env var
// Retrieve relevant nodes from the indexconst results = await client.pipelines.retrieve('your-pipeline-id', { query: 'Your query here', // -- Customize search behavior -- // dense_similarity_top_k: 20, // sparse_similarity_top_k: 20, // alpha: 0.5, // -- Control reranking behavior -- // enable_reranking: true, // rerank_top_n: 5,});
for (const node of results.retrieval_nodes || []) { console.log(`Score: ${node.score}, Text: ${node.node?.text}`);}package main
import ( "context" "fmt" "log"
llamacloud "github.com/run-llama/llama-parse-go")
func main() { ctx := context.Background() client := llamacloud.NewClient() // Uses LLAMA_CLOUD_API_KEY env var
// Retrieve relevant nodes from the index results, err := client.Pipelines.RunSearch(ctx, "your-pipeline-id", llamacloud.PipelineRunSearchParams{ Query: "Your query here", // -- Customize search behavior -- // DenseSimilarityTopK: llamacloud.Int(20), // SparseSimilarityTopK: llamacloud.Int(20), // Alpha: llamacloud.Float(0.5), // -- Control reranking behavior -- // EnableReranking: llamacloud.Bool(true), // RerankTopN: llamacloud.Int(5), }) if err != nil { log.Fatal(err) }
for _, n := range results.RetrievalNodes { fmt.Printf("Score: %v, Text: %s\n", n.Score, n.Node.Text) }}import ai.llamaindex.llamacloud.client.LlamaCloudClient;import ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;import ai.llamaindex.llamacloud.models.pipelines.PipelineRetrieveParams;import ai.llamaindex.llamacloud.models.pipelines.PipelineRetrieveResponse;
public class IndexQuickStart { public static void main(String[] args) throws Exception { LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv(); // Uses LLAMA_CLOUD_API_KEY env var
// Retrieve relevant nodes from the index PipelineRetrieveResponse results = client.pipelines().retrieve( PipelineRetrieveParams.builder() .pipelineId("your-pipeline-id") .query("Your query here") // -- Customize search behavior -- // .denseSimilarityTopK(20) // .sparseSimilarityTopK(20) // .alpha(0.5) // -- Control reranking behavior -- // .enableReranking(true) // .rerankTopN(5) .build());
for (PipelineRetrieveResponse.RetrievalNode n : results.retrievalNodes()) { System.out.println("Score: " + n.score().orElse(null) + ", Text: " + n.node().text().orElse("")); } }}# Retrieve relevant nodes from the indexllp pipelines run-search \ --pipeline-id "your-pipeline-id" \ --query "Your query here" \ | jq -c '.retrieval_nodes[] | {score, text: .node.text}'
# Customize search behavior with --dense-similarity-top-k, --sparse-similarity-top-k,# --alpha, and control reranking with --enable-reranking and --rerank-top-n.LlamaParse Agent Skills
Section titled “LlamaParse Agent Skills”Download Skills
Available Skills
Section titled “Available Skills”- llamaparse: Advanced parsing for PDFs, docs, presentations and images (charts, tables, embedded visuals). Requires
LLAMA_CLOUD_API_KEYand Node 18+. - liteparse: Local-first, fast parsing for text-dense PDFs and docs. No API key needed, requires
@llamaindex/liteparseglobally installed and Node 18+.
Installation
Section titled “Installation”You can install LlamaParse Agent Skills using the skills CLI:
npx skills add run-llama/llamaparse-agent-skillsOr, if you wish to download only one skill:
npx skills add run-llama/llamaparse-agent-skills --skill llamaparse # or the name of another skillYou can also download the skills folder in .zip format from GitHub Releases.