JavaScript
import Morphik from 'morphik';
const client = new Morphik({
apiKey: process.env['MORPHIK_API_KEY'], // This is the default and can be omitted
});
const response = await client.retrieve.createDocs();
console.log(response);curl https://api.morphik.ai/retrieve/docs \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $MORPHIK_API_KEY" \
-d '{}'[
{
"score": 123,
"document_id": "<string>",
"metadata": {},
"content": {
"type": "url",
"value": "<string>",
"filename": "<string>"
},
"additional_metadata": {}
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}API Reference
Retrieve Documents
Retrieve relevant documents.
request.filters supports equality checks (including scalar-to-array matches) and the same operator set as
/retrieve/chunks: logical composition via $and, $or, $nor, $not, plus field predicates $eq, $ne,
$gt, $gte, $lt, $lte, $in, $nin, $exists, $type, $regex, and $contains. Use the same JSON
structure as /retrieve/chunks when expressing complex logic. Comparison operators require metadata typed as
number, decimal, datetime, or date.
POST
/
retrieve
/
docs
JavaScript
import Morphik from 'morphik';
const client = new Morphik({
apiKey: process.env['MORPHIK_API_KEY'], // This is the default and can be omitted
});
const response = await client.retrieve.createDocs();
console.log(response);curl https://api.morphik.ai/retrieve/docs \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $MORPHIK_API_KEY" \
-d '{}'[
{
"score": 123,
"document_id": "<string>",
"metadata": {},
"content": {
"type": "url",
"value": "<string>",
"filename": "<string>"
},
"additional_metadata": {}
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Body
application/json
Base retrieve request model
Was this page helpful?

