Get Prompt
curl --request GET \
--url https://api.eigi.ai/v1/public/prompts/{prompt_name} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.eigi.ai/v1/public/prompts/{prompt_name}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.eigi.ai/v1/public/prompts/{prompt_name}', 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.eigi.ai/v1/public/prompts/{prompt_name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <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"
"net/http"
"io"
)
func main() {
url := "https://api.eigi.ai/v1/public/prompts/{prompt_name}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.eigi.ai/v1/public/prompts/{prompt_name}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eigi.ai/v1/public/prompts/{prompt_name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"prompt_name": "<string>",
"prompt_version": 123,
"prompt_content": "<string>",
"prompt_metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Prompts
Get Prompt
Retrieve a specific prompt by name, optionally at a specific version
GET
/
v1
/
public
/
prompts
/
{prompt_name}
Get Prompt
curl --request GET \
--url https://api.eigi.ai/v1/public/prompts/{prompt_name} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.eigi.ai/v1/public/prompts/{prompt_name}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.eigi.ai/v1/public/prompts/{prompt_name}', 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.eigi.ai/v1/public/prompts/{prompt_name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <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"
"net/http"
"io"
)
func main() {
url := "https://api.eigi.ai/v1/public/prompts/{prompt_name}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.eigi.ai/v1/public/prompts/{prompt_name}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eigi.ai/v1/public/prompts/{prompt_name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"prompt_name": "<string>",
"prompt_version": 123,
"prompt_content": "<string>",
"prompt_metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Overview
Get the details of a specific prompt by its unique name. Returns the latest version by default, or a specific version if theversion query parameter is provided.
Authentication
string
required
Your eigi.ai API key. Must be prefixed with
vk_.Path Parameters
string
required
The unique prompt name.Example:
customer_support_v1Query Parameters
integer
Specific version number to retrieve (minimum: 1). Omit to get the latest version.
Response
string
The unique prompt name.
integer
Version number of the returned prompt.
string
The prompt text content.
object
Metadata including prompt_type.
string
ISO 8601 creation timestamp.
string
ISO 8601 last update timestamp.
Authorizations
API key for authentication. Get your API key from the eigi.ai Dashboard under Settings → API Keys.
Path Parameters
The unique prompt name
Query Parameters
Specific version to retrieve (omit for latest)
Required range:
x >= 1Response
Successfully retrieved prompt

