Add a document
Makes a document from a file (`multipart/form-data`), a web address (`{ "url" }`) or pasted text (`{ "text" }`).
secretKeyAuthorizationBearer <sk_live_… or sk_test_… (a prefix and 40 base62 characters)>A secret key from the dashboard, sent as Authorization: Bearer sk_live_…. Live keys run real, charged calls; test keys (sk_test_…) run calls of at most 60 seconds, 20 a day per organization, never charged. Each key sees only its own env's calls, meetings, webhooks, memories and analytics. Publishable keys (pk_…) are refused.
- body
A file to read, as multipart/form-data.
file*stringOne .txt, .md, .pdf or .docx file, with its file name (the extension says how it is read). At most 10 MB (2 MB through the public address).
title?stringLeft out, the file's name without its extension.
length <= 200tags?array<string>Repeat the field, or send one field with commas.
The document, with its text (empty while processing or failed).
application/json- response
One document, with its text.
{ "id": "doc_1Qm6Tx3KcW8vRp5ZbN2h", "title": "Opening hours", "source": "url", "file_name": null, "url": "https://example.com/help/opening-hours", "format": "html", "size_bytes": 48211, "char_count": 5120, "status": "ready", "error": null, "tags": [ "faq", "hours" ], "character_ids": [ "chr_4fT9kQ2mXw7LbN3pZs8V" ], "fetched_unix": 1793300000, "created_unix": 1793300000, "updated_unix": 1793300000}id*DocumentId^doc_[0-9A-Za-z]{20}$"doc_1Qm6Tx3KcW8vRp5ZbN2h"title*stringlength <= 200source*string"upload""url""text"file_name*string|nullurl*string|nullformat*stringimages: pictures uploaded together as a deck (no text).
"txt""md""pdf""docx""html""text""images"size_bytes*integerchar_count*integerThe text's length in characters (what counts against a character's budget).
status*DocumentStatusprocessing (being read), ready, or failed (kept, with error saying why; no text).
"processing""ready""failed"error*|Why it failed, in words you can show.
tags*array<>At most 20 tags of 1 to 40 characters, kept lower-case; repeats dropped.
items <= 20character_ids*array<>The characters that take it.
fetched_unix*|When a link was last fetched successfully.
int64created_unix*UnixUnix seconds, UTC.
int641793300000updated_unix*UnixUnix seconds, UTC.
int641793300000slides?|Its slides, when it is a deck (an uploaded PDF, or pictures); null otherwise. Independent of status: a scanned PDF has no text and ready slides.
text*stringThe extracted text (empty while processing or when failed).
length <= 500000curl -X POST 'https://api.daxov.com/v1/documents' \ -H 'Content-Type: application/json' \ -d '{ "url": "https://example.com/help/opening-hours", "tags": [ "faq", "hours" ]}'{ "id": "doc_1Qm6Tx3KcW8vRp5ZbN2h", "title": "Opening hours", "source": "url", "file_name": null, "url": "https://example.com/help/opening-hours", "format": "html", "size_bytes": 48211, "char_count": 5120, "status": "ready", "error": null, "tags": [ "faq", "hours" ], "character_ids": [ "chr_4fT9kQ2mXw7LbN3pZs8V" ], "fetched_unix": 1793300000, "created_unix": 1793300000, "updated_unix": 1793300000, "text": "string"}