Python
import requests
url = "https://app.langwatch.ai/api/v1/prompts/{id}"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://app.langwatch.ai/api/v1/prompts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.langwatch.ai/api/v1/prompts/{id} \
--header 'X-Auth-Token: <api-key>'{
"id": "<string>",
"handle": "<string>",
"scope": "PROJECT",
"name": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"projectId": "<string>",
"organizationId": "<string>",
"versionId": "<string>",
"version": 123,
"createdAt": "2023-11-07T05:31:56Z",
"prompt": "<string>",
"messages": [],
"inputs": [],
"outputs": [
{
"identifier": "<string>",
"type": "str",
"json_schema": {
"type": "<string>"
}
}
],
"model": "<string>",
"tags": [],
"parameters": {},
"platformUrl": "<string>",
"authorId": "<string>",
"commitMessage": "<string>",
"temperature": 123,
"maxTokens": 123,
"demonstrations": {
"id": "<string>",
"name": "<string>",
"inline": {
"records": {},
"columnTypes": [
{
"name": "<string>",
"type": "string",
"id": "<string>"
}
]
}
},
"promptingTechnique": {
"type": "few_shot",
"demonstrations": {
"id": "<string>",
"name": "<string>",
"inline": {
"records": {},
"columnTypes": [
{
"name": "<string>",
"type": "string",
"id": "<string>"
}
]
}
}
},
"responseFormat": {
"type": "json_schema",
"json_schema": {
"name": "<string>",
"schema": {}
}
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Prompts
Get prompt
Get a specific prompt by slug, with optional shorthand syntax for tags and versions. Pass a bare slug like “pizza-prompt” to get the latest version, “pizza-prompt:production” to resolve a tagged version, or “pizza-prompt:2” to fetch version 2. Alternatively, use the tag or version query parameters with a bare slug.
GET
/
api
/
v1
/
prompts
/
{id}
Python
import requests
url = "https://app.langwatch.ai/api/v1/prompts/{id}"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://app.langwatch.ai/api/v1/prompts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.langwatch.ai/api/v1/prompts/{id} \
--header 'X-Auth-Token: <api-key>'{
"id": "<string>",
"handle": "<string>",
"scope": "PROJECT",
"name": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"projectId": "<string>",
"organizationId": "<string>",
"versionId": "<string>",
"version": 123,
"createdAt": "2023-11-07T05:31:56Z",
"prompt": "<string>",
"messages": [],
"inputs": [],
"outputs": [
{
"identifier": "<string>",
"type": "str",
"json_schema": {
"type": "<string>"
}
}
],
"model": "<string>",
"tags": [],
"parameters": {},
"platformUrl": "<string>",
"authorId": "<string>",
"commitMessage": "<string>",
"temperature": 123,
"maxTokens": 123,
"demonstrations": {
"id": "<string>",
"name": "<string>",
"inline": {
"records": {},
"columnTypes": [
{
"name": "<string>",
"type": "string",
"id": "<string>"
}
]
}
},
"promptingTechnique": {
"type": "few_shot",
"demonstrations": {
"id": "<string>",
"name": "<string>",
"inline": {
"records": {},
"columnTypes": [
{
"name": "<string>",
"type": "string",
"id": "<string>"
}
]
}
}
},
"responseFormat": {
"type": "json_schema",
"json_schema": {
"name": "<string>",
"schema": {}
}
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
Project API key for sending traces and accessing project-scoped resources. Format: sk-lw-... (no underscore). Obtain one by creating a project via the Admin API or the LangWatch UI.
Path Parameters
Response
Success
Available options:
PROJECT, ORGANIZATION Show child attributes
Show child attributes
Show child attributes
Show child attributes
Minimum array length:
1Show child attributes
Show child attributes
Minimum string length:
1Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Last modified on October 12, 2026
Was this page helpful?