string
required
The session ID the artifact belongs to
string
required
The artifact ID to remove from the Knowledge Base
origin: "ai_generated" (files the agent produced during the conversation) can be managed this way — artifacts a user uploaded cannot be copied to or removed from the platform through this route.
Response
200 OK on success:
Error responses
object
Returned as
{"error": "Only AI-generated artifacts can be managed"} when the artifact’s origin is not ai_generated.object
Returned as
{"error": "Artifact not found."} when no matching artifact exists, or {"error": "not_found_on_platform", "message": "Artifact is not saved to Knowledge Base"} when the artifact was never copied to the platform (or was already removed).Copying an artifact to the Knowledge Base
This endpoint undoesPOST /api/v1/sessions/{session_id}/artifacts/{artifact_id}/copy-to-platform/, which copies an AI-generated artifact into the platform’s persistent file storage so it survives beyond the session (optionally into a specific workspace via a version/workspace body field). That route isn’t covered in depth in this reference — see the Artifacts overview for the full endpoint table.