---
title: LlamaParse Platform Quickstart | Developer Documentation
description: Install the SDK, get an API key, and run your first call against Parse, Extract, Classify, Split, 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 five composable products: **Parse** (agentic OCR), **Extract** (structured data), **Classify**, **Split**, and **Index**.

Using a coding agent?

Give your AI agent access to these docs: `claude mcp add llama-index-docs --transport http https://developers.llamaindex.ai/mcp` — or supercharge your agent with LlamaParse [MCP tools and Skills](/for-agents/index.md).

## Install

- [Python](#tab-panel-1121)
- [TypeScript](#tab-panel-1122)
- [Go](#tab-panel-1123)
- [Java](#tab-panel-1124)
- [CLI](#tab-panel-1125)

Terminal window

```
pip install llama-cloud>=2.8
```

Terminal window

```
npm install @llamaindex/llama-cloud
```

Terminal window

```
go get github.com/run-llama/llama-parse-go
```

```
implementation("ai.llamaindex:llama-cloud:1.3.0")
```

Terminal window

```
go install github.com/run-llama/llama-parse-cli/cmd/llp@latest
```

Set your API key:

Terminal window

```
export LLAMA_CLOUD_API_KEY=llx-...
```

[Get an API key](general/api_key) from the [LlamaCloud dashboard](https://cloud.llamaindex.ai).

---

## 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](parse/)**                                 |
| Pull structured JSON out of documents that matches my schema                                                                              | **[Extract](extract/)**                             |
| Route documents into categories with natural-language rules                                                                               | **[Classify](classify/)**                           |
| Split concatenated documents into their logical parts                                                                                     | **[Split](split/)**                                 |
| Build a hosted vector search pipeline for RAG                                                                                             | **[Index](deprecated/cloud-index/getting_started)** |
| 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

- [Parse](#tab-panel-1126)
- [Extract](#tab-panel-1127)
- [Classify](#tab-panel-1128)
- [Split](#tab-panel-1129)
- [Index](#tab-panel-1130)

Agentic OCR and parsing for 130+ formats. Turn PDFs and scans into LLM-ready text—the foundation for document agents.

Python (python)

Copy as agent context

```
from llama_cloud import LlamaCloud


client = LlamaCloud()  # Uses LLAMA_CLOUD_API_KEY env var


# Upload and parse a document
file = client.files.create(file="document.pdf", purpose="parse")
result = client.parsing.parse(
    file_id=file.id,
    tier="agentic",
    version="latest",
    expand=["markdown"],
)


# Get markdown output
print(result.markdown.pages[0].markdown)
```

Copy as agent context

```
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 document
const 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 output
console.log(result.markdown.pages[0].markdown);
```

Copy as agent context

```
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)
}
```

Copy as agent context

```
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());
    }
}
```

Copy as agent context

Terminal window

```
# Upload and parse a document
FILE_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 state
while true; do
  STATUS=$(llp parsing get --job-id "$JOB_ID" | jq -r '.job.status')
  case "$STATUS" in COMPLETED|FAILED|CANCELLED) break ;; esac
  sleep 2
done


# Get markdown output
llp parsing get --job-id "$JOB_ID" --expand markdown | jq -r '.markdown.pages[0].markdown'
```

[Full Guide](parse/getting_started/) | [Examples](parse/examples/) | [Tiers & Pricing](parse/guides/tiers/)

Structured data from documents with custom schemas. Feed agents with clean entities, tables, and fields.

Python (python)

Copy as agent context

```
from pydantic import BaseModel, Field
from llama_cloud import LlamaCloud


# Define your schema
class 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 extract
file = 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)
```

Copy as agent context

```
import LlamaCloud from '@llamaindex/llama-cloud';
import { z } from 'zod';
import fs from 'fs';


// Define your schema with Zod
const 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 extract
const 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);
```

Copy as agent context

```
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())
}
```

Copy as agent context

```
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());
    }
}
```

Copy as agent context

Terminal window

```
# Define your schema
SCHEMA='{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 extract
FILE_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 state
while 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 2
done


echo "$JOB" | jq '.extract_result'
```

[Full Guide](extract/sdk/) | [Examples](extract/examples/) | [Configuring Extract](extract/guides/configuring-extract/)

Categorize documents with natural-language rules. Pre-processing for extraction, parsing, or indexing.

Python (python)

Copy as agent context

```
from llama_cloud import LlamaCloud


client = LlamaCloud()


# Upload a document
file = client.files.create(file="document.pdf", purpose="classify")


# Classify with natural language rules
result = 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}")
```

Copy as agent context

```
import LlamaCloud from '@llamaindex/llama-cloud';
import fs from 'fs';


const client = new LlamaCloud();


// Upload a document
const file = await client.files.create({
  file: fs.createReadStream('document.pdf'),
  purpose: 'classify',
});


// Classify with natural language rules
const 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}`);
  }
}
```

Copy as agent context

```
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)
  }
}
```

Copy as agent context

```
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()));
        }
    }
}
```

Copy as agent context

Terminal window

```
# Upload a document
FILE_ID=$(llp files create --file document.pdf --purpose classify | jq -r '.id')


