Delete an artifact
September 29, 2026
Table of contents
Delete a Studio artifact from its notebook, at Google. The notebook and its sources stay. Deleted artifacts cannot be recovered.
Files are always streamed from the artifact in the notebook and never stored by us, so once an artifact is deleted its GET /artifacts/download links answer 404. Download anything you want to keep first. A job still running for a deleted artifact fails with error code not_found on its next check.
To delete a whole notebook with everything in it, use DELETE /notebooks/notebook.
https://api.useapi.net/v1/gemini-notebook/artifacts/
artifact
artifactis URL-encoded in the path (it contains:and@). Get it from GET /artifacts or from theartifactfield of a job. The id names the account and the notebook, so noemailparameter is needed.
Request Headers
Authorization: Bearer {API token}
API tokenis required, see Setup useapi.net for details.
Responses
-
The artifact was deleted. The response has no body.
-
The path value is not an artifact id.
{ "error": "Path parameter artifact (…) is not a valid artifact id", "code": 400 } -
Invalid API token.
{ "error": "useapi.net ⁝ Unauthorized", "code": 401 } -
The artifact id was issued to a different API token.
{ "error": "user:[email protected]:d02c903b-…:07b94418-… does not belong to this API token", "code": 403 } -
The account the artifact lives on is no longer configured, or Google reports the artifact or its notebook as not found.
{ "error": "Account [email protected] of user:[email protected]:d02c903b-…:07b94418-… is not configured", "code": 404 } -
596 Account Error
Google reported the account as signed out. While we re-check it, the answer is the first message below. Retry in about a minute. If it stays signed out, the account is paused, you receive an email, and the answer becomes the second message until you re-add it via Setup Gemini Notebook.
{ "error": "Google reported this account as signed out. We are re-checking it — please retry in about a minute. If it stays signed out, you will receive a re-add email.", "code": 596 }{ "error": "Account [email protected]: Google signed this account out. Re-add it at https://useapi.net/docs/start-here/setup-gemini-notebook", "code": 596 }
Model
A successful delete returns 204 with no body. Errors return:
{ // TypeScript, all fields are optional
error: string
code: number
}
Examples
-
ARTIFACT="user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:07b94418-6c28-437c-98de-06bbeabb4e0c" curl -X DELETE "https://api.useapi.net/v1/gemini-notebook/artifacts/$(python3 -c "import urllib.parse,sys;print(urllib.parse.quote(sys.argv[1],safe=''))" "$ARTIFACT")" \ -H "Authorization: Bearer …" -
const token = "API token"; const artifact = "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:07b94418-6c28-437c-98de-06bbeabb4e0c"; const apiUrl = `https://api.useapi.net/v1/gemini-notebook/artifacts/${encodeURIComponent(artifact)}`; const response = await fetch(apiUrl, { method: "DELETE", headers: { "Authorization": `Bearer ${token}`, }, }); console.log("response", response.status); -
import requests, urllib.parse token = "API token" artifact = "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:07b94418-6c28-437c-98de-06bbeabb4e0c" apiUrl = "https://api.useapi.net/v1/gemini-notebook/artifacts/" + urllib.parse.quote(artifact, safe="") headers = { "Authorization" : f"Bearer {token}" } response = requests.delete(apiUrl, headers=headers) print(response.status_code)