curl --request POST \
--url https://app.langwatch.ai/api/prompts/{id}/versions \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '{
"projectId": "<string>",
"configId": "<string>",
"schemaVersion": "<string>",
"commitMessage": "<string>",
"version": 123,
"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": []
},
"prompting_technique": {
"ref": "<string>"
}
}
}'
{
"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": []
},
"prompting_technique": {
"ref": "<string>"
}
}
}
Create a new version for a prompt
curl --request POST \
--url https://app.langwatch.ai/api/prompts/{id}/versions \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '{
"projectId": "<string>",
"configId": "<string>",
"schemaVersion": "<string>",
"commitMessage": "<string>",
"version": 123,
"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": []
},
"prompting_technique": {
"ref": "<string>"
}
}
}'
{
"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": []
},
"prompting_technique": {
"ref": "<string>"
}
}
}
Success
The response is of type object
.
Was this page helpful?