Vai al contenuto principale
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
}
Questa è un’API sperimentale. Il formato di richiesta e risposta può cambiare senza preavviso.
Carica un file documento tramite multipart/form-data usando il campo file. I formati supportati includono PDF, DOCX, XLSX e file di testo semplice (fino a 25MB). Imposta response_format su json (predefinito) per un output strutturato con il testo estratto e il conteggio dei token, oppure text per il testo estratto in chiaro. Privacy: Il parsing del testo viene eseguito interamente in memoria sull’infrastruttura di Venice con zero data retention. I tuoi documenti vengono elaborati e immediatamente scartati — nessun contenuto viene memorizzato o registrato. Prezzo: $0,01 per richiesta.

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

Autorizzazioni

Authorization
string
header
obbligatorio

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

Corpo

multipart/form-data
file
file
obbligatorio

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

response_format
enum<string>
predefinito:json

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

Opzioni disponibili:
json,
text

Risposta

Text extraction completed successfully

Text parser response containing extracted text and token count.

text
string
obbligatorio

The extracted text content from the document.

tokens
number
obbligatorio

The token count of the extracted text.