curl --request POST \
--url https://platform.perso.ai/api/v1/prompt/ \
--header 'Content-Type: application/json' \
--header 'PersoPlatform-APIKey: <api-key>' \
--data '
{
"name": "<string>",
"system_prompt": "<string>",
"description": "<string>",
"require_document": true,
"intro_message": "<string>"
}
'import requests
url = "https://platform.perso.ai/api/v1/prompt/"
payload = {
"name": "<string>",
"system_prompt": "<string>",
"description": "<string>",
"require_document": True,
"intro_message": "<string>"
}
headers = {
"PersoPlatform-APIKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'PersoPlatform-APIKey': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
system_prompt: '<string>',
description: '<string>',
require_document: true,
intro_message: '<string>'
})
};
fetch('https://platform.perso.ai/api/v1/prompt/', 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://platform.perso.ai/api/v1/prompt/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'system_prompt' => '<string>',
'description' => '<string>',
'require_document' => true,
'intro_message' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"PersoPlatform-APIKey: <api-key>"
],
]);
$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://platform.perso.ai/api/v1/prompt/"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"description\": \"<string>\",\n \"require_document\": true,\n \"intro_message\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("PersoPlatform-APIKey", "<api-key>")
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.post("https://platform.perso.ai/api/v1/prompt/")
.header("PersoPlatform-APIKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"description\": \"<string>\",\n \"require_document\": true,\n \"intro_message\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.perso.ai/api/v1/prompt/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["PersoPlatform-APIKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"description\": \"<string>\",\n \"require_document\": true,\n \"intro_message\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"prompt_id": "<string>",
"system_prompt": "<string>",
"description": "<string>",
"require_document": true,
"intro_message": "<string>"
}Create Prompt
Create a new prompt template.
Prompts configure the LLM’s behavior, personality, and response style for interactive sessions.
curl --request POST \
--url https://platform.perso.ai/api/v1/prompt/ \
--header 'Content-Type: application/json' \
--header 'PersoPlatform-APIKey: <api-key>' \
--data '
{
"name": "<string>",
"system_prompt": "<string>",
"description": "<string>",
"require_document": true,
"intro_message": "<string>"
}
'import requests
url = "https://platform.perso.ai/api/v1/prompt/"
payload = {
"name": "<string>",
"system_prompt": "<string>",
"description": "<string>",
"require_document": True,
"intro_message": "<string>"
}
headers = {
"PersoPlatform-APIKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'PersoPlatform-APIKey': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
system_prompt: '<string>',
description: '<string>',
require_document: true,
intro_message: '<string>'
})
};
fetch('https://platform.perso.ai/api/v1/prompt/', 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://platform.perso.ai/api/v1/prompt/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'system_prompt' => '<string>',
'description' => '<string>',
'require_document' => true,
'intro_message' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"PersoPlatform-APIKey: <api-key>"
],
]);
$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://platform.perso.ai/api/v1/prompt/"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"description\": \"<string>\",\n \"require_document\": true,\n \"intro_message\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("PersoPlatform-APIKey", "<api-key>")
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.post("https://platform.perso.ai/api/v1/prompt/")
.header("PersoPlatform-APIKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"description\": \"<string>\",\n \"require_document\": true,\n \"intro_message\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.perso.ai/api/v1/prompt/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["PersoPlatform-APIKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"description\": \"<string>\",\n \"require_document\": true,\n \"intro_message\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"prompt_id": "<string>",
"system_prompt": "<string>",
"description": "<string>",
"require_document": true,
"intro_message": "<string>"
}Authorizations
Body
1 - 100Instructions sent to the LLM at the start of every conversation using this prompt.
1When require_document is True, the System prompt must include '{context}' string to be replaced with the document search result in the prompt.require_document 가 True 인 경우, 시스템 프롬프트는 '{context}' 문자열을 포함해야 하며, 해당 문자열은 프롬프트에서 문서 검색 결과로 대체됩니다.
First message the AI speaks when a session opens (optional).
Response
100Instructions sent to the LLM at the start of every conversation using this prompt.
When require_document is True, the System prompt must include '{context}' string to be replaced with the document search result in the prompt.require_document 가 True 인 경우, 시스템 프롬프트는 '{context}' 문자열을 포함해야 하며, 해당 문자열은 프롬프트에서 문서 검색 결과로 대체됩니다.
First message the AI speaks when a session opens (optional).

