curl --request DELETE \
--url https://api.nohead.io/v1/assets/{asset_id} \
--header 'Authorization: Bearer <token>'import { Nohead } from "@nohead/sdk"
const nohead = new Nohead()
const result = await nohead.assets.delete("ast_01J9ZQ3F8X")
from nohead import Nohead
nohead = Nohead()
result = nohead.assets.delete("ast_01J9ZQ3F8X")
require "nohead"
nohead = Nohead::Client.new
result = nohead.assets.delete("ast_01J9ZQ3F8X")
{
"id": "ast_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"object": "asset",
"project_id": "<string>",
"filename": "<string>",
"alt": "<string>",
"content_type": "image/png",
"byte_size": 123,
"width": 123,
"height": 123,
"status": "pending",
"deleted_at": "2023-11-07T05:31:56Z",
"purge_after": "2023-11-07T05:31:56Z",
"image_url": "https://images.nohead.io/plain/0199f5c2-7b1e-7c3a-9d4f-2a6b8c0e1f3d/0199f5c2-8a2d-7e4b-b1c3-5d7e9f1a2b4c",
"preview_url": "<string>",
"file_url": "https://files.nohead.io/0199f5c2-7b1e-7c3a-9d4f-2a6b8c0e1f3d/0199f5c2-8a2d-7e4b-b1c3-5d7e9f1a2b4c",
"media_url": "https://media.nohead.io/0199f5c2-7b1e-7c3a-9d4f-2a6b8c0e1f3d/0199f5c2-8a2d-7e4b-b1c3-5d7e9f1a2b4c",
"uploaded_at": "2023-11-07T05:31:56Z",
"created_at": "2026-09-27T12:00:00.000Z",
"updated_at": "2026-09-27T12:00:00.000Z"
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}Delete an asset
Soft-deletes the asset. The original is kept for 30 days, then purged;
records that reference it keep the ID. Until then it can be restored,
and image URLs already handed out keep working. To remove it sooner,
purge it (POST /v1/assets/{asset_id}/purge). Deleting a deleted asset
changes nothing.
curl --request DELETE \
--url https://api.nohead.io/v1/assets/{asset_id} \
--header 'Authorization: Bearer <token>'import { Nohead } from "@nohead/sdk"
const nohead = new Nohead()
const result = await nohead.assets.delete("ast_01J9ZQ3F8X")
from nohead import Nohead
nohead = Nohead()
result = nohead.assets.delete("ast_01J9ZQ3F8X")
require "nohead"
nohead = Nohead::Client.new
result = nohead.assets.delete("ast_01J9ZQ3F8X")
{
"id": "ast_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"object": "asset",
"project_id": "<string>",
"filename": "<string>",
"alt": "<string>",
"content_type": "image/png",
"byte_size": 123,
"width": 123,
"height": 123,
"status": "pending",
"deleted_at": "2023-11-07T05:31:56Z",
"purge_after": "2023-11-07T05:31:56Z",
"image_url": "https://images.nohead.io/plain/0199f5c2-7b1e-7c3a-9d4f-2a6b8c0e1f3d/0199f5c2-8a2d-7e4b-b1c3-5d7e9f1a2b4c",
"preview_url": "<string>",
"file_url": "https://files.nohead.io/0199f5c2-7b1e-7c3a-9d4f-2a6b8c0e1f3d/0199f5c2-8a2d-7e4b-b1c3-5d7e9f1a2b4c",
"media_url": "https://media.nohead.io/0199f5c2-7b1e-7c3a-9d4f-2a6b8c0e1f3d/0199f5c2-8a2d-7e4b-b1c3-5d7e9f1a2b4c",
"uploaded_at": "2023-11-07T05:31:56Z",
"created_at": "2026-09-27T12:00:00.000Z",
"updated_at": "2026-09-27T12:00:00.000Z"
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}Authorizations
Project-scoped API key, e.g. nohead_sk_k7fz0a9c3m2q_<secret>, or
nohead_pk_… for a published-only key. Used by servers, CI, the CLI
and coding agents.
Headers
A unique value (1-255 printable ASCII characters) that makes retrying
this request safe. The first response (below 500) is stored for 24
hours per user or API key; retries with the same key and the same
request get it again with an Idempotent-Replayed: true header. The
same key with a different request is refused with 400; a retry while
the first request is still running gets 409.
1 - 255First-party client identifier recorded in history (e.g. cli/0.3.1). Informational only.
Path Parameters
Response
The deleted asset.
"ast_01J9ZQ3F8X5W2K7M4N6P0R1S2T"
The filename, any Unicode, as uploaded unless renamed since. Downloads use it.
Alternative text, saying what an image shows; null until set. The default wherever the asset is used.
1000"image/png"
Pixel width, for images.
pending until the upload is completed; only ready assets can be used in records.
pending, ready, failed When the asset was deleted; null unless it is.
When a deleted asset and its file are removed for good, unless restored or purged first.
The URL of the whole image, for ready images (JPEG, PNG, GIF, WebP,
AVIF or SVG), deleted ones included until they are purged; null
otherwise. Image URLs are open and never expire. An SVG is served
as SVG without its scripts, unless a format such as @webp
rasterizes it. For a rendition,
write imgproxy processing options
before /plain/, and a format after @: for example
https://images.nohead.io/rs:fill:800:600/g:sm/plain/…@webp. Renditions
are at most 4096 pixels a side, from originals of at most 50
megapixels. Options that would return the file as stored (raw,
skip_processing, strip_metadata) are refused.
"https://images.nohead.io/plain/0199f5c2-7b1e-7c3a-9d4f-2a6b8c0e1f3d/0199f5c2-8a2d-7e4b-b1c3-5d7e9f1a2b4c"
The URL of a small rendition (fits in 640×640, WebP), for ready images and SVGs (rasterized), deleted ones included until they are purged; null otherwise.
The URL of the file as uploaded, for ready assets of any type,
deleted ones included until they are purged; null otherwise. It
downloads the file under its filename (a rename applies within a
minute or so), is open and never expires, and is cached on a CDN.
"https://files.nohead.io/0199f5c2-7b1e-7c3a-9d4f-2a6b8c0e1f3d/0199f5c2-8a2d-7e4b-b1c3-5d7e9f1a2b4c"
The URL that plays a ready video or audio file inline, for
<video> and <audio> (with range requests, so players can seek),
deleted ones included until they are purged: MP4, QuickTime, M4A,
3GP, WebM, Matroska, MP3, AAC, FLAC, WAV and Ogg (whose content is
checked when the upload completes). Null for other types, which
file_url downloads.
Open, never expiring and cached on a CDN, like file_url.
"https://media.nohead.io/0199f5c2-7b1e-7c3a-9d4f-2a6b8c0e1f3d/0199f5c2-8a2d-7e4b-b1c3-5d7e9f1a2b4c"
ISO 8601 timestamp in UTC.
"2026-09-27T12:00:00.000Z"
ISO 8601 timestamp in UTC.
"2026-09-27T12:00:00.000Z"