cURL
curl --request DELETE \
--url https://api.tela.com/prompt-version/{id}import requests
url = "https://api.tela.com/prompt-version/{id}"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://api.tela.com/prompt-version/{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.tela.com/prompt-version/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tela.com/prompt-version/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.tela.com/prompt-version/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tela.com/prompt-version/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"deleted": true
}Prompt Version
Delete Prompt Version
Deletes a specific prompt version
DELETE
/
prompt-version
/
{id}
cURL
curl --request DELETE \
--url https://api.tela.com/prompt-version/{id}import requests
url = "https://api.tela.com/prompt-version/{id}"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://api.tela.com/prompt-version/{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.tela.com/prompt-version/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tela.com/prompt-version/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.tela.com/prompt-version/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tela.com/prompt-version/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"deleted": true
}Delete a Prompt Version
This endpoint deletes a specific prompt version by its ID.URL Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The ID of the prompt version to delete |
Examples
const promptVersionId = 'version_uuid'
const response = await fetch(`https://api.tela.ai/prompt-version/${promptVersionId}`, {
method: 'DELETE',
headers: {
'Authorization': `Bearer ${process.env.TELA_API_KEY}`,
'Content-Type': 'application/json'
}
})
const result = await response.json()
console.log(result)
const promptVersionId = 'version_uuid'
const response = await fetch(`https://api.tela.ai/prompt-version/${promptVersionId}`, {
method: 'DELETE',
headers: {
'Authorization': `Bearer ${process.env.TELA_API_KEY}`,
'Content-Type': 'application/json'
}
})
const result = await response.json()
console.log(result)
import requests
import os
api_key = os.getenv("TELA_API_KEY")
prompt_version_id = "version_uuid"
url = f"https://api.tela.ai/prompt-version/{prompt_version_id}"
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
response = requests.delete(url, headers=headers)
result = response.json()
print(result)
Response
The response includes a confirmation of the deletion.{
"id": "version_uuid",
"deleted": true
}
Notes
- Deleting a promoted prompt version will remove it from being available for use in completions.
- If a prompt has only one version, you may not be able to delete it without first deleting the entire prompt.
- Deleted prompt versions cannot be recovered. Make sure you want to permanently remove the version before calling this endpoint.