{"id":38079700,"url":"https://github.com/run-llama/llama-cloud-ts","last_synced_at":"2026-04-08T00:03:13.816Z","repository":{"id":332715062,"uuid":"1091334307","full_name":"run-llama/llama-cloud-ts","owner":"run-llama","description":"Typescript SDK for OCR and document parsing in the cloud with LlamaParse","archived":false,"fork":false,"pushed_at":"2026-04-02T21:03:26.000Z","size":2386,"stargazers_count":7,"open_issues_count":3,"forks_count":3,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-03T06:49:03.573Z","etag":null,"topics":["agent","agents","document-agent","document-processing","information-extraction","llamaparse","ocr","parser"],"latest_commit_sha":null,"homepage":"https://cloud.llamaindex.ai/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/run-llama.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-06T21:59:46.000Z","updated_at":"2026-04-01T17:46:54.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/run-llama/llama-cloud-ts","commit_stats":null,"previous_names":["run-llama/llama-cloud-ts"],"tags_count":34,"template":false,"template_full_name":null,"purl":"pkg:github/run-llama/llama-cloud-ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/run-llama%2Fllama-cloud-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/run-llama%2Fllama-cloud-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/run-llama%2Fllama-cloud-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/run-llama%2Fllama-cloud-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/run-llama","download_url":"https://codeload.github.com/run-llama/llama-cloud-ts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/run-llama%2Fllama-cloud-ts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31533826,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","agents","document-agent","document-processing","information-extraction","llamaparse","ocr","parser"],"created_at":"2026-01-16T20:47:34.033Z","updated_at":"2026-04-08T00:03:13.798Z","avatar_url":"https://github.com/run-llama.png","language":"TypeScript","readme":"# Llama Cloud TypeScript SDK\n\n[![NPM version](\u003chttps://img.shields.io/npm/v/@llamaindex/llama-cloud.svg?label=npm%20(stable)\u003e)](https://npmjs.org/package/@llamaindex/llama-cloud) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@llamaindex/llama-cloud)\n\nThe official TypeScript SDK for [LlamaParse](https://cloud.llamaindex.ai) - the enterprise platform for agentic OCR and document processing.\n\nWith this SDK, create powerful workflows across many features:\n\n- **Parse** - Agentic OCR and parsing for 130+ formats\n- **Extract** - Structured data extraction with custom schemas\n- **Classify** - Document categorization with natural-language rules\n- **Agents** - Deploy document agents as APIs\n- **Index** - Document ingestion and embedding for RAG\n\n## Documentation\n\n- [Get an API Key](https://cloud.llamaindex.ai)\n- [Getting Started Guide](https://developers.llamaindex.ai/typescript/cloud/)\n- [Full API Reference](https://developers.api.llamaindex.ai/api/typescript)\n\n## Installation\n\n```sh\nnpm install @llamaindex/llama-cloud\n```\n\n## Quick Start\n\n```ts\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n  apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Parse a document\nconst job = await client.parsing.create({\n  tier: 'agentic',\n  version: 'latest',\n  file_id: 'your-file-id',\n});\n\nconsole.log(job.id);\n```\n\n## File Uploads\n\n```ts\nimport fs from 'fs';\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\n// Upload using a file stream\nawait client.files.create({\n  file: fs.createReadStream('/path/to/document.pdf'),\n  purpose: 'purpose',\n});\n\n// Or using a File object\nawait client.files.create({\n  file: new File(['content'], 'document.txt'),\n  purpose: 'purpose',\n});\n```\n\n## MCP Server\n\nUse the Llama Cloud MCP Server to enable AI assistants to interact with the API:\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40llamaindex%2Fllama-cloud-mcp\u0026config=eyJuYW1lIjoiQGxsYW1haW5kZXgvbGxhbWEtY2xvdWQtbWNwIiwidHJhbnNwb3J0IjoiaHR0cCIsInVybCI6Imh0dHBzOi8vbGxhbWFjbG91ZC1wcm9kLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IngtbGxhbWEtY2xvdWQtYXBpLWtleSI6Ik15IEFQSSBLZXkifX0)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge\u0026logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40llamaindex%2Fllama-cloud-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fllamacloud-prod.stlmcp.com%22%2C%22headers%22%3A%7B%22x-llama-cloud-api-key%22%3A%22My%20API%20Key%22%7D%7D)\n\n## Error Handling\n\nWhen the API returns a non-success status code, an `APIError` subclass is thrown:\n\n```ts\nawait client.pipelines.list({ project_id: 'my-project-id' }).catch((err) =\u003e {\n  if (err instanceof LlamaCloud.APIError) {\n    console.log(err.status); // 400\n    console.log(err.name); // BadRequestError\n  }\n});\n```\n\n| Status Code | Error Type                 |\n| ----------- | -------------------------- |\n| 400         | `BadRequestError`          |\n| 401         | `AuthenticationError`      |\n| 403         | `PermissionDeniedError`    |\n| 404         | `NotFoundError`            |\n| 422         | `UnprocessableEntityError` |\n| 429         | `RateLimitError`           |\n| \u003e=500       | `InternalServerError`      |\n| N/A         | `APIConnectionError`       |\n\n## Retries and Timeouts\n\nThe SDK automatically retries requests 2 times on connection errors, timeouts, rate limits, and 5xx errors. Requests timeout after 1 minute by default. Functions that combine multiple API calls (e.g. `client.parsing.parse()`) will have larger timeouts by default to account for the multiple requests and polling.\n\n```ts\nconst client = new LlamaCloud({\n  maxRetries: 0, // Disable retries (default: 2)\n  timeout: 30 * 1000, // 30 second timeout (default: 1 minute)\n});\n```\n\n## Pagination\n\nList methods support auto-pagination with `for await...of`:\n\n```ts\nasync function fetchAllExtractV2Jobs(params) {\n  const allExtractV2Jobs = [];\n  // Automatically fetches more pages as needed.\n  for await (const extractV2Job of client.extract.list({ page_size: 20 })) {\n    allExtractV2Jobs.push(extractV2Job);\n  }\n  return allExtractV2Jobs;\n}\n```\n\nOr fetch one page at a time:\n\n```ts\nlet page = await client.extract.list({ page_size: 20 });\nfor (const extractV2Job of page.items) {\n  console.log(extractV2Job);\n}\n\nwhile (page.hasNextPage()) {\n  page = await page.getNextPage();\n}\n```\n\n## Logging\n\nConfigure logging via the `LLAMA_CLOUD_LOG` environment variable or the `logLevel` option:\n\n```ts\nconst client = new LlamaCloud({\n  logLevel: 'debug', // 'debug' | 'info' | 'warn' | 'error' | 'off'\n});\n```\n\n## Requirements\n\n- TypeScript \u003e= 4.9\n- Node.js 20+, Deno 1.28+, Bun 1.0+, or modern browsers\n\n## Contributing\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frun-llama%2Fllama-cloud-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frun-llama%2Fllama-cloud-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frun-llama%2Fllama-cloud-ts/lists"}