Skip to content
中文

Delete file

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

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

Official OpenAI docs ↗

Request parameters

  • file_idstringrequired

    path: The ID of the file to use for this request.

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/openai/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/openai/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/openai/v1",
  apiKey: "$PRAXIS_API_KEY",
});

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

Response 200

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

Response

HTTP 200

OK

application/json

Name Type Description
id string
object string
deleted boolean