Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Delete assistant

Deprecated
client.Beta.Assistants.Delete(ctx, assistantID) (*AssistantDeleted, error)
DELETE/assistants/{assistant_id}

Delete an assistant.

ParametersExpand Collapse
assistantID string
ReturnsExpand Collapse
type AssistantDeleted struct{…}
ID string
Deleted bool
Object AssistantDeleted

Delete assistant

package main

import (
  "context"
  "fmt"

  "github.com/openai/openai-go"
  "github.com/openai/openai-go/option"
)

func main() {
  client := openai.NewClient(
    option.WithAPIKey("My API Key"),
  )
  assistantDeleted, err := client.Beta.Assistants.Delete(context.TODO(), "assistant_id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", assistantDeleted.ID)
}
{
  "id": "asst_abc123",
  "object": "assistant.deleted",
  "deleted": true
}
Returns Examples
{
  "id": "asst_abc123",
  "object": "assistant.deleted",
  "deleted": true
}