curl --request PATCH \
--url https://api.braintrust.dev/v1/prompt/{prompt_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"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>"
]
},
"position": "<string>"
},
"parser": {
"type": "llm_classifier",
"use_cot": true,
"choice_scores": {},
"choice": [
"<string>"
],
"allow_no_match": true,
"allow_skip": true
},
"tool_functions": [
{
"type": "function",
"id": "<string>",
"version": "<string>"
}
],
"mcp": {},
"origin": {
"prompt_id": "<string>",
"project_id": "<string>",
"prompt_version": "<string>"
}
},
"tags": [
"<string>"
]
}
'import requests
url = "https://api.braintrust.dev/v1/prompt/{prompt_id}"
payload = {
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"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>"]
},
"position": "<string>"
},
"parser": {
"type": "llm_classifier",
"use_cot": True,
"choice_scores": {},
"choice": ["<string>"],
"allow_no_match": True,
"allow_skip": True
},
"tool_functions": [
{
"type": "function",
"id": "<string>",
"version": "<string>"
}
],
"mcp": {},
"origin": {
"prompt_id": "<string>",
"project_id": "<string>",
"prompt_version": "<string>"
}
},
"tags": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
slug: '<string>',
description: '<string>',
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>']
},
position: '<string>'
},
parser: {
type: 'llm_classifier',
use_cot: true,
choice_scores: {},
choice: ['<string>'],
allow_no_match: true,
allow_skip: true
},
tool_functions: [{type: 'function', id: '<string>', version: '<string>'}],
mcp: {},
origin: {prompt_id: '<string>', project_id: '<string>', prompt_version: '<string>'}
},
tags: ['<string>']
})
};
fetch('https://api.braintrust.dev/v1/prompt/{prompt_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.braintrust.dev/v1/prompt/{prompt_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'slug' => '<string>',
'description' => '<string>',
'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>'
]
],
'position' => '<string>'
],
'parser' => [
'type' => 'llm_classifier',
'use_cot' => true,
'choice_scores' => [
],
'choice' => [
'<string>'
],
'allow_no_match' => true,
'allow_skip' => true
],
'tool_functions' => [
[
'type' => 'function',
'id' => '<string>',
'version' => '<string>'
]
],
'mcp' => [
],
'origin' => [
'prompt_id' => '<string>',
'project_id' => '<string>',
'prompt_version' => '<string>'
]
],
'tags' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.braintrust.dev/v1/prompt/{prompt_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"prompt_data\": {\n \"prompt\": {\n \"type\": \"chat\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"\",\n \"name\": \"<string>\"\n }\n ],\n \"tools\": \"<string>\"\n },\n \"options\": {\n \"model\": \"<string>\",\n \"params\": {\n \"use_cache\": true,\n \"reasoning_enabled\": true,\n \"reasoning_budget\": 123,\n \"temperature\": 123,\n \"top_p\": 123,\n \"max_tokens\": 123,\n \"max_completion_tokens\": 123,\n \"frequency_penalty\": 123,\n \"presence_penalty\": 123,\n \"response_format\": {\n \"type\": \"json_object\"\n },\n \"tool_choice\": \"auto\",\n \"function_call\": \"auto\",\n \"n\": 123,\n \"stop\": [\n \"<string>\"\n ]\n },\n \"position\": \"<string>\"\n },\n \"parser\": {\n \"type\": \"llm_classifier\",\n \"use_cot\": true,\n \"choice_scores\": {},\n \"choice\": [\n \"<string>\"\n ],\n \"allow_no_match\": true,\n \"allow_skip\": true\n },\n \"tool_functions\": [\n {\n \"type\": \"function\",\n \"id\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"mcp\": {},\n \"origin\": {\n \"prompt_id\": \"<string>\",\n \"project_id\": \"<string>\",\n \"prompt_version\": \"<string>\"\n }\n },\n \"tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.braintrust.dev/v1/prompt/{prompt_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"prompt_data\": {\n \"prompt\": {\n \"type\": \"chat\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"\",\n \"name\": \"<string>\"\n }\n ],\n \"tools\": \"<string>\"\n },\n \"options\": {\n \"model\": \"<string>\",\n \"params\": {\n \"use_cache\": true,\n \"reasoning_enabled\": true,\n \"reasoning_budget\": 123,\n \"temperature\": 123,\n \"top_p\": 123,\n \"max_tokens\": 123,\n \"max_completion_tokens\": 123,\n \"frequency_penalty\": 123,\n \"presence_penalty\": 123,\n \"response_format\": {\n \"type\": \"json_object\"\n },\n \"tool_choice\": \"auto\",\n \"function_call\": \"auto\",\n \"n\": 123,\n \"stop\": [\n \"<string>\"\n ]\n },\n \"position\": \"<string>\"\n },\n \"parser\": {\n \"type\": \"llm_classifier\",\n \"use_cot\": true,\n \"choice_scores\": {},\n \"choice\": [\n \"<string>\"\n ],\n \"allow_no_match\": true,\n \"allow_skip\": true\n },\n \"tool_functions\": [\n {\n \"type\": \"function\",\n \"id\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"mcp\": {},\n \"origin\": {\n \"prompt_id\": \"<string>\",\n \"project_id\": \"<string>\",\n \"prompt_version\": \"<string>\"\n }\n },\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.braintrust.dev/v1/prompt/{prompt_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"prompt_data\": {\n \"prompt\": {\n \"type\": \"chat\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"\",\n \"name\": \"<string>\"\n }\n ],\n \"tools\": \"<string>\"\n },\n \"options\": {\n \"model\": \"<string>\",\n \"params\": {\n \"use_cache\": true,\n \"reasoning_enabled\": true,\n \"reasoning_budget\": 123,\n \"temperature\": 123,\n \"top_p\": 123,\n \"max_tokens\": 123,\n \"max_completion_tokens\": 123,\n \"frequency_penalty\": 123,\n \"presence_penalty\": 123,\n \"response_format\": {\n \"type\": \"json_object\"\n },\n \"tool_choice\": \"auto\",\n \"function_call\": \"auto\",\n \"n\": 123,\n \"stop\": [\n \"<string>\"\n ]\n },\n \"position\": \"<string>\"\n },\n \"parser\": {\n \"type\": \"llm_classifier\",\n \"use_cot\": true,\n \"choice_scores\": {},\n \"choice\": [\n \"<string>\"\n ],\n \"allow_no_match\": true,\n \"allow_skip\": true\n },\n \"tool_functions\": [\n {\n \"type\": \"function\",\n \"id\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"mcp\": {},\n \"origin\": {\n \"prompt_id\": \"<string>\",\n \"project_id\": \"<string>\",\n \"prompt_version\": \"<string>\"\n }\n },\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"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>",
"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>"
]
},
"position": "<string>"
},
"parser": {
"type": "llm_classifier",
"use_cot": true,
"choice_scores": {},
"choice": [
"<string>"
],
"allow_no_match": true,
"allow_skip": true
},
"tool_functions": [
{
"type": "function",
"id": "<string>",
"version": "<string>"
}
],
"mcp": {},
"origin": {
"prompt_id": "<string>",
"project_id": "<string>",
"prompt_version": "<string>"
}
},
"tags": [
"<string>"
],
"metadata": {}
}"<string>""<string>""<string>""<string>""<string>"Partially update prompt
Partially update a prompt object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.
curl --request PATCH \
--url https://api.braintrust.dev/v1/prompt/{prompt_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"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>"
]
},
"position": "<string>"
},
"parser": {
"type": "llm_classifier",
"use_cot": true,
"choice_scores": {},
"choice": [
"<string>"
],
"allow_no_match": true,
"allow_skip": true
},
"tool_functions": [
{
"type": "function",
"id": "<string>",
"version": "<string>"
}
],
"mcp": {},
"origin": {
"prompt_id": "<string>",
"project_id": "<string>",
"prompt_version": "<string>"
}
},
"tags": [
"<string>"
]
}
'import requests
url = "https://api.braintrust.dev/v1/prompt/{prompt_id}"
payload = {
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"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>"]
},
"position": "<string>"
},
"parser": {
"type": "llm_classifier",
"use_cot": True,
"choice_scores": {},
"choice": ["<string>"],
"allow_no_match": True,
"allow_skip": True
},
"tool_functions": [
{
"type": "function",
"id": "<string>",
"version": "<string>"
}
],
"mcp": {},
"origin": {
"prompt_id": "<string>",
"project_id": "<string>",
"prompt_version": "<string>"
}
},
"tags": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
slug: '<string>',
description: '<string>',
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>']
},
position: '<string>'
},
parser: {
type: 'llm_classifier',
use_cot: true,
choice_scores: {},
choice: ['<string>'],
allow_no_match: true,
allow_skip: true
},
tool_functions: [{type: 'function', id: '<string>', version: '<string>'}],
mcp: {},
origin: {prompt_id: '<string>', project_id: '<string>', prompt_version: '<string>'}
},
tags: ['<string>']
})
};
fetch('https://api.braintrust.dev/v1/prompt/{prompt_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.braintrust.dev/v1/prompt/{prompt_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'slug' => '<string>',
'description' => '<string>',
'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>'
]
],
'position' => '<string>'
],
'parser' => [
'type' => 'llm_classifier',
'use_cot' => true,
'choice_scores' => [
],
'choice' => [
'<string>'
],
'allow_no_match' => true,
'allow_skip' => true
],
'tool_functions' => [
[
'type' => 'function',
'id' => '<string>',
'version' => '<string>'
]
],
'mcp' => [
],
'origin' => [
'prompt_id' => '<string>',
'project_id' => '<string>',
'prompt_version' => '<string>'
]
],
'tags' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.braintrust.dev/v1/prompt/{prompt_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"prompt_data\": {\n \"prompt\": {\n \"type\": \"chat\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"\",\n \"name\": \"<string>\"\n }\n ],\n \"tools\": \"<string>\"\n },\n \"options\": {\n \"model\": \"<string>\",\n \"params\": {\n \"use_cache\": true,\n \"reasoning_enabled\": true,\n \"reasoning_budget\": 123,\n \"temperature\": 123,\n \"top_p\": 123,\n \"max_tokens\": 123,\n \"max_completion_tokens\": 123,\n \"frequency_penalty\": 123,\n \"presence_penalty\": 123,\n \"response_format\": {\n \"type\": \"json_object\"\n },\n \"tool_choice\": \"auto\",\n \"function_call\": \"auto\",\n \"n\": 123,\n \"stop\": [\n \"<string>\"\n ]\n },\n \"position\": \"<string>\"\n },\n \"parser\": {\n \"type\": \"llm_classifier\",\n \"use_cot\": true,\n \"choice_scores\": {},\n \"choice\": [\n \"<string>\"\n ],\n \"allow_no_match\": true,\n \"allow_skip\": true\n },\n \"tool_functions\": [\n {\n \"type\": \"function\",\n \"id\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"mcp\": {},\n \"origin\": {\n \"prompt_id\": \"<string>\",\n \"project_id\": \"<string>\",\n \"prompt_version\": \"<string>\"\n }\n },\n \"tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.braintrust.dev/v1/prompt/{prompt_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"prompt_data\": {\n \"prompt\": {\n \"type\": \"chat\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"\",\n \"name\": \"<string>\"\n }\n ],\n \"tools\": \"<string>\"\n },\n \"options\": {\n \"model\": \"<string>\",\n \"params\": {\n \"use_cache\": true,\n \"reasoning_enabled\": true,\n \"reasoning_budget\": 123,\n \"temperature\": 123,\n \"top_p\": 123,\n \"max_tokens\": 123,\n \"max_completion_tokens\": 123,\n \"frequency_penalty\": 123,\n \"presence_penalty\": 123,\n \"response_format\": {\n \"type\": \"json_object\"\n },\n \"tool_choice\": \"auto\",\n \"function_call\": \"auto\",\n \"n\": 123,\n \"stop\": [\n \"<string>\"\n ]\n },\n \"position\": \"<string>\"\n },\n \"parser\": {\n \"type\": \"llm_classifier\",\n \"use_cot\": true,\n \"choice_scores\": {},\n \"choice\": [\n \"<string>\"\n ],\n \"allow_no_match\": true,\n \"allow_skip\": true\n },\n \"tool_functions\": [\n {\n \"type\": \"function\",\n \"id\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"mcp\": {},\n \"origin\": {\n \"prompt_id\": \"<string>\",\n \"project_id\": \"<string>\",\n \"prompt_version\": \"<string>\"\n }\n },\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.braintrust.dev/v1/prompt/{prompt_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"prompt_data\": {\n \"prompt\": {\n \"type\": \"chat\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"\",\n \"name\": \"<string>\"\n }\n ],\n \"tools\": \"<string>\"\n },\n \"options\": {\n \"model\": \"<string>\",\n \"params\": {\n \"use_cache\": true,\n \"reasoning_enabled\": true,\n \"reasoning_budget\": 123,\n \"temperature\": 123,\n \"top_p\": 123,\n \"max_tokens\": 123,\n \"max_completion_tokens\": 123,\n \"frequency_penalty\": 123,\n \"presence_penalty\": 123,\n \"response_format\": {\n \"type\": \"json_object\"\n },\n \"tool_choice\": \"auto\",\n \"function_call\": \"auto\",\n \"n\": 123,\n \"stop\": [\n \"<string>\"\n ]\n },\n \"position\": \"<string>\"\n },\n \"parser\": {\n \"type\": \"llm_classifier\",\n \"use_cot\": true,\n \"choice_scores\": {},\n \"choice\": [\n \"<string>\"\n ],\n \"allow_no_match\": true,\n \"allow_skip\": true\n },\n \"tool_functions\": [\n {\n \"type\": \"function\",\n \"id\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"mcp\": {},\n \"origin\": {\n \"prompt_id\": \"<string>\",\n \"project_id\": \"<string>\",\n \"prompt_version\": \"<string>\"\n }\n },\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"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>",
"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>"
]
},
"position": "<string>"
},
"parser": {
"type": "llm_classifier",
"use_cot": true,
"choice_scores": {},
"choice": [
"<string>"
],
"allow_no_match": true,
"allow_skip": true
},
"tool_functions": [
{
"type": "function",
"id": "<string>",
"version": "<string>"
}
],
"mcp": {},
"origin": {
"prompt_id": "<string>",
"project_id": "<string>",
"prompt_version": "<string>"
}
},
"tags": [
"<string>"
],
"metadata": {}
}"<string>""<string>""<string>""<string>""<string>"Authorizations
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
Prompt id
Body
Fields to update
Response
Returns the prompt object
Unique identifier for the prompt
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)
Unique identifier for the project that the prompt belongs under
A literal 'p' which identifies the object as a project prompt
p Unique identifier for the organization
Name of the prompt
Unique identifier for the prompt
Textual description of the prompt
Date of prompt creation
The prompt, model, and its parameters
Show child attributes
Show child attributes
A list of tags for the prompt
User-controlled metadata about the prompt
Show child attributes
Show child attributes
llm, scorer, task, tool, custom_view, preprocessor, facet, classifier, tag, parameters, sandbox, null Was this page helpful?