Vai al contenuto principale
POST
Parse a file to Markdown

Autorizzazioni

Authorization
string
header
obbligatorio

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

Parametri della query

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.

Opzioni disponibili:
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.

Esempio:

"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
predefinito:false

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

wait
string
predefinito:60

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

Esempi:

"60"

"0"

"true"

Corpo

The body is of type file.

Risposta

The file's text.

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

id
string
obbligatorio

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

state
enum<string>
obbligatorio
Opzioni disponibili:
done
type
enum<string>
obbligatorio
Opzioni disponibili:
pdf,
xlsx,
docx,
pptx,
csv,
tsv,
txt,
md,
image
name
string
obbligatorio
markdown
string
obbligatorio

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

parts
object[]
obbligatorio

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

without_text
object
obbligatorio

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.