POST
/
v1
/
datasets
/
prompts
curl --request POST \
  --url https://api.lunary.ai/v1/datasets/prompts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "datasetId": "<string>",
  "messages": "<string>",
  "idealOutput": "<string>",
  "withPromptVariation": true
}'
{
  "id": "<string>",
  "datasetId": "<string>",
  "messages": [
    {
      "role": "<string>",
      "content": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
datasetId
string
required
messages
string | null
idealOutput
string
withPromptVariation
boolean
default:true

Response

200 - application/json
Created prompt
id
string
datasetId
string
messages