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

Responses

Delete a model response

DELETE /openai/v1/responses/{response_id}

Deletes a model response.

Padparameters

response_id string vereist

The ID of the response to delete.

Koptekstparameters

x-ms-user-identity string

Opaque per-user identity string used to scope endpoint-scoped data to a specific end user. The caller must have the agents/endpoints/UserIdentityImpersonation/action RBAC permission.

Antwoorden

The request has succeeded.

Kopteksten

x-agent-session-id string

Session ID for this request. Only present for hosted agent responses. Returns the provided session ID or an auto-generated one if not provided in the request.

Hoofdtekst

Content-Type: application/json
id string vereist

The operation ID.

object enum vereist

Always return 'response'.

response
deleted enum vereist

Always return true

true

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 -X DELETE https://api.openai.com/v1/responses/resp_123 \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer $OPENAI_API_KEY"
import OpenAI from "openai";
const client = new OpenAI();

const response = await client.responses.delete("resp_123");
console.log(response);
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ.get("OPENAI_API_KEY"),  # This is the default and can be omitted
)
client.responses.delete(
    "resp_677efb5139a88190b512bc3fef8e535d",
)
import OpenAI from 'openai';

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

await client.responses.delete('resp_677efb5139a88190b512bc3fef8e535d');
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.Responses.Delete(context.TODO(), "resp_677efb5139a88190b512bc3fef8e535d")
    if err != nil {
        panic(err.Error())
    }
}
package com.openai.example;

import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.responses.ResponseDeleteParams;

public final class Main {
    private Main() {}

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

        client.responses().delete("resp_677efb5139a88190b512bc3fef8e535d");
    }
}
require "openai"

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

result = openai.responses.delete("resp_677efb5139a88190b512bc3fef8e535d")

puts(result)

Respons

{
  "id": "resp_6786a1bec27481909a17d673315b29f6",
  "object": "response",
  "deleted": true
}
nl-nl
Uw privacykeuzes
  • AI-disclaimer
  • Vorige versies
  • Blog
  • Bijdragen
  • Privacy
  • Privacy van gezondheidsdata
  • Gebruiksvoorwaarden
  • Handelsmerken
  • © Microsoft 2026