Issue a temporary model file link¶
Issue a temporary read link containing a single-file capability credential.
POST https://api.moi.matrixorigin.cn/v5/workspaces/{id}/files/{file_id}/model-url
Before you call this API¶
Set BASE_URL to the product API prefix https://api.moi.matrixorigin.cn/v5; use the corresponding product API URL for a dedicated deployment.
Prepare a personal access token for the target workspace. WORKSPACE_ID must match the path workspace; FILE_ID comes from actual file results. BASE_URL includes the product prefix in the same environment. Example files/IDs are placeholders.
Request parameters¶
curl --fail-with-body -sS -X POST "$BASE_URL/workspaces/$WORKSPACE_ID/files/$FILE_ID/model-url" \
-H "X-API-Key: $MOI_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
No business request body. Set the path workspace and file ID to actual targets.
Success directly returns url and expires_at without an outer code/data envelope. Link holders may read the corresponding file under valid conditions. Link credentials are not interchangeable with ordinary PATs. Expiration, file state, and service configuration each affect availability.
Successful response¶
{
"url": "https://model.example.invalid/v5/catalog-files/file-example/content?capability=example-capability",
"expires_at": "2026-11-12T12:00:00Z"
}
url is an absolute URL containing capability query parameters. expires_at is a UTC RFC3339 expiration time. Do not assume a fixed TTL.
Error responses¶
{
"code": 2,
"message": "示例错误信息"
}
Errors use numeric code/message and may occur at identity or permission boundaries before issuance. An unconfigured link service or unavailable tenant database may return 503/15; a confirmed missing file returns 404/3. Issuance-specific errors differ from the content endpoint’s uniform 404.