POST
/
api
/
prompts
cURL
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": {}
    }
  }
}

Authorizations

X-Auth-Token
string
header
required

Body

application/json
handle
string
required
scope
enum<string>
default:PROJECT
Available options:
ORGANIZATION,
PROJECT
model
string
temperature
number
maxTokens
number
commitMessage
string
authorId
string
prompt
string
messages
object[]
inputs
object[]
outputs
object[]
schemaVersion
enum<string>
Available options:
1.0

Response

Success

id
string
required
handle
string | null
required
scope
enum<string>
required
Available options:
ORGANIZATION,
PROJECT
name
string
required
updatedAt
string
required
projectId
string
required
organizationId
string
required
versionId
string
required
version
number
required
createdAt
string
required
prompt
string
required
messages
object[]
required
inputs
object[]
required
Minimum length: 1
outputs
object[]
required
Minimum length: 1
model
string
required
Minimum length: 1
authorId
string | null
commitMessage
string | null
temperature
number
maxTokens
number
demonstrations
object
promptingTechnique
object
responseFormat
object