Skip to content
中文

Delete a file

Upload a file first, then replace the example file ID with its returned ID.

DELETE/file/v1/files/{file_id}● Supported

Request parameters

  • file_idstringrequired

    path: ID of a tenant-owned live file, as returned by upload or list; starts with file-.

Returns

200 file

Errors follow the OpenAI format — see error codes

Request

curl
# Upload a file first, then replace the example file ID with its returned ID.
curl -X DELETE https://api.deepraxis.com/file/v1/files/file_123 \
  -H "Authorization: Bearer $PRAXIS_API_KEY"
Python
# Upload a file first, then replace the example file ID with its returned ID.
from openai import OpenAI

client = OpenAI(
    base_url="https://api.deepraxis.com/file/v1",
    api_key="$PRAXIS_API_KEY",
)

client.files.delete("file_123")
TypeScript
// Upload a file first, then replace the example file ID with its returned ID.
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.deepraxis.com/file/v1",
  apiKey: "$PRAXIS_API_KEY",
});

await client.files.delete("file_123");

Response 200

{
  "id": "file_dp_01M41EAAJ35TB1BK663PKJQD81",
  "object": "file",
  "deleted": true
}

Response

HTTP 200

OK

application/json

Name Type Description
id string File identifier: file- followed by 24 base62 characters. Use the ID returned by upload or list.
object string Object type; always file.
deleted boolean Always true; the file can no longer be read, though downloads already authorized may finish.