الانتقال إلى المحتوى الرئيسي
POST
Upload a file

التفويضات

Authorization
string
header
مطلوب

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

معلمات المسار

namespace
string
مطلوب

The namespace name. 1-64 characters of a-z 0-9 _ -, starting with a letter or digit.

Pattern: ^[a-z0-9][a-z0-9_-]{0,63}$
أمثلة:

"docs"

"user-42"

معلمات الاستعلام

name
string

The file's name, stored as file metadata (e.g. Q3 report.pdf).

Maximum string length: 4096
type
enum<string>

The file's type, overriding Content-Type (jpg, tif, xls, xlsm, heif also accepted); 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
id
string

The file's id (file_id), the end of its document's id; defaults to name with unsafe characters as -.

user
string

The user of yours the file belongs to; its document carries user. A user id of yours, with at most 8 :; group users with : (tenant-7:u_42) and query a group by user_prefix.

Pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]{0,127}$
مثال:

"tenant-7:u_42"

metadata
string

A JSON object copied into the document's metadata.

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.

الاستجابة

Parsed within wait: ready with the document, failed with error, or result: unchanged.

An upload of POST /namespaces/{namespace}/files and its outcome; the fields of its file type.

file_id
string
مطلوب
type
enum<string>
مطلوب
الخيارات المتاحة:
pdf,
xlsx,
docx,
pptx,
csv,
tsv,
txt,
md,
image
state
enum<string>
مطلوب

queued, parsing: running. ocr: stored, some pages retried (ocr_pending). ready: stored. failed: see error.

الخيارات المتاحة:
queued,
parsing,
ocr,
ready,
failed
ids
string[]
مطلوب

Once ready: the file's one document, [<source_id>:<file_id>] (a file uploaded before 2026-10-25 lists one per part until uploaded again).

without_text
object
مطلوب

Everything the file stored no text for, in one place.

markdown
string

Once ready: the whole document, as ParseResult.markdown.

parts
object[]

Once ready: its parts, as ParseResult.parts.

name
string

The file's name.

uploaded_at
integer

When the file was last uploaded or parsed, in Unix milliseconds.

source_id
string

The files source of the namespace (and user): the file's document is <source_id>:<file_id>.

ocr_failed
integer[]

A PDF's or image's pages OCR could not read after its retries, 1-based.

result
string

The same bytes, name, metadata and options as the file's last parse; nothing was parsed again.

Allowed value: "unchanged"
error
object

failed: code and message.

pages
integer

A PDF's pages, or an image's pages (a TIFF's frames).

pages_without_text
integer[]
مهمل

Pages with no text, 1-based; not stored. Deprecated: without_text.pages.

pages_ocr
integer
مهمل

Pages read by OCR. Deprecated: the parts with ocr: true.

images_ocr
integer
مهمل

Pictures read by OCR. Deprecated: the parts with ocr: true.

images_without_text
object[]

A Word document's or deck's pictures OCR did not turn into text, with why; also in without_text.images.

ocr_pending
integer[]

The pages, slides or pictures OCR is still reading, 1-based; each is stored with ocr: true when read.

sheets
integer
مهمل

A workbook's worksheets. Deprecated: pages.

slides
integer
مهمل

A deck's slides. Deprecated: pages.

slides_without_text
integer[]
مهمل

Slides with no text, 1-based; not stored. Deprecated: without_text.slides.