> ## Documentation Index
> Fetch the complete documentation index at: https://docs.venice.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> The Venice API is OpenAI-compatible: use any OpenAI SDK with the base URL `https://api.venice.ai/api/v1` and a Venice API key, or pay per request from a USDC wallet through x402 with no account.
> Read model IDs from `GET /models` or `GET /models/traits` at runtime instead of hardcoding them from memory or from these pages. Models are added and retired often.
> Every model's price is in https://docs.venice.ai/pricing.md. Quote video and audio jobs with `POST /video/quote` or `POST /audio/quote` before you queue them.
> Search these docs from an MCP client at https://docs.venice.ai/mcp. The full agent guide is https://docs.venice.ai/agents.md.

# 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={"system"}
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](https://docs.venice.ai/guides/features/file-inputs.md) |
| 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

**1. Parse the file**

Upload the source document and request a JSON response.

**2. Inspect the output**

Check the token count against the target model's context window. Trim or split large documents before inference.

**3. Use the text**

Add it to a chat prompt, generate embeddings for retrieval, or save it in your own data store.

> [!NOTE]
>
> Parsing runs in memory with zero data retention. Venice processes the uploaded document and immediately discards it without storing or logging its content.

> [!WARNING]
>
> The Text Parser API is experimental. Its request and response format may change without notice.

## Turning the Text into Records

Extracted text is a starting point rather than a result. [Extracting Structured Data from Documents](https://docs.venice.ai/guides/tools/document-extraction.md) 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](https://docs.venice.ai/guides/tools/document-extraction.md)
* [Text Parser API Reference](https://docs.venice.ai/api-reference/endpoint/augment/text-parser.md)
* [File Inputs](https://docs.venice.ai/guides/features/file-inputs.md)
* [Embeddings](https://docs.venice.ai/guides/features/embeddings.md)
* [Text Models](https://docs.venice.ai/models/text.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.