メイン コンテンツにスキップ

このブラウザーはサポートされなくなりました。

Microsoft Edge にアップグレードすると、最新の機能、セキュリティ更新プログラム、およびテクニカル サポートを利用できます。

Microsoft Edge をダウンロードする Internet Explorer と Microsoft Edge の詳細情報
microsoft-foundry.rest.security.o-auth2-auth

Assistants

Delete an assistant

DELETE /openai/v1/assistants/{assistant_id} 非推奨

Deletes an assistant by its identifier.

パス パラメーター

assistant_id string 必須 非推奨

The ID of the assistant to delete.

応答

The request has succeeded.

本文

Content-Type: application/json
id string 必須 非推奨
deleted boolean 必須 非推奨
object enum 必須 非推奨
assistant.deleted

Client error

本文

Content-Type: application/json
error OpenAI.Error 必須 非推奨
code string | null 必須 非推奨
message string 必須 非推奨
param string | null 非推奨
type string 非推奨
misalignment OpenAI.MisalignmentErrorDetailsResource 非推奨
review_target string | null 非推奨
error_type string | enum 非推奨
次のいずれか:
string 非推奨
enum 非推奨
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string 非推奨

The public explanation for this block.

steer OpenAI._MisalignmentSteer 非推奨
message string 必須 非推奨

The public continuation instruction.

details OpenAI.Error[] 非推奨

Additional errors that contributed to this failure.

additionalInfo object 非推奨

Additional structured information about the failure.

debugInfo object 非推奨

Diagnostic information supplied by the service for troubleshooting.

Server error

本文

Content-Type: application/json
error OpenAI.Error 必須 非推奨
code string | null 必須 非推奨
message string 必須 非推奨
param string | null 非推奨
type string 非推奨
misalignment OpenAI.MisalignmentErrorDetailsResource 非推奨
review_target string | null 非推奨
error_type string | enum 非推奨
次のいずれか:
string 非推奨
enum 非推奨
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string 非推奨

The public explanation for this block.

steer OpenAI._MisalignmentSteer 非推奨
message string 必須 非推奨

The public continuation instruction.

details OpenAI.Error[] 非推奨

Additional errors that contributed to this failure.

additionalInfo object 非推奨

Additional structured information about the failure.

debugInfo object 非推奨

Diagnostic information supplied by the service for troubleshooting.

要求

curl https://api.openai.com/v1/assistants/asst_abc123 \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "OpenAI-Beta: assistants=v2" \
  -X DELETE
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ.get("OPENAI_API_KEY"),  # This is the default and can be omitted
)
assistant_deleted = client.beta.assistants.delete(
    "assistant_id",
)
print(assistant_deleted.id)
import OpenAI from "openai";

const openai = new OpenAI();

async function main() {
  const response = await openai.beta.assistants.delete("asst_abc123");

  console.log(response);
}
main();
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted
});

const assistantDeleted = await client.beta.assistants.delete('assistant_id');

console.log(assistantDeleted.id);
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
", assistantDeleted.ID)
}
package com.openai.example;

import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.beta.assistants.AssistantDeleteParams;
import com.openai.models.beta.assistants.AssistantDeleted;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        OpenAIClient client = OpenAIOkHttpClient.fromEnv();

        AssistantDeleted assistantDeleted = client.beta().assistants().delete("assistant_id");
    }
}
require "openai"

openai = OpenAI::Client.new(api_key: "My API Key")

assistant_deleted = openai.beta.assistants.delete("assistant_id")

puts(assistant_deleted)

回答

{
  "id": "asst_abc123",
  "object": "assistant.deleted",
  "deleted": true
}
ja-jp
プライバシーの選択
  • AI 免責事項
  • 以前のバージョン
  • ブログ
  • 投稿
  • プライバシー
  • コンシューマーの健康に関するプライバシー
  • 利用条件
  • 商標
  • © Microsoft 2026