Skip to main content
POST
/api/v1/augment/text-parser
This is an experimental API. The request and response format may change without notice.
Upload a document file via multipart/form-data using the file field, up to 25MB. Supported formats are broader than the structured-document set. The endpoint accepts:
  • Documents — PDF, EPUB, DOCX, PPTX, XLSX, XLS
  • Plain text and data — plain text, Markdown, CSV, JSON, YAML, TOML, XML, and any text/* MIME type
  • Source code — roughly 140 recognized extensions, including .py, .ts, .js, .go, .rs, .c, .cpp, .java, .ps1, .sh, .sql, plus extensionless files such as Dockerfile and Makefile
If your input is already text or code, there is no need to convert it to PDF first.
Only the modern Office formats are supported. The legacy .doc and .ppt binary formats are not accepted — convert them to .docx or .pptx first. Legacy .xls is accepted.
Set response_format to json (default) for structured output with extracted text and token count, or text for the raw extracted text. Privacy: Text parsing runs entirely in-memory on Venice’s infrastructure with zero data retention. Your documents are processed and immediately discarded — no content is stored or logged. Pricing: $0.01 per request.

Example (cURL)


Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data
file
file
required

The document file to parse. Supported formats: PDF, DOCX, PPTX, XLSX, and plain text files. Maximum size: 25MB.

response_format
enum<string>
default:json

The format of the response output. "json" returns structured JSON with text and token count, "text" returns only the extracted text.

Available options:
json,
text

Response

Text extraction completed successfully

Text parser response containing extracted text and token count.

text
string
required

The extracted text content from the document.

tokens
number
required

The token count of the extracted text.