Delete File
Parameters
Returns
Delete File
package main
import (
"context"
"fmt"
"github.com/anthropics/anthropic-sdk-go"
"github.com/anthropics/anthropic-sdk-go/option"
)
func main() {
client := anthropic.NewClient(
option.WithAPIKey("my-anthropic-api-key"),
)
deletedFile, err := client.Beta.Files.Delete(
context.TODO(),
"file_id",
anthropic.BetaFileDeleteParams{
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", deletedFile.ID)
}
Response 200
{
"id": "id",
"type": "file_deleted"
}Returns Examples
Response 200
{
"id": "id",
"type": "file_deleted"
}