https://api.hyperleapai.com/prompt-runs/run-sseRun a specific prompt based on the Prompt ID and Prompt Version ID passed in. The results will be streamed using SSE. Not recommended when creating classifiers to make decisions, since full response is not available for decision making.
Authenticated with your API key in the x-hl-api-key request header.
Request body
application/jsonpromptIdstring · uuidrequiredpromptVersionIdstring · uuidnullablestreambooleanResponses
application/jsonStreams Server-Sent Events. Each event arrives as a data: line holding one JSON chunk — read the response as a stream instead of awaiting a single body.
data: [{"choice":{"finish_reason":"string","index":0,"message":{"role":"string","content":"string","toolCallId":"string","name":"string"},"moderation_results":{"categoryResults":[]}},"usage":{"prompt_tokens":0,"completion_tokens":0,"total_tokens":0},"messageId":"string","runId":"string","citations":[{"link":"string","index":"string","documentId":"string","fileId":"string","sourceContentType":"string","sourceName":"string","sourceUrl":"string","partitions":[]}]}]
data: [{"choice":{"finish_reason":"string","index":0,"message":{"role":"string","content":"string","toolCallId":"string","name":"string"},"moderation_results":{"categoryResults":[]}},"usage":{"prompt_tokens":0,"completion_tokens":0,"total_tokens":0},"messageId":"string","runId":"string","citations":[{"link":"string","index":"string","documentId":"string","fileId":"string","sourceContentType":"string","sourceName":"string","sourceUrl":"string","partitions":[]}]}]application/jsonArray of ModelError
messageanytruncateddataanytruncatedinnerExceptionanytruncatedhelpLinkanytruncatedsourceanytruncatedhResultanytruncatedstackTraceanytruncatederrorMessageanytruncatedExample payload
[
{
"exception": {
"targetSite": {
"memberType": 1,
"name": "string",
"declaringType": {
"name": null,
"customAttributes": null,
"namespace": null,
"assemblyQualifiedName": null,
"fullName": null
}
}
}
}
][
{
"exception": {
"targetSite": {
"memberType": 1,
"name": "string",
"declaringType": {
"name": null,
"customAttributes": null,
"namespace": null,
"assemblyQualifiedName": null,
"fullName": null
}
}
}
}
]No response body.
curl -X POST "https://api.hyperleapai.com/prompt-runs/run-sse" \
-H "x-hl-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"promptId": "string",
"promptVersionId": "string",
"replacements": {
"key": {
"options": {
"propertyNameCaseInsensitive": true
}
}
},
"stream": true
}'curl -X POST "https://api.hyperleapai.com/prompt-runs/run-sse" \
-H "x-hl-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"promptId": "string",
"promptVersionId": "string",
"replacements": {
"key": {
"options": {
"propertyNameCaseInsensitive": true
}
}
},
"stream": true
}'