Naar hoofdinhoud gaan

Deze browser wordt niet meer ondersteund.

Upgrade naar Microsoft Edge om te profiteren van de nieuwste functies, beveiligingsupdates en technische ondersteuning.

Microsoft Edge downloaden Meer informatie over Internet Explorer en Microsoft Edge
microsoft-foundry.rest.security.o-auth2-auth

Models

Delete a model

DELETE /openai/v1/models/{model}

Deletes a model by its identifier.

Padparameters

model string vereist

The model to delete

Antwoorden

The request has succeeded.

Hoofdtekst

Content-Type: application/json
id string vereist
deleted boolean vereist
object string vereist

Client error

Hoofdtekst

Content-Type: application/json
error OpenAI.Error vereist
code string | null vereist
message string vereist
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Een van de volgende:
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 vereist

The public continuation instruction.

details OpenAI.Error[]
additionalInfo object
debugInfo object

Server error

Hoofdtekst

Content-Type: application/json
error OpenAI.Error vereist
code string | null vereist
message string vereist
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Een van de volgende:
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 vereist

The public continuation instruction.

details OpenAI.Error[]
additionalInfo object
debugInfo object

Aanvraag

curl https://api.openai.com/v1/models/ft:gpt-4o-mini:acemeco:suffix:abc123 \
  -X DELETE \
  -H "Authorization: Bearer $OPENAI_API_KEY"
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ.get("OPENAI_API_KEY"),  # This is the default and can be omitted
)
model_deleted = client.models.delete(
    "ft:gpt-4o-mini:acemeco:suffix:abc123",
)
print(model_deleted.id)
import OpenAI from "openai";

const openai = new OpenAI();

async function main() {
  const model = await openai.models.delete("ft:gpt-4o-mini:acemeco:suffix:abc123");

  console.log(model);
}
main();
using System;
using System.ClientModel;

using OpenAI.Models;

OpenAIModelClient client = new(
    apiKey: Environment.GetEnvironmentVariable("OPENAI_API_KEY")
);

ClientResult success = client.DeleteModel("ft:gpt-4o-mini:acemeco:suffix:abc123");
Console.WriteLine(success);
import OpenAI from 'openai';

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

const modelDeleted = await client.models.delete('ft:gpt-4o-mini:acemeco:suffix:abc123');

console.log(modelDeleted.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"),
    )
    modelDeleted, err := client.Models.Delete(context.TODO(), "ft:gpt-4o-mini:acemeco:suffix:abc123")
    if err != nil {
        panic(err.Error())
    }
    fmt.Printf("%+v
", modelDeleted.ID)
}
package com.openai.example;

import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.models.ModelDeleteParams;
import com.openai.models.models.ModelDeleted;

public final class Main {
    private Main() {}

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

        ModelDeleted modelDeleted = client.models().delete("ft:gpt-4o-mini:acemeco:suffix:abc123");
    }
}
require "openai"

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

model_deleted = openai.models.delete("ft:gpt-4o-mini:acemeco:suffix:abc123")

puts(model_deleted)

Respons

{
  "id": "ft:gpt-4o-mini:acemeco:suffix:abc123",
  "object": "model",
  "deleted": true
}
nl-nl
Uw privacykeuzes
  • AI-disclaimer
  • Vorige versies
  • Blog
  • Bijdragen
  • Privacy
  • Privacy van gezondheidsdata
  • Gebruiksvoorwaarden
  • Handelsmerken
  • © Microsoft 2026