Execute a prompt
Call any prompt by name over HTTPS. Base URL:
https://router.promptlab.vernalabs.net
All routes are versioned under /v1 and scoped to a project: /v1/:projectId/.... Authenticate with the x-api-key header — see Authentication.
Endpoints
| Method | Path | Purpose |
|---|---|---|
POST | /v1/:projectId/prompts/:promptName/execute | Execute a stored prompt |
GET | /v1/:projectId/prompts | List active prompts |
GET | /v1/:projectId/prompts/:promptName | Get one prompt’s contract |
GET | /v1/:projectId/jobs/:jobId | Poll an async job |
Execute
curl -X POST \
https://router.promptlab.vernalabs.net/v1/YOUR_PROJECT_ID/prompts/summarize-ticket/execute \
-H "x-api-key: plp_xxx_xxx" \
-H "Content-Type: application/json" \
-d '{
"inputs": { "ticket": "User cannot log in after a password reset." },
"options": { "temperature": 0.2 }
}'
Request body
| Field | Type | Notes |
|---|---|---|
inputs | object | Values for the prompt’s {{variables}} |
version | string | Pin a prompt version (defaults to the active one) |
options | object | Per-call overrides: temperature, maxTokens, seed, reasoningEffort, executionMode ("sync" | "async"), … |
context | object | { agentId?, metadata? } |
trace | object | { correlationId? } |
The endpoint returns 200 with a response envelope.
Sending files (multipart)
For prompts that take images or other files, send multipart/form-data: one or more files parts (up to 20) plus a JSON payload field (or individual inputs / options / context / trace JSON string fields).
Async jobs
Media generation runs asynchronously. When the response status is queued or running, poll the job until it finishes:
curl https://router.promptlab.vernalabs.net/v1/YOUR_PROJECT_ID/jobs/JOB_ID \
-H "x-api-key: plp_xxx_xxx"
You can force sync or async with options.executionMode. Text defaults to sync; media defaults to async.
List and inspect prompts
# list active prompts
curl https://router.promptlab.vernalabs.net/v1/YOUR_PROJECT_ID/prompts \
-H "x-api-key: plp_xxx_xxx"
# get one prompt's contract (add ?version=3&includeTemplate=true)
curl https://router.promptlab.vernalabs.net/v1/YOUR_PROJECT_ID/prompts/summarize-ticket \
-H "x-api-key: plp_xxx_xxx"
Next
- Response envelope — the shape you get back.
- Embeddings — create vector embeddings.