Get Started
- Introduction
- Self Hosting
- Cookbooks
LLM Observability
- Overview
- Concepts
- Language APIs & SDKs
- User Events
- Monitoring & Alerts
- Code Examples
LLM Evaluation
- Offline Evaluation
- Real-Time Evaluation
- List of Evaluators
- Datasets
- Annotations
LLM Development
- Prompt Optimization Studio
- DSPy Visualization
- LangWatch MCP
- Prompt Versioning
API Endpoints
Prompts
Create prompt version
Create a new version for a prompt
POST
/
api
/
prompts
/
{id}
/
versions
curl --request POST \
--url https://app.langwatch.ai/api/prompts/{id}/versions \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '{
"id": "<string>",
"authorId": "<string>",
"projectId": "<string>",
"configId": "<string>",
"schemaVersion": "<string>",
"commitMessage": "<string>",
"version": 123,
"createdAt": "<string>",
"configData": {
"version": 2,
"prompt": "<string>",
"messages": [],
"inputs": [
{
"identifier": "<string>",
"type": "str"
}
],
"outputs": [
{
"identifier": "<string>",
"type": "str",
"json_schema": {
"type": "<string>"
}
}
],
"model": "<string>",
"temperature": 123,
"max_tokens": 123,
"demonstrations": {
"columns": [
{
"id": "<string>",
"name": "<string>",
"type": "string"
}
],
"rows": []
}
}
}'
{
"id": "<string>",
"authorId": "<string>",
"projectId": "<string>",
"configId": "<string>",
"schemaVersion": "<string>",
"commitMessage": "<string>",
"version": 123,
"createdAt": "<string>",
"configData": {
"version": 2,
"prompt": "<string>",
"messages": [],
"inputs": [
{
"identifier": "<string>",
"type": "str"
}
],
"outputs": [
{
"identifier": "<string>",
"type": "str",
"json_schema": {
"type": "<string>"
}
}
],
"model": "<string>",
"temperature": 123,
"max_tokens": 123,
"demonstrations": {
"columns": [
{
"id": "<string>",
"name": "<string>",
"type": "string"
}
],
"rows": []
}
}
}
Authorizations
Path Parameters
Body
application/json
Response
200
application/json
Success
The response is of type object
.
Was this page helpful?
curl --request POST \
--url https://app.langwatch.ai/api/prompts/{id}/versions \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '{
"id": "<string>",
"authorId": "<string>",
"projectId": "<string>",
"configId": "<string>",
"schemaVersion": "<string>",
"commitMessage": "<string>",
"version": 123,
"createdAt": "<string>",
"configData": {
"version": 2,
"prompt": "<string>",
"messages": [],
"inputs": [
{
"identifier": "<string>",
"type": "str"
}
],
"outputs": [
{
"identifier": "<string>",
"type": "str",
"json_schema": {
"type": "<string>"
}
}
],
"model": "<string>",
"temperature": 123,
"max_tokens": 123,
"demonstrations": {
"columns": [
{
"id": "<string>",
"name": "<string>",
"type": "string"
}
],
"rows": []
}
}
}'
{
"id": "<string>",
"authorId": "<string>",
"projectId": "<string>",
"configId": "<string>",
"schemaVersion": "<string>",
"commitMessage": "<string>",
"version": 123,
"createdAt": "<string>",
"configData": {
"version": 2,
"prompt": "<string>",
"messages": [],
"inputs": [
{
"identifier": "<string>",
"type": "str"
}
],
"outputs": [
{
"identifier": "<string>",
"type": "str",
"json_schema": {
"type": "<string>"
}
}
],
"model": "<string>",
"temperature": 123,
"max_tokens": 123,
"demonstrations": {
"columns": [
{
"id": "<string>",
"name": "<string>",
"type": "string"
}
],
"rows": []
}
}
}