Перейти до основного вмісту
POST
Parse a file to Markdown

Авторизації

Authorization
string
header
обов'язково

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

Параметри запиту

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.

Доступні опції:
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.

Приклад:

"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
за замовчуванням:false

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

wait
string
за замовчуванням:60

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

Приклади:

"60"

"0"

"true"

Тіло

The body is of type file.

Відповідь

The file's text.

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

id
string
обов'язково

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

state
enum<string>
обов'язково
Доступні опції:
done
type
enum<string>
обов'язково
Доступні опції:
pdf,
xlsx,
docx,
pptx,
csv,
tsv,
txt,
md,
image
name
string
обов'язково
markdown
string
обов'язково

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

parts
object[]
обов'язково

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

without_text
object
обов'язково

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.