Call a workspace prompt
Portkey-style prompt call. The path names a prompt from the workspace's prompt library by id or slug; append @<version> to pin a version, otherwise the published version answers. The body carries variables, which must be exactly the prompt's, and any Chat Completions member except messages, which overrides what the prompt sets. Answered exactly as /v1/chat/completions, through the same key, limits, auto routing and usage; the request records the prompt and version.
post/v1/prompts/{promptId}/completions
Request
- Base URLhttps://api.agentlab.cresclab.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
promptIdstring required
The prompt's id or slug, optionally followed by @<version>.
Headers
X-AgentLab-Routing'auto' | 'auto:cost' | 'auto:balanced' | 'auto:quality'
Let the Gateway choose the model although the body names one, with that preference.
Idempotency-Keystring
Request body
Response
The model's answer, or a text/event-stream when stream is true.
object required
Changes
No recorded changes to this operation across all 1 revision of this API.