Skip to main content
DELETE
/
v1
/
function
/
{function_id}
Delete function
curl --request DELETE \
  --url https://api.braintrust.dev/v1/function/{function_id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "_xact_id": "<string>",
  "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "log_id": "p",
  "org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "slug": "<string>",
  "function_data": {
    "type": "prompt"
  },
  "description": "<string>",
  "created": "2023-11-07T05:31:56Z",
  "prompt_data": {
    "prompt": {
      "type": "chat",
      "messages": [
        {
          "role": "system",
          "content": "",
          "name": "<string>"
        }
      ],
      "tools": "<string>"
    },
    "options": {
      "model": "<string>",
      "params": {
        "use_cache": true,
        "reasoning_enabled": true,
        "reasoning_budget": 123,
        "temperature": 123,
        "top_p": 123,
        "max_tokens": 123,
        "max_completion_tokens": 123,
        "frequency_penalty": 123,
        "presence_penalty": 123,
        "response_format": {
          "type": "json_object"
        },
        "tool_choice": "auto",
        "function_call": "auto",
        "n": 123,
        "stop": [
          "<string>"
        ],
        "reasoning_effort": "none",
        "verbosity": "low"
      },
      "position": "<string>"
    },
    "parser": {
      "type": "llm_classifier",
      "use_cot": true,
      "choice_scores": {}
    },
    "tool_functions": [
      {
        "type": "function",
        "id": "<string>"
      }
    ],
    "mcp": {},
    "origin": {
      "prompt_id": "<string>",
      "project_id": "<string>",
      "prompt_version": "<string>"
    }
  },
  "tags": [
    "<string>"
  ],
  "metadata": {},
  "function_type": "llm",
  "origin": {
    "object_type": "organization",
    "object_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "internal": true
  },
  "function_schema": {
    "parameters": "<unknown>",
    "returns": "<unknown>"
  }
}

Authorizations

Authorization
string
header
required

Most Braintrust endpoints are authenticated by providing your API key as a header Authorization: Bearer [api_key] to your HTTP request. You can create an API key in the Braintrust organization settings page.

Path Parameters

function_id
string<uuid>
required

Function id

Response

Returns the deleted function object

id
string<uuid>
required

Unique identifier for the prompt

_xact_id
string
required

The transaction id of an event is unique to the network operation that processed the event insertion. Transaction ids are monotonically increasing over time and can be used to retrieve a versioned snapshot of the prompt (see the version parameter)

project_id
string<uuid>
required

Unique identifier for the project that the prompt belongs under

log_id
enum<string>
required

A literal 'p' which identifies the object as a project prompt

Available options:
p
org_id
string<uuid>
required

Unique identifier for the organization

name
string
required

Name of the prompt

slug
string
required

Unique identifier for the prompt

function_data
prompt · object
required
description
string | null

Textual description of the prompt

created
string<date-time> | null

Date of prompt creation

prompt_data
object

The prompt, model, and its parameters

tags
string[] | null

A list of tags for the prompt

metadata
object

User-controlled metadata about the prompt

function_type
enum<string> | null
Available options:
llm,
scorer,
task,
tool,
custom_view,
origin
object
function_schema
object

JSON schema for the function's parameters and return type