Skip to main content
DELETE
/
v1
/
files
/
{file_id}
Delete File
curl --request DELETE \
  --url https://api.moonshot.ai/v1/files/{file_id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "<string>",
  "object": "file",
  "deleted": true
}
client.files.delete(file_id=file_id)

Authorizations

Authorization
string
header
required

The Authorization header expects a Bearer token. Use an MOONSHOT_API_KEY as the token. This is a server-side secret key. Generate one on the API keys page in your dashboard.

Path Parameters

file_id
string
required

The file identifier

Response

Deletion result

id
string
required

Deleted file identifier

object
string
required
Example:

"file"

deleted
boolean
required

Whether the file was deleted successfully