Ignora e passa al contenuto principale

Questo browser non è più supportato.

Esegui l'aggiornamento a Microsoft Edge per sfruttare i vantaggi di funzionalità più recenti, aggiornamenti della sicurezza e supporto tecnico.

Scarica Microsoft Edge Scopri di più su Internet Explorer e Microsoft Edge
microsoft-foundry.rest.security.o-auth2-auth

Responses

Delete a model response

DELETE /openai/v1/responses/{response_id}

Deletes a model response.

Parametri del percorso

response_id string necessario

The ID of the response to delete.

Parametri di intestazione

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.

Risposte

The request has succeeded.

Intestazioni

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.

Corpo

Content-Type: application/json
id string necessario

The operation ID.

object enum necessario

Always return 'response'.

response
deleted enum necessario

Always return true

true

Client error

Corpo

Content-Type: application/json
error OpenAI.Error necessario
code string | null necessario
message string necessario
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Uno qualsiasi dei seguenti:
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 necessario

The public continuation instruction.

details OpenAI.Error[]
additionalInfo object
debugInfo object

Server error

Corpo

Content-Type: application/json
error OpenAI.Error necessario
code string | null necessario
message string necessario
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Uno qualsiasi dei seguenti:
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 necessario

The public continuation instruction.

details OpenAI.Error[]
additionalInfo object
debugInfo object

Richiedi

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)

Response

{
  "id": "resp_6786a1bec27481909a17d673315b29f6",
  "object": "response",
  "deleted": true
}
it-it
Scelte sulla privacy
  • Dichiarazione di non responsabilità relativa all'intelligenza artificiale
  • Versioni precedenti
  • Blog
  • Collabora
  • Riservatezza
  • Privacy dei dati sanitari dei consumatori
  • Condizioni per l'utilizzo
  • Accessibilità
  • Marchi
  • © Microsoft 2026