class Anthropic::Resources::Beta::Files

def delete(file_id, params = {})

Other tags:
    See: Anthropic::Models::Beta::FileDeleteParams -

Returns:
  • (Anthropic::Models::Beta::DeletedFile) -

Parameters:
  • request_options (Anthropic::RequestOptions, Hash{Symbol=>Object}, nil) --
  • betas (Array) -- Optional header to specify the beta version(s) you want to use.
  • file_id (String) -- ID of the File.

Overloads:
  • delete(file_id, betas: nil, request_options: {})
def delete(file_id, params = {})
  parsed, options = Anthropic::Beta::FileDeleteParams.dump_request(params)
  @client.request(
    method: :delete,
    path: ["v1/files/%1$s?beta=true", file_id],
    headers: parsed.transform_keys(betas: "anthropic-beta"),
    model: Anthropic::Beta::DeletedFile,
    options: {extra_headers: {"anthropic-beta" => "files-api-2025-04-14"}, **options}
  )
end