# Aryn

Aryn is an AI-powered platform for document parsing, data extraction, and analytics, enabling users to process and query unstructured documents at scale.

- **Category:** ai document extraction
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 9
- **Triggers:** 0
- **Slug:** `ARYN`
- **Version:** 20260307_00

## Tools

### Create DocSet

**Slug:** `ARYN_CREATE_DOCSET`

Tool to create a new DocSet. Use when you need to allocate a storage container before adding documents.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | String name for the DocSet |
| `schema` | object | No | Optional schema object defining document properties |
| `prompts` | object | No | Optional dictionary of prompts for the DocSet |
| `properties` | object | No | Optional dictionary of additional properties |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete DocSet

**Slug:** `ARYN_DELETE_DOCSET`

Tool to delete a DocSet and all its documents. Use after confirming the DocSet ID, when you need to permanently remove a DocSet and its contents.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `docset_id` | string | Yes | The unique identifier of the DocSet to delete. Format is typically 'aryn:ds-xxxxx' where xxxxx is an alphanumeric string. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Generate plan

**Slug:** `ARYN_GENERATE_PLAN`

Tool to generate a query plan without executing it. Use when you need to review the logical plan before running your query (e.g., "Generate a plan for revenue breakdown by region").

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | string | Yes | Natural language query string to generate a plan for. The query will be converted into a logical execution plan with operators. |
| `rag_mode` | boolean | No | If true, the query will generate only a RAG (Retrieval Augmented Generation) query plan instead of a full analytics plan. |
| `docset_id` | string | Yes | The unique identifier of the DocSet to query. Format: 'aryn:ds-{id}'. Find DocSet IDs in the Aryn UI or via the list docsets API. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get DocSet Metadata

**Slug:** `ARYN_GET_DOC_SET`

Tool to retrieve metadata for a specific DocSet by its ID. Use when you need to check DocSet details like name, creation time, properties, or prompts.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `docsetId` | string | Yes | Unique identifier of the DocSet to retrieve. Format: 'aryn:ds-<alphanumeric>'. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Document by ID

**Slug:** `ARYN_GET_DOCUMENT`

Retrieve a document by ID from Aryn DocParse storage. Returns the document's parsed elements (text, tables, sections with embeddings), custom properties, and optionally the original binary content. Use this after obtaining a docset_id and doc_id from other Aryn actions (e.g., list_docs or add_doc).

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `doc_id` | string | Yes | The unique identifier of the document to retrieve. Format: 'aryn:f-xxxxxxxxxxxxxxxxxxxx'. |
| `docset_id` | string | Yes | The unique identifier of the DocSet containing the document. Format: 'aryn:ds-xxxxxxxxxxxxxxxxxxxx'. |
| `include_binary` | boolean | No | When true, includes the base64-encoded original document binary data. Set to true only if you need the raw file content. |
| `include_elements` | boolean | No | When true, includes parsed document elements (sections, tables, text blocks, etc.) with their embeddings and text representations. Set to false if you only need document metadata. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Download Document Binary

**Slug:** `ARYN_GET_DOCUMENT_BINARY`

Download the original binary content (e.g., PDF, image) of a document from an Aryn DocSet. This action retrieves the raw binary file that was originally uploaded to the DocSet. Use this when you need to access the original document file rather than the parsed elements or extracted text.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `docsetId` | string | Yes | The unique identifier of the DocSet containing the document. Format: 'aryn:ds-<alphanumeric_id>' (e.g., 'aryn:ds-n1uckj87hwf2d95kwr5gsh1'). |
| `documentId` | string | Yes | The unique identifier of the document to download. Format: 'aryn:f-<alphanumeric_id>' (e.g., 'aryn:f-8dkwobf4oihjlhz7koqlqfr'). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Async Tasks

**Slug:** `ARYN_LIST_ASYNC_TASKS`

Tool to list all outstanding asynchronous tasks for the account. Use when you need to check pending or running tasks.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Partition Document

**Slug:** `ARYN_PARTITION_DOCUMENT`

Partition a document using Aryn DocParse to extract and structure its content elements including text, tables, and images. Supports file upload or URL input with extensive processing options for chunking, OCR, table extraction, image extraction, and multiple output formats. Use when you need to extract structured content from PDFs or other document formats.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `file` | object | No | File to partition. Either file or file_url must be provided. |
| `options` | object | No | Comprehensive options for document partitioning |
| `file_url` | string | No | URL of the file to partition. Either file or file_url must be provided. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Submit Document for Async Add Doc

**Slug:** `ARYN_SUBMIT_ASYNC_ADD_DOC`

Tool to submit a document for asynchronous addition to a DocSet. Returns a task ID to track the operation. Use when you need to add documents to an existing DocSet and want to track the processing status.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `file` | object | No | The file to upload to the Aryn platform. Either 'file' or 'file_url' must be provided, but not both. |
| `options` | string | No | DocParse options to use during partitioning, provided as a JSON string. |
| `file_url` | string | No | URL of the file to add to the Aryn platform. Either 'file' or 'file_url' must be provided, but not both. |
| `docset_id` | string | Yes | The unique identifier of the docset to which to add the document. Format: 'aryn:ds-<alphanumeric>'. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