# Classify with natural language rules
JOB_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 state
while true; do
  STATUS=$(llp classifier:jobs get --classify-job-id "$JOB_ID" | jq -r '.status')
  [ "$STATUS" = "PENDING" ] || break
  sleep 2
done


llp classifier:jobs get-results --classify-job-id "$JOB_ID" | jq -r '.items[].result | .type, .confidence'
```

[Full Guide](classify/sdk/) | [Examples](classify/examples/)

Segment concatenated PDFs into logical sections. AI-powered classification to split combined documents.

Python (python)

Copy as agent context

```
import time


from llama_cloud import LlamaCloud


client = LlamaCloud()


# Upload a combined PDF
file = client.files.create(file="combined.pdf", purpose="split")


# Split into logical sections
job = client.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"
            },
        ]
    },
)


# Poll until the job reaches a terminal state (Split statuses are lowercase)
result = client.beta.split.get(job.id)
while result.status in ("pending", "processing"):
    time.sleep(2)
    result = client.beta.split.get(job.id)


for segment in result.result.segments:
    print(f"Pages {segment.pages}: {segment.category} ({segment.confidence_category})")
```

Copy as agent context

```
import LlamaCloud from '@llamaindex/llama-cloud';
import fs from 'fs';


const client = new LlamaCloud();


// Upload a combined PDF
const file = await client.files.create({
  file: fs.createReadStream('combined.pdf'),
  purpose: 'split',
});


// Split into logical sections
const job = await client.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',
      },
    ],
  },
});


// Poll until the job reaches a terminal state (Split statuses are lowercase)
let result = await client.beta.split.get(job.id);
while (result.status === 'pending' || result.status === 'processing') {
  await new Promise((resolve) => setTimeout(resolve, 2000));
  result = await client.beta.split.get(job.id);
}


for (const segment of result.result.segments) {
  console.log(`Pages ${segment.pages}: ${segment.category} (${segment.confidence_category})`);
}
```

Copy as agent context

```
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)
  }
}
```

Copy as agent context

```
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() + ")");
        }
    }
}
```

Copy as agent context

Terminal window

```
# Upload a combined PDF
FILE_ID=$(llp files create --file combined.pdf --purpose split | jq -r '.id')


# Split into logical sections
JOB_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 2
done


llp beta:split get --split-job-id "$JOB_ID" | jq -c '.result.segments[]'
```

[Full Guide](split/getting_started/) | [Examples](split/examples/)

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:

Python (python)

Copy as agent context

```
from llama_cloud import LlamaCloud


client = LlamaCloud()  # Uses LLAMA_CLOUD_API_KEY env var


# Retrieve relevant nodes from the index
results = 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}")
```

Copy as agent context

```
import LlamaCloud from '@llamaindex/llama-cloud';


const client = new LlamaCloud(); // Uses LLAMA_CLOUD_API_KEY env var


// Retrieve relevant nodes from the index
const 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}`);
}
```

Copy as agent context

```
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)
  }
}
```

Copy as agent context

```
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(""));
        }
    }
}
```

Copy as agent context

Terminal window

```
# Retrieve relevant nodes from the index
llp 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.
```

[Full Guide](deprecated/cloud-index/getting_started/) | [Examples](deprecated/cloud-index/examples/)

---

## LlamaParse Agent Skills

[Download Skills](https://github.com/run-llama/llamaparse-agent-skills/releases/download/latest/skills-latest.zip)

### Available Skills

- **llamaparse**: Advanced parsing for PDFs, docs, presentations and images (charts, tables, embedded visuals). Requires `LLAMA_CLOUD_API_KEY` and Node 18+.
- **liteparse**: Local-first, fast parsing for text-dense PDFs and docs. No API key needed, requires `@llamaindex/liteparse` globally installed and Node 18+.

### Installation

Install both skills with the [`skills`](https://skills.sh) CLI:

Terminal window

```
npx skills add run-llama/llamaparse-agent-skills
```

For single-skill installs, the agent plugins that bundle these skills, and Codex setup, see [Skills and Plugins](/llamaparse/for-agents/skills/index.md).

---

## Resources

[Python SDK ](https://github.com/run-llama/llama-parse-py)pip install llama-cloud>=2.8

[TypeScript SDK ](https://github.com/run-llama/llama-cloud-ts)npm install @llamaindex/llama-cloud

[Go SDK ](https://github.com/run-llama/llama-parse-go)go get github.com/run-llama/llama-parse-go

[Java SDK ](https://github.com/run-llama/llama-parse-java)implementation("ai.llamaindex:llama-cloud:1.3.0")

[CLI ](https://github.com/run-llama/llama-parse-cli)go install github.com/run-llama/llama-parse-cli/cmd/llp\@latest
