Ir al contenido principal

Este explorador ya no se admite.

Actualice a Microsoft Edge para aprovechar las características y actualizaciones de seguridad más recientes, y disponer de soporte técnico.

Descargar Microsoft Edge Más información sobre Internet Explorer y Microsoft Edge
microsoft-foundry.rest.security.o-auth2-auth

Responses

Delete a model response

DELETE /openai/v1/responses/{response_id}

Deletes a model response.

Parámetros de la ruta de acceso

response_id string requerido

The ID of the response to delete.

Parámetros de encabezado

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.

Respuestas

The request has succeeded.

Encabezados

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.

Cuerpo

Content-Type: application/json
id string requerido

The operation ID.

object enum requerido

Always return 'response'.

response
deleted enum requerido

Always return true

true

Client error

Cuerpo

Content-Type: application/json
error OpenAI.Error requerido
code string | null requerido
message string requerido
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Cualquiera de las siguientes:
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 requerido

The public continuation instruction.

details OpenAI.Error[]
additionalInfo object
debugInfo object

Server error

Cuerpo

Content-Type: application/json
error OpenAI.Error requerido
code string | null requerido
message string requerido
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Cualquiera de las siguientes:
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 requerido

The public continuation instruction.

details OpenAI.Error[]
additionalInfo object
debugInfo object

Solicitar

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)

Respuesta

{
  "id": "resp_6786a1bec27481909a17d673315b29f6",
  "object": "response",
  "deleted": true
}
es-es
Sus opciones de privacidad
  • Declinación de responsabilidades de IA
  • Versiones anteriores
  • Blog
  • Contribuir
  • Privacidad
  • Privacidad de estado del consumidor
  • Términos de uso
  • Marcas comerciales
  • © Microsoft 2026