Skip to main content
POST
/
augment
/
text-parser
/api/v1/augment/text-parser
curl --request POST \
  --url https://api.venice.ai/api/v1/augment/text-parser \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form response_format=json
{
  "text": "<string>",
  "tokens": 123
}
Upload a document file via multipart/form-data using the file field. Supported formats include PDF, DOCX, XLSX, and plain text files (up to 25MB). Set response_format to json (default) for structured output with extracted text and token count, or text for the raw extracted text. Pricing: $0.01 per request.

Example (cURL)

curl -X POST https://api.venice.ai/api/v1/augment/text-parser \
  -H "Authorization: Bearer $VENICE_API_KEY" \
  -F "[email protected]" \
  -F "response_format=json"

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, 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.