curl --request POST \
--url https://app.langwatch.ai/api/prompts \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '{
"handle": "<string>"
}'
{
"id": "<string>",
"handle": "<string>",
"scope": "ORGANIZATION",
"name": "<string>",
"updatedAt": "<string>",
"projectId": "<string>",
"organizationId": "<string>",
"versionId": "<string>",
"authorId": "<string>",
"version": 123,
"createdAt": "<string>",
"commitMessage": "<string>",
"prompt": "<string>",
"messages": [],
"inputs": [
{
"identifier": "<string>",
"type": "str"
}
],
"outputs": [
{
"identifier": "<string>",
"type": "str",
"json_schema": {
"type": "<string>"
}
}
],
"model": "<string>",
"temperature": 123,
"maxTokens": 123,
"demonstrations": {
"id": "<string>",
"name": "<string>",
"inline": {
"records": {},
"columnTypes": [
{
"name": "<string>",
"type": "<string>"
}
]
}
},
"promptingTechnique": {
"type": "few_shot",
"demonstrations": {
"id": "<string>",
"name": "<string>",
"inline": {
"records": {},
"columnTypes": [
{
"name": "<string>",
"type": "<string>"
}
]
}
}
},
"responseFormat": {
"type": "json_schema",
"json_schema": {
"name": "<string>",
"schema": {}
}
}
}
Create a new prompt with default initial version
curl --request POST \
--url https://app.langwatch.ai/api/prompts \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '{
"handle": "<string>"
}'
{
"id": "<string>",
"handle": "<string>",
"scope": "ORGANIZATION",
"name": "<string>",
"updatedAt": "<string>",
"projectId": "<string>",
"organizationId": "<string>",
"versionId": "<string>",
"authorId": "<string>",
"version": 123,
"createdAt": "<string>",
"commitMessage": "<string>",
"prompt": "<string>",
"messages": [],
"inputs": [
{
"identifier": "<string>",
"type": "str"
}
],
"outputs": [
{
"identifier": "<string>",
"type": "str",
"json_schema": {
"type": "<string>"
}
}
],
"model": "<string>",
"temperature": 123,
"maxTokens": 123,
"demonstrations": {
"id": "<string>",
"name": "<string>",
"inline": {
"records": {},
"columnTypes": [
{
"name": "<string>",
"type": "<string>"
}
]
}
},
"promptingTechnique": {
"type": "few_shot",
"demonstrations": {
"id": "<string>",
"name": "<string>",
"inline": {
"records": {},
"columnTypes": [
{
"name": "<string>",
"type": "<string>"
}
]
}
}
},
"responseFormat": {
"type": "json_schema",
"json_schema": {
"name": "<string>",
"schema": {}
}
}
}
Success
The response is of type object
.
Was this page helpful?