Saltar al contenido principal
POST
Parse a file to Markdown

Autorizaciones

Authorization
string
header
requerido

A key from conare.ai/dashboard/keys with full access, some namespaces, or models only (/embed, /rerank, /v1, /v2/rerank, /parse).

Parámetros de consulta

name
string

The file's name (e.g. Q3 report.pdf); defaults to the URL's last segment, else file.

Maximum string length: 4096
type
enum<string>

The file's type, as on POST /namespaces/{namespace}/files; unset, it is read from the bytes.

Opciones disponibles:
pdf,
xlsx,
docx,
pptx,
doc,
ppt,
rtf,
odt,
ods,
odp,
csv,
tsv,
txt,
md,
png,
jpeg,
webp,
tiff,
gif,
bmp,
heic
pages
string

Pages to read, e.g. 1-20,25 or 5-: a PDF's pages, an image's frames or a deck's slides.

Ejemplo:

"1-20,25"

password
string

The password of a protected PDF or Office 2007+ file, on a file of at most 20 MiB; never stored.

layout
boolean
predeterminado:false

true: each part OCR read carries blocks, its page's layout regions.

wait
string
predeterminado:60

Seconds, 0-300, to wait for the parse before answering 202 (true is 60, false 0); answers come within 105 s.

Ejemplos:

"60"

"0"

"true"

Cuerpo

The body is of type file.

Respuesta

The file's text.

A file's text, as POST /parse and POST /namespaces/{namespace}/files answer it.

id
string
requerido

prs_... from POST /parse; the file id from POST /namespaces/{namespace}/files.

state
enum<string>
requerido
Opciones disponibles:
done
type
enum<string>
requerido
Opciones disponibles:
pdf,
xlsx,
docx,
pptx,
csv,
tsv,
txt,
md,
image
name
string
requerido
markdown
string
requerido

The whole document as Markdown; each page, slide or sheet starts with a comment such as <!-- page 3 -->.

parts
object[]
requerido

The parts in reading order; joined with their start comments, they make markdown.

without_text
object
requerido

What holds no text: PDF or image pages, deck slides (1-based) and Word or PowerPoint pictures (images).

pages
integer

All the file's pages, frames, slides or sheets, whatever pages selected.