Preview analysis products¶
Preview the products generated by knowledge base file parsing, such as parsing images, in a binary stream.
GET https://moi.matrixorigin.cn/newmoi/semantic-models/{model_id}/artifacts/{file_id}/preview
Preparation before calling¶
Prepare $AI_STUDIO_API_KEY, $WORKSPACE_ID, $MODEL_ID and $FILE_ID with read permissions on the target knowledge base. This file_id must be the parsing product associated with the source file of the knowledge base; knowing only a Catalog file ID cannot be used as a preview basis.
Request example¶
curl -L "https://moi.matrixorigin.cn/newmoi/semantic-models/$MODEL_ID/artifacts/$FILE_ID/preview" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-o artifact.bin
Successful response¶
Returns 200 and the product binary stream on success, without using a JSON response envelope.
Header |
Description |
|---|---|
|
Product MIME type; |
|
Returns the inline preview file name if there is one. |
Common mistakes¶
HTTP Status Codes |
Error Codes |
Common Causes |
Recommended Actions |
|---|---|---|---|
|
|
|
Use a non-empty product file ID with no leading or trailing spaces. |
|
|
Does not have read permission for the target knowledge base. |
Check workspace and knowledge base authorizations. |
|
|
The product is not associated with the source file of this knowledge base. |
Confirm the knowledge base ID and analytical product ID. |
Follow-up operations¶
When you need to view the original source file, use Preview source original file.