Get prompt
import requests
url = "https://api.memic.ai/api/v1/prompts/{name}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api.memic.ai/api/v1/prompts/{name} \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.memic.ai/api/v1/prompts/{name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"name": "<string>",
"body": "<string>",
"version_number": 123,
"updated_at": "2023-11-07T05:31:56Z",
"variables": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Endpoints
Get prompt
Fetch the currently-live version of a managed prompt by name. Prompt names are scoped to the environment resolved from your API key.
GET
/
api
/
v1
/
prompts
/
{name}
Get prompt
import requests
url = "https://api.memic.ai/api/v1/prompts/{name}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api.memic.ai/api/v1/prompts/{name} \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.memic.ai/api/v1/prompts/{name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"name": "<string>",
"body": "<string>",
"version_number": 123,
"updated_at": "2023-11-07T05:31:56Z",
"variables": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Memic API key. Every key is bound to exactly one environment — get one from the Memic dashboard under API Keys.