Prompt by Slug
curl --request GET \
--url https://app.asserto.ai/api/prompts/{slug}import requests
url = "https://app.asserto.ai/api/prompts/{slug}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.asserto.ai/api/prompts/{slug}', 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://app.asserto.ai/api/prompts/{slug}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://app.asserto.ai/api/prompts/{slug}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.asserto.ai/api/prompts/{slug}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.asserto.ai/api/prompts/{slug}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"slug": "<string>",
"messages": [
{
"role": "<string>",
"content": {
"type": "<string>",
"text": "<string>"
}
}
],
"model": {
"name": "<string>",
"provider": "<string>",
"id": 123,
"url": "<string>",
"config": {},
"pricing": {
"tkInput": "<string>",
"tkOutput": "<string>",
"tkCacheWrite": "<string>",
"tkCacheRead": "<string>"
}
},
"genParams": {
"temperature": 0.1
},
"respFormat": "<string>",
"tools": [
{
"name": "<string>",
"inputSchema": {
"properties": {},
"required": [
"<string>"
],
"type": "object"
},
"description": ""
}
],
"outputSchema": {
"name": "<string>",
"schema": {
"properties": {},
"type": "object",
"required": [],
"additionalProperties": false
},
"description": "<string>",
"strict": false
},
"variables": []
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}API Reference
Prompt by slug
Get single prompt by slug.
Get only major versions
GET
/
api
/
prompts
/
{slug}
Prompt by Slug
curl --request GET \
--url https://app.asserto.ai/api/prompts/{slug}import requests
url = "https://app.asserto.ai/api/prompts/{slug}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.asserto.ai/api/prompts/{slug}', 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://app.asserto.ai/api/prompts/{slug}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://app.asserto.ai/api/prompts/{slug}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.asserto.ai/api/prompts/{slug}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.asserto.ai/api/prompts/{slug}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"slug": "<string>",
"messages": [
{
"role": "<string>",
"content": {
"type": "<string>",
"text": "<string>"
}
}
],
"model": {
"name": "<string>",
"provider": "<string>",
"id": 123,
"url": "<string>",
"config": {},
"pricing": {
"tkInput": "<string>",
"tkOutput": "<string>",
"tkCacheWrite": "<string>",
"tkCacheRead": "<string>"
}
},
"genParams": {
"temperature": 0.1
},
"respFormat": "<string>",
"tools": [
{
"name": "<string>",
"inputSchema": {
"properties": {},
"required": [
"<string>"
],
"type": "object"
},
"description": ""
}
],
"outputSchema": {
"name": "<string>",
"schema": {
"properties": {},
"type": "object",
"required": [],
"additionalProperties": false
},
"description": "<string>",
"strict": false
},
"variables": []
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Headers
API Key in the format: Authorization: ApiKey <key>
Path Parameters
Response
Successful Response
Prompt info with nested tool definitions
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Schema for response when using response format json_schema
Show child attributes
Show child attributes
⌘I