Saltar al contenido principal
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
}
Esta es una API experimental. El formato de la solicitud y de la respuesta puede cambiar sin previo aviso.
Sube un archivo de documento mediante multipart/form-data utilizando el campo file. Los formatos admitidos incluyen PDF, DOCX, XLSX y archivos de texto plano (hasta 25 MB). Establece response_format en json (predeterminado) para obtener una salida estructurada con el texto extraído y el número de tokens, o en text para obtener el texto extraído sin procesar. Privacidad: el parseo de texto se ejecuta íntegramente en memoria en la infraestructura de Venice con cero retención de datos. Tus documentos se procesan y se descartan inmediatamente: no se almacena ni se registra ningún contenido. Precio: 0,01 $ por solicitud.

Ejemplo (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"

Autorizaciones

Authorization
string
header
requerido

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

Cuerpo

multipart/form-data
file
file
requerido

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

response_format
enum<string>
predeterminado:json

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

Opciones disponibles:
json,
text

Respuesta

Text extraction completed successfully

Text parser response containing extracted text and token count.

text
string
requerido

The extracted text content from the document.

tokens
number
requerido

The token count of the extracted text.