Pular para o conteúdo 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 é uma API experimental. O formato da requisição e da resposta pode mudar sem aviso prévio.
Envie um arquivo de documento via multipart/form-data usando o campo file. Os formatos suportados incluem PDF, DOCX, XLSX e arquivos de texto simples (até 25 MB). Defina response_format como json (padrão) para uma saída estruturada com o texto extraído e a contagem de tokens, ou text para o texto bruto extraído. Privacidade: A extração de texto é executada inteiramente em memória na infraestrutura da Venice, com retenção zero de dados. Seus documentos são processados e descartados imediatamente — nenhum conteúdo é armazenado ou registrado. Preço: US$ 0,01 por requisição.

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

Autorizações

Authorization
string
header
obrigatório

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

Corpo

multipart/form-data
file
file
obrigatório

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

response_format
enum<string>
padrão:json

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

Opções disponíveis:
json,
text

Resposta

Text extraction completed successfully

Text parser response containing extracted text and token count.

text
string
obrigatório

The extracted text content from the document.

tokens
number
obrigatório

The token count of the extracted text.