> ## Documentation Index
> Fetch the complete documentation index at: https://veniceai-mintlify-86b9f77a.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Document Processing

> Extract text and token counts from PDF, DOCX, PPTX, XLSX, and plain text files up to 25 MB with the Venice Text Parser API, no inference needed.

The Text Parser API extracts text from a document without running model inference. Use it when your application needs to inspect, store, index, or reuse document content before sending it to a model.

Supported inputs include PDF, DOCX, PPTX, XLSX, and plain text files up to 25 MB.

## Parse a Document

Upload the file as `multipart/form-data`:

```bash theme={null}
curl https://api.venice.ai/api/v1/augment/text-parser \
  -H "Authorization: Bearer $VENICE_API_KEY" \
  -F "file=@document.pdf" \
  -F "response_format=json"
```

The default `json` response format returns the extracted text and its token count. Use `response_format=text` when you only need the extracted text.

## Text Parser or Chat File Input?

Both features extract document content, but they serve different workflows:

| Need                                         | Use                                             |
| -------------------------------------------- | ----------------------------------------------- |
| Ask a model about a document immediately     | [Chat file input](/guides/features/file-inputs) |
| Extract text without inference               | Text Parser                                     |
| Check token count before choosing a model    | Text Parser                                     |
| Store, index, or reuse extracted content     | Text Parser                                     |
| Use the same document across several prompts | Text Parser                                     |

## Typical Pipeline

<Steps>
  <Step title="Parse the file">
    Upload the source document and request a JSON response.
  </Step>

  <Step title="Inspect the output">
    Check the token count against the target model's context window. Trim or split large documents before inference.
  </Step>

  <Step title="Use the text">
    Add it to a chat prompt, generate embeddings for retrieval, or save it in your own data store.
  </Step>
</Steps>

<Info>
  Parsing runs in memory with zero data retention. Venice processes the uploaded document and immediately discards it without storing or logging its content.
</Info>

<Warning>
  The Text Parser API is experimental. Its request and response format may change without notice.
</Warning>

## Turning the Text into Records

Extracted text is a starting point rather than a result. [Extracting Structured Data from Documents](/guides/tools/document-extraction) continues from here: pinning the output to a JSON schema so every document produces the same fields, and switching to a vision model when the parser reports that a file has no text to extract.

## Related Resources

* [Extracting Structured Data from Documents](/guides/tools/document-extraction)
* [Text Parser API Reference](/api-reference/endpoint/augment/text-parser)
* [File Inputs](/guides/features/file-inputs)
* [Embeddings](/guides/features/embeddings)
* [Text Models](/models/text)
