SpyBara
Go Premium

go/resources/containers/methods/delete/index.md 2026-07-07 08:02 UTC to 2026-07-09 20:58 UTC

1 added, 1 removed.

2026
Wed 15 02:58 Tue 14 06:58 Mon 13 15:59 Sun 12 06:58 Fri 10 23:02 Thu 9 20:58 Tue 7 08:02

Delete a container

client.Containers.Delete(ctx, containerID) error

delete /containers/{container_id}

Delete a container

Parameters

  • containerID string

Example

package main

import (
  "context"

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

func main() {
  client := openai.NewClient(
    option.WithAPIKey("My API Key"),
  )
  err := client.Containers.Delete(context.TODO(), "container_id")
  if err != nil {
    panic(err.Error())
  }
}